[{"name":"compaction","kind":"directory","size":0,"lastCommitHash":"bee1dc826360b82ca9d943ca856cd2863f597297","lastCommitWhen":"2026-09-01T22:34:13+09:00","lastCommitMessage":"feat(coding-agent): add loss-bounded compaction projection\n"},{"name":"export-html","kind":"directory","size":0,"lastCommitHash":"032e3ee74574ca16efaf8745a1394b821256a5d0","lastCommitWhen":"2026-08-18T12:17:35+02:00","lastCommitMessage":"chore: remove redundant comments and unused internals (#1505)\n\n* chore: remove redundant comments\n\n* chore(tui): remove redundant export comments\n\n* chore(coding-agent): remove redundant example comments\n\n* chore(ai): remove redundant comments\n\n* chore(coding-agent): remove obsolete core comments\n\n* chore(coding-agent): remove redundant test comments\n\n* chore(coding-agent): remove redundant test comments\n\n* chore(coding-agent): remove redundant rpc test comments\n\n* chore(coding-agent): remove redundant CLI comments\n\n* chore(agent): remove redundant comments\n\n* chore(tui): remove redundant source comments\n\n* chore(coding-agent): remove redundant mode comments\n\n* chore(coding-agent): remove redundant mode comments\n\n* chore(coding-agent): remove redundant test comments\n\n* chore(ai): remove redundant source comments\n\n* chore(coding-agent): remove redundant session comments\n\n* chore(coding-agent): remove redundant core comments\n\n* chore(coding-agent): remove redundant test comments\n\n* chore(tests): remove redundant test comments\n\n* chore: remove unused internal helpers\n\n* docs: restore public API contracts\n\n* chore(coding-agent): restore invariant documentation\n\n* chore(coding-agent): clarify agent family contracts\n\n* style(coding-agent): format restored contracts\n\n* fix: restore intentional catch explanations"},{"name":"extensions","kind":"directory","size":0,"lastCommitHash":"bee1dc826360b82ca9d943ca856cd2863f597297","lastCommitWhen":"2026-09-01T22:34:13+09:00","lastCommitMessage":"feat(coding-agent): add loss-bounded compaction projection\n"},{"name":"kernel","kind":"directory","size":0,"lastCommitHash":"94f25d4f34f31f4b5a096834097edd9ccb1a2992","lastCommitWhen":"2026-09-01T22:32:33+09:00","lastCommitMessage":"feat(coding-agent): add root session controls\n"},{"name":"mcp","kind":"directory","size":0,"lastCommitHash":"a3d86fbe593df760febb5c5e945fe99c59022a63","lastCommitWhen":"2026-08-21T14:02:30-07:00","lastCommitMessage":"fix(coding-agent): refresh MCP providers after add (#1629)\n\n* fix(coding-agent): refresh MCP providers after add\n\n* fix(coding-agent): preserve legacy MCP login guidance"},{"name":"prompts","kind":"directory","size":0,"lastCommitHash":"94f25d4f34f31f4b5a096834097edd9ccb1a2992","lastCommitWhen":"2026-09-01T22:32:33+09:00","lastCommitMessage":"feat(coding-agent): add root session controls\n"},{"name":"refinement","kind":"directory","size":0,"lastCommitHash":"7e70aea03dcf78c97aa65cc2a8e1aeb2a068e5fe","lastCommitWhen":"2026-08-31T22:05:28+09:00","lastCommitMessage":"complete guarded RLM results and background completion wakeups\n"},{"name":"tools","kind":"directory","size":0,"lastCommitHash":"7e70aea03dcf78c97aa65cc2a8e1aeb2a068e5fe","lastCommitWhen":"2026-08-31T22:05:28+09:00","lastCommitMessage":"complete guarded RLM results and background completion wakeups\n"},{"name":"agent-messages.ts","kind":"file","size":22561,"lastCommitHash":"d167f61c2550b77c8c0991f73b8dfcca1d6e7ff5","lastCommitWhen":"2026-08-31T22:14:18+09:00","lastCommitMessage":"fix(rlm): persist failed children without false result readiness\n"},{"name":"agent-observe.ts","kind":"file","size":6206,"lastCommitHash":"cba2a919a7a9408c2811a77dcfd756cca110dc6a","lastCommitWhen":"2026-08-05T04:46:53+02:00","lastCommitMessage":"feat(coding-agent): narrow agent reach to the nuclear family (#597)\n\n* feat(coding-agent): narrow agent reach to the nuclear family\n\nImplement nuclear-family authorization for agent-origin messaging and observation, keep roots connected as virtual siblings, scope broadcasts and discovery to the family roster, and synchronize only root peers between workers.\n\nTrack B PR 3 of the recursive-agent-harness plan (PR 10 in the plan table)\n\n* fix(coding-agent): family-edge id fallback, canonical paths, broadcast receipts\n\nFinding 1: fall back to persisted parentSessionId when sibling path edges are mixed, with focused policy coverage.\n\nFinding 2: document the accepted hydrate-before-authorize follow-up at observe and send resolution.\n\nFinding 3: canonicalize worker family paths with the shared realpath-based helper and cover symlink aliases.\n\nFinding 4: settle every family broadcast delivery, preserving successful receipts and returning target/error entries for failures; teach the kernel skill to emit each successful receipt.\n\nFinding 5: document agent-observe's current same-worker visibility limit.\n\nFinding 6: document the accepted direct-socket trust boundary for agentOrigin without a source session.\n\n* fix(coding-agent): harden sibling-name uniqueness, roster context, and rename plumbing\n\n- reject inactive root and mixed-depth sibling name collisions (origin: PR #595)\n- reserve worker opens and daemon renames across asynchronous validation (origin: PR #595)\n- discover orphaned running children and report RLM heartbeat activity (origin: PR #595)\n- scope catalogs to callers and persisted parent headers (origin: PR #595)\n- propagate extension rename promises and clean failed runtime opens (origin: PR #595)\n\n* fix(coding-agent): surface child failures, gate a2a doctrine, close errored children, unhang reach rejections\n\n- sanitize family relationship labels for parse-safe queue clearing (origin: PR #596)\n- gate a2a and observation doctrine on installed Python skills (origin: PR #596)\n- release failed or cancelled daemon children to close zombie sessions (origin: PR #596)\n- inject child failure notices and retain errored registry entries (origin: PR #596)\n- isolate post-send roster bookkeeping failures from delivery receipts (origin: PR #596)\n- reset replied state on accepted or queued parent follow-ups (origin: PR #596)\n- fail family-reach rejections without remote retry delay (origin: PR #597)\n\n* fix(coding-agent): passive child status fidelity, scoped name reservations, authorize before hydration\n\nFinding 101 (PR #597): map retained running registry rows to error in passive child snapshots.\n\nFinding 102 (PR #596): scope concurrent name reservations by depth and parent identity.\n\nFinding 103 (PR #597): authorize passive send and observe targets from persisted family metadata before hydration.\n\nCI hardening (PR #595): expose the supervisor message response when the sibling-delivery assertion fails.\n\n* test(coding-agent): make sibling delivery process test keyless\n\nCI ran this process test without provider credentials, so delivering to the idle target synchronously started its turn and propagated model-auth preflight failure through the worker receipt. This is existing main behavior for both cross-worker and intra-worker sends, not coupling introduced by the family-reach stack.\n\nKeep genuine cross-worker routing and agent-origin family authorization coverage, but hold the target busy with the process suite's existing blocking-bash fixture. The message is then admitted through the established queued path without requiring a model, and the assertion now verifies that queued receipt.\n\n* fix(coding-agent): surface nonresident child outcomes in rlm.list_subagents\n\nCarry passive registry outcomes through daemon agent summaries and map noncompleted nonresident children to errors while preserving completed results.\n\nAdd deterministic coverage for running and completed passive children.\n\nOrigin: PR #597 review\n\n* refactor(coding-agent): drop agent_message compat surfaces\n\nlist_agents subsumes roster; positional send removed except the all broadcast; origin: user decision on PR #595-#597 migration shims\n\n* fix(coding-agent): header-parent family edges, canonical catalog paths, broadcast guard, passive children in observe list\n\nOrigin: PR #597 review round 4 + agent-observe discovery report.\n\n* fix(coding-agent): session-relative header parents, unified relationship labeling, ipython-gated reply doctrine\n\nResolve persisted relative parentSession headers against the child session file for family reach and both name-reservation paths. Reuse the family catalog relationship logic when labeling messages so reopened children retain parent/child attribution.\n\nThe reply-doctrine gate belongs conceptually in #596 (where the doctrine originated), but lands here at the current stack head because the same line is present and this verification round targets e5a69d644.\n\n* fix(coding-agent): compute fromRelationship from the recipient's perspective\n\n* fix(coding-agent): serialize family names and child teardown\n\n- Reserve sibling-scoped names in the supervisor for creates and renames.\n- Persist cancelled hosted-child deletion before runtime teardown.\n- Reject parentless deep sessions as nuclear-family siblings.\n- Retain errored startup deletion tombstones until failure handling settles.\n\n* fix(coding-agent): harden family naming authorization\n\n- Prefer persisted header parents over stale runtime spawn metadata for family authorization.\n- Encode supervisor name reservation scopes structurally to prevent key collisions.\n- Hold active saved-session rename reservations through worker completion.\n\n* fix(coding-agent): secure worker renames and child cleanup\n\n- Authenticate worker-originated session renames against the resident worker token while preserving client ownership isolation.\\n- Fully remove settled errored child runs and hide detached deletions from listings and name reservations.\n\n* fix(coding-agent): share the structural name-reservation key; never strand cancelled children\n\nThe worker-side sessionNameReservationKey still colon-joined its parts\nwhile the supervisor had moved to structural JSON encoding, so parent\npaths or names containing colons could collide into one reservation key\nand spuriously block concurrent renames in a worker. Both sides now use\none shared structural encoder in core/agent-messages.\n\nreleaseRlmSubagentRuntime recorded the cancellation deletion boundary\nbefore locating the child session; a registry failure there returned\nearly and left the cancelled child resident and listed while the caller\ndisposed its runtime. The deletion error is now deferred until after the\nsession is closed or the runtime disposed.\n\n* fix(coding-agent): disambiguate family targets by reach\n\nObserving or messaging a family member by roster name failed with an\nambiguity error when an unrelated agent shared the name, because global\nresolution threw before the reach check. Ambiguous name matches are now\nre-filtered by family reachability and resolve when exactly one\nreachable candidate remains.\n\n* fix(coding-agent): normalize depth-zero family scope\n\n- Ignore fork lineage when building depth-zero family catalog entries so roots remain sibling-reachable.\n- Collapse depth-zero name reservations to root scope and omit parent identity from rename reservations.\n\n* fix(coding-agent): preserve family target identity\n\n- Preserve legacy parent edges when RLM depth is unknown.\n- Resolve reachable ambiguities across both session IDs and names.\n- Reserve deleted child names until startup settles and skip cancelled publication.\n\n* fix(coding-agent): notify parents of terminal child runs\n\n- Inject a host cancellation notice while keeping explicit deletion silent.\n- Inject a completed-without-reply notice with the child's last assistant preview.\n- Suppress terminal notices after an explicit child-to-parent reply.\n- Render child terminal notices as injected prompt panels.\n\n* fix(coding-agent): preserve child reply completion state\n\n- Track successful child-to-parent replies monotonically for each child run.\n- Suppress false no-reply notices when a later parent message resets latest-task reply state.\n- Add regression coverage for reply-then-parent-follow-up completion.\n\n* fix(coding-agent): let terminal child sends reach roster\n\n- Ignore retained failed child runs when resolving pending child publications.\n- Fall through delete-before-startup tombstones to normal roster resolution.\n- Cover healthy roster shadowing and missing-child tombstone regressions.\n\n* fix(coding-agent): preserve completed child message bridge\n\n- Allow completed runs to bridge RLM child IDs to published session IDs during terminal injection.\n- Keep failed, cancelled, and detached-deletion runs excluded from publication bridging.\n- Cover ID-addressed delivery while completion-message injection is blocked."},{"name":"agent-session-config.ts","kind":"file","size":5954,"lastCommitHash":"d98d0762c0dea0e4d176233c03965dc05a8b33bf","lastCommitWhen":"2026-08-20T10:52:30+02:00","lastCommitMessage":"feat(acp): harden resident session lifecycle (#1494)\n\n* feat(acp): harden resident session lifecycle\n\n* test(daemon): align recovery fixtures with durable context\n\n* fix(acp): validate durable host settings\n\n* fix(daemon): clean up failed resident resources\n\n* fix(daemon): recover owned workers from fresh context\n\n* fix(acp): verify authoritative completion state\n\n* fix(daemon): refresh requested child roster\n\n* fix(acp): read child roster without reattaching\n\n* fix(daemon): preserve telemetry opt-out on recovery\n\n* fix(daemon): scope resident path conflicts\n\n* test(acp): remove runtime publish hook\n\n* fix(acp): drain admitted updates on close\n\n* fix(daemon): merge fresh supervisor defaults\n\n* fix(acp): await autonomous lifecycle settlement\n\n* fix(acp): preserve daemon input fences\n\n* fix(acp): serialize terminal lifecycle turns\n\n* fix(acp): reacquire daemon fences after reconnect\n\n* fix(acp): fail closed across abort cuts\n\n* fix(acp): resume queued input after pause\n\n* fix(acp): invalidate pending pumps on pause\n\n* fix(acp): preserve pause ownership through supervisor\n\n* fix(acp): fail closed on pause cleanup loss\n\n* test(daemon): initialize pause ownership harness\n\n* fix(acp): fence detach pause cleanup\n\n* fix(daemon): preserve detach-all cleanup\n\n* test(daemon): initialize worker pause registry\n\n* fix(daemon): reacquire pauses across release\n\n* fix(daemon): clear stable detach selectors\n\n* fix(daemon): retain detach fences on attach failure\n\n* refactor(daemon): keep descriptor validation private\n\n* docs(changelog): describe ACP lifecycle fencing\n\n* fix(acp): settle restart and failed close lifecycle\n\n* fix(acp): serialize cancel after failed close\n\n* fix(acp): preserve lifecycle reconciliation ordering\n\n* fix(acp): settle deleted child runtimes\n\n* test(acp): consolidate child deletion regressions\n\n* fix(acp): rearm settled child deletion\n\n* fix(acp): preserve recursive terminal settlement\n\n* test(acp): update terminal notice regression"},{"name":"agent-session-runtime.ts","kind":"file","size":24523,"lastCommitHash":"878bf91309c9dfa8030245019a17cf411920fd4b","lastCommitWhen":"2026-08-31T21:52:03+09:00","lastCommitMessage":"feat(coding-agent): unify RLM subagent lifecycle, messaging, and observation on rlm\n\n- rlm() and rlm.list_subagents() return one mutable RLMSubagent handle owning refresh, send, observe, info, result, and delete; RLMSpawnHandle is removed\n- agent messaging and observation move into rlm (send_parent, send_sibling, send_child, family, observe, info); agent_message.* and agent_observe.* host routes register whenever their controllers exist, independent of skill visibility\n- bundled agent-message and agent-observe skills are no longer model-visible; prompts document the rlm-native surface only\n- composable schema-validated result and context-admission contracts for RLM subagents\n- docs and changelog fragments updated for the unified surface\n"},{"name":"agent-session-services.ts","kind":"file","size":10645,"lastCommitHash":"94f25d4f34f31f4b5a096834097edd9ccb1a2992","lastCommitWhen":"2026-09-01T22:32:33+09:00","lastCommitMessage":"feat(coding-agent): add root session controls\n"},{"name":"agent-session.ts","kind":"file","size":459059,"lastCommitHash":"bee1dc826360b82ca9d943ca856cd2863f597297","lastCommitWhen":"2026-09-01T22:34:13+09:00","lastCommitMessage":"feat(coding-agent): add loss-bounded compaction projection\n"},{"name":"agent-sessions.ts","kind":"file","size":7184,"lastCommitHash":"94f25d4f34f31f4b5a096834097edd9ccb1a2992","lastCommitWhen":"2026-09-01T22:32:33+09:00","lastCommitMessage":"feat(coding-agent): add root session controls\n"},{"name":"agent-traces.ts","kind":"file","size":29087,"lastCommitHash":"a9a8655037b009036c1fbcc4bb66aed65afcb532","lastCommitWhen":"2026-08-17T10:52:38-07:00","lastCommitMessage":"fix(daemon): drop deleted rlm children's kernel state and dedupe artifact paths (#1450)\n\n* refactor: canonical session artifact path helpers in session-manager\n\n* fix(daemon): drop a deleted rlm child's nested artifact dir, keep the transcript\n\n* feat(daemon): bounded per-parent reaper for tombstoned rlm child artifact dirs\n\n* fix(daemon): re-sweep artifact dirs resurrected by teardown snapshots\n\n* test(daemon): artifact-dir deletion, best-effort rm, reaper bounds, path helper equivalence\n\n* fix(daemon): guard degenerate session-file names in the artifact reaper\n\nAlso sweep every tombstoned edge on retry-heal, skip the chmod rm-failure test as root, and pin the depth-2 transcript boundary.\n\n* docs: trim redundant policy comments to repo discipline\n\n* fix(daemon): re-sweep artifact dirs even when child teardown throws\n\n* fix(daemon): never let jobs-store errors mask a child deletion\n\nPre-round-2 a cancel throw on the healthy path propagated as a deletion\nfailure. Swallowing it is deliberate: both tombstones are durable by this\npoint, the reaper and retry-heal converge on leftover state, and a deletion\nshould not fail over jobs-store bookkeeping.\n\n* revert(daemon): drop the orphan-artifact reaper, keep the deletion hook\n\nNew children never orphan artifact dirs once the deletion hook exists; the pre-fix garbage is a one-time mess not worth a permanent mechanism in the deletion path. The degenerate-basename guard keeps direct coverage via deleteSessionArtifacts.\n\n* fix(ai): stabilize Cloudflare gateway model test\n\n---------\n\nCo-authored-by: Seth <seth@primeintellect.ai>"},{"name":"auth-guidance.ts","kind":"file","size":2241,"lastCommitHash":"f3130cc518dada33e4933e2c14d9ebbb940009d5","lastCommitWhen":"2026-07-08T11:50:59-07:00","lastCommitMessage":"mark stale provider auth after repeated failures (#335)\n\n* fix stale provider auth after repeated failures\n\n* fix stale auth source fallbacks\n\n* fix stale auth review edge cases\n\n* fix stale auth login display\n\n* fix stale auth retry edge cases\n\n* fix stale auth source fingerprints\n\n* fix stale auth source tracking\n\n* fix stale models json key rotation\n\n* fix stale auth final guidance\n\n* fix auth guidance regression test\n\n* fix stale auth login ordering\n\n* fix auth stale retry cancellation"},{"name":"auth-storage.ts","kind":"file","size":34623,"lastCommitHash":"bb61ca21c3e27a5d2af7fab3ab662789a5e478d2","lastCommitWhen":"2026-08-20T17:21:33+02:00","lastCommitMessage":"fix(coding-agent): close MCP runtime review follow-ups (#1585)\n\n* fix(coding-agent): close MCP runtime review follow-ups\n\n- drop the mcp:<name> credential on every add, not only replaces: a fresh\n  add can repoint a name an authored non-catalog skill (e.g. slack) resolves\n  via mcp.config, and the stored token must never replay there\n- keep the kernel MCP close budget strictly inside the host kill deadline\n  (2.5s + 1s dispatch < 5s) and pin the relationship in a test\n- include kernel exit in the host's first shutdown race so a kernel that\n  dies without shutdown_reply finishes promptly instead of eating the deadline\n- close a shutdown race that dropped a just-opened generation from the\n  registry without closing it, leaving its server process running\n- run kernel-mcp-shutdown.test.ts in test:kernel and the Python runtime\n  tests in CI; gate the E2E on module availability instead of an exact\n  ipykernel version that silently skipped the suite\n- pin mcp>=2,<3, require Python >=3.11 (asyncio.timeout), and resolve the\n  streamable-HTTP transport via mcp_base instead of new-only + private imports\n- shield sibling generation closes from a failing close in shutdown/reload\n- reject a quoted-empty mcp add option value deterministically\n\n* fix: keep SSE-friendly read timeouts and handled shutdown races\n\nMatch the SDK factory's timeouts (30s ops / 300s reads) on the http_client\ntransport path in both the generic runtime and mcp_base, keeping reads above\nthe configured per-call timeout; an httpx default client caps reads at 5s and\na flat 30s cap drops quiet streams whose server sends no pings. Attach a\nrejection handler to the abandoned graceful-reply composite so a late send\nfailure cannot surface as an unhandled rejection.\n\n* docs: compress comments to single-line invariants\n\n* fix: give the http_client transport its companion client and stop following redirects\n\nThe mcp 2.x transport calls client.sse() for server-initiated streams and\nreconnects; a plain httpx client has no such method, so the GET stream died\nin a silent reconnect loop (AttributeError swallowed by the retry). Both\nfallback paths now build an httpx2 client with the SDK-factory timeouts.\nRedirects are disabled on these clients: httpx only strips Authorization on\ncross-origin redirects, so configured secret headers would follow a\nredirecting endpoint. httpx itself is no longer used and leaves the runtime\ndependencies (added by #1495 for the code this replaces).\n\n* fix: stop authored integrations honoring mcpServers overrides and fail credential drops closed\n\nAn authored McpIntegration resolved its URL through mcp.config, so a\nsame-named user entry repointed it while its credentials — auth.json tokens\nor a bearer-token env var the add-time drop can never reach — followed as\nthe Authorization header. Authored integrations now always use their class\nURL; custom endpoints go through the generic runtime under their own name.\n\nThe add flow also persisted the new URL before dropping stored credentials,\nand the store records persistence failures instead of throwing, so a failed\nor silently skipped write left the old token armed against the new URL\nbehind a reported success. Drops now happen before the entry is persisted\nand drain the store's recorded errors, aborting the add on failure.\n\n* fix(coding-agent): make credential removal disk-verified instead of error-drain heuristics\n\nThree review rounds patched the same invariant at the call site: logout\nremoves memory before a persist that swallows failures (and silently no-ops\nafter a load error), so has() gating skipped retries and drainErrors missed\nthe loadError path entirely. The invariant now lives in the owning layer:\nAuthStorage.removeVerified performs the disk removal under lock, throws on\nany load or write failure, and only then updates memory — disk-authoritative\nand idempotent. dropServerCredentials shrinks to a try/rethrow around it.\n\nDrop-before-persist ordering is deliberate: a settings-flush failure after a\nverified drop strands the server on re-login (recoverable); the reverse\norder can strand an old token against a new URL (replay).\n\n* fix(coding-agent): keep the stale marker until a verified removal succeeds\n\nA failed removeVerified cleared the stored stale marker first, making a\nsuppressed credential selectable again while it survived on disk. Also\ncompress comments to single-line invariants.\n\n* fix: bind MCP OAuth tokens to the endpoint they were issued for\n\nAn in-flight login races retargeting: /mcp login captures the provider\nfor the old URL, awaits the browser, and a concurrent add --force drops\nthe credential and persists a new URL; the finishing login then stores\nan old-endpoint token under the same name and the runtime sends it to\nthe new URL. No ordering fixes this — the binding token<->endpoint\nexisted nowhere. Credentials now record the endpoint at issuance,\nrefreshes carry the original binding forward (no laundering), and both\nconsumers verify it: the kernel refuses to attach a foreign-bound token\nand the host treats it as not authed. Legacy unbound credentials keep\nworking.\n\n* fix(coding-agent): strip trailing slashes without a backtracking regex\n\nCodeQL flagged the /\\/+$/ anchor on stored-credential and settings input\nas polynomial; a two-line loop replaces it.\n\n* fix: require endpoint binding for user-declared MCP OAuth credentials\n\nAccepting unbound legacy credentials kept the replay window open: a\npre-update login can finish after a retarget and store an unbound token,\nand a refresh would have re-bound it to the current URL. User-declared\nservers now require an exact binding (host and kernel), and a refresh\nnever infers one. Builtin catalog integrations keep accepting stored\ncredentials — their URLs are code-constant and cannot be retargeted.\nBreaking: generic-server OAuth credentials stored before the binding\nexisted require one /mcp login.\n\n* chore: trim a narrating test comment and compress the _bound_auth docstring\n\n* chore: reframe unbound-credential refusal as standing behavior, not migration wording\n\n* fix: compare MCP endpoint bindings exactly\n\nTrailing-slash normalization ran on the whole URL string, so a slash\nthat is part of the query unified distinct targets (?tenant=trusted/\nmatched ?tenant=trusted). Both strings come from the same settings\nentry, so any difference means the entry changed: compare exactly.\nAlso retires the stripTrailingSlashes helper."},{"name":"autonomous.ts","kind":"file","size":18116,"lastCommitHash":"4d19005d4a25b10ce6d90fdd4961ed374c64ea17","lastCommitWhen":"2026-07-13T17:47:15-07:00","lastCommitMessage":"isolate daemon sessions in worker processes (#383)\n\n* perf(coding-agent): add large daemon attach benchmark\n\n* feat(coding-agent): isolate session execution in workers\n\n* fix(coding-agent): reconnect after supervisor replacement\n\n* fix(tui): preserve input across fullscreen handoff\n\n* fix(coding-agent): prevent archived heartbeat revival\n\n* fix(coding-agent): cancel orphan heartbeat sessions\n\n* fix(tui): preserve drafts across daemon refreshes\n\n* fix(coding-agent): separate daemon resyncs from replacements\n\n* fix(coding-agent): stabilize daemon streaming ui\n\n* refactor(coding-agent): remove obsolete subagent tree\n\n* feat(coding-agent): show subagent recaps inline\n\n* fix(coding-agent): refine subagent summary spacing\n\n* fix(coding-agent): preserve full subagent row selection\n\n* fix(coding-agent): align subagent summary rows\n\n* fix(coding-agent): preserve reasoning during daemon resync\n\n* fix(coding-agent): isolate heartbeat scheduling per worker (ENG-4527)\n\n* fix(coding-agent): retry partial daemon reconnects\n\n* fix(coding-agent): harden isolated daemon recovery\n\n* fix(coding-agent): close daemon recovery races\n\n* fix(coding-agent): validate daemon recovery state\n\n* fix(coding-agent): close isolated worker recovery gaps\n\n* fix(coding-agent): verify orphan process identity\n\n* fix(coding-agent): isolate worker client capabilities\n\n* fix(coding-agent): preserve daemon terminal ordering\n\n* fix(coding-agent): serialize durable daemon state\n\n* fix(coding-agent): avoid duplicate worker recovery\n\n* fix(coding-agent): isolate peer sync failures\n\n* fix(coding-agent): fail unanswered rpc commands\n\n* fix(coding-agent): distinguish lease contention"},{"name":"bash-executor.ts","kind":"file","size":3920,"lastCommitHash":"032e3ee74574ca16efaf8745a1394b821256a5d0","lastCommitWhen":"2026-08-18T12:17:35+02:00","lastCommitMessage":"chore: remove redundant comments and unused internals (#1505)\n\n* chore: remove redundant comments\n\n* chore(tui): remove redundant export comments\n\n* chore(coding-agent): remove redundant example comments\n\n* chore(ai): remove redundant comments\n\n* chore(coding-agent): remove obsolete core comments\n\n* chore(coding-agent): remove redundant test comments\n\n* chore(coding-agent): remove redundant test comments\n\n* chore(coding-agent): remove redundant rpc test comments\n\n* chore(coding-agent): remove redundant CLI comments\n\n* chore(agent): remove redundant comments\n\n* chore(tui): remove redundant source comments\n\n* chore(coding-agent): remove redundant mode comments\n\n* chore(coding-agent): remove redundant mode comments\n\n* chore(coding-agent): remove redundant test comments\n\n* chore(ai): remove redundant source comments\n\n* chore(coding-agent): remove redundant session comments\n\n* chore(coding-agent): remove redundant core comments\n\n* chore(coding-agent): remove redundant test comments\n\n* chore(tests): remove redundant test comments\n\n* chore: remove unused internal helpers\n\n* docs: restore public API contracts\n\n* chore(coding-agent): restore invariant documentation\n\n* chore(coding-agent): clarify agent family contracts\n\n* style(coding-agent): format restored contracts\n\n* fix: restore intentional catch explanations"},{"name":"context-tree.ts","kind":"file","size":9998,"lastCommitHash":"032e3ee74574ca16efaf8745a1394b821256a5d0","lastCommitWhen":"2026-08-18T12:17:35+02:00","lastCommitMessage":"chore: remove redundant comments and unused internals (#1505)\n\n* chore: remove redundant comments\n\n* chore(tui): remove redundant export comments\n\n* chore(coding-agent): remove redundant example comments\n\n* chore(ai): remove redundant comments\n\n* chore(coding-agent): remove obsolete core comments\n\n* chore(coding-agent): remove redundant test comments\n\n* chore(coding-agent): remove redundant test comments\n\n* chore(coding-agent): remove redundant rpc test comments\n\n* chore(coding-agent): remove redundant CLI comments\n\n* chore(agent): remove redundant comments\n\n* chore(tui): remove redundant source comments\n\n* chore(coding-agent): remove redundant mode comments\n\n* chore(coding-agent): remove redundant mode comments\n\n* chore(coding-agent): remove redundant test comments\n\n* chore(ai): remove redundant source comments\n\n* chore(coding-agent): remove redundant session comments\n\n* chore(coding-agent): remove redundant core comments\n\n* chore(coding-agent): remove redundant test comments\n\n* chore(tests): remove redundant test comments\n\n* chore: remove unused internal helpers\n\n* docs: restore public API contracts\n\n* chore(coding-agent): restore invariant documentation\n\n* chore(coding-agent): clarify agent family contracts\n\n* style(coding-agent): format restored contracts\n\n* fix: restore intentional catch explanations"},{"name":"cron-jobs.ts","kind":"file","size":54071,"lastCommitHash":"a9a8655037b009036c1fbcc4bb66aed65afcb532","lastCommitWhen":"2026-08-17T10:52:38-07:00","lastCommitMessage":"fix(daemon): drop deleted rlm children's kernel state and dedupe artifact paths (#1450)\n\n* refactor: canonical session artifact path helpers in session-manager\n\n* fix(daemon): drop a deleted rlm child's nested artifact dir, keep the transcript\n\n* feat(daemon): bounded per-parent reaper for tombstoned rlm child artifact dirs\n\n* fix(daemon): re-sweep artifact dirs resurrected by teardown snapshots\n\n* test(daemon): artifact-dir deletion, best-effort rm, reaper bounds, path helper equivalence\n\n* fix(daemon): guard degenerate session-file names in the artifact reaper\n\nAlso sweep every tombstoned edge on retry-heal, skip the chmod rm-failure test as root, and pin the depth-2 transcript boundary.\n\n* docs: trim redundant policy comments to repo discipline\n\n* fix(daemon): re-sweep artifact dirs even when child teardown throws\n\n* fix(daemon): never let jobs-store errors mask a child deletion\n\nPre-round-2 a cancel throw on the healthy path propagated as a deletion\nfailure. Swallowing it is deliberate: both tombstones are durable by this\npoint, the reaper and retry-heal converge on leftover state, and a deletion\nshould not fail over jobs-store bookkeeping.\n\n* revert(daemon): drop the orphan-artifact reaper, keep the deletion hook\n\nNew children never orphan artifact dirs once the deletion hook exists; the pre-fix garbage is a one-time mess not worth a permanent mechanism in the deletion path. The degenerate-basename guard keeps direct coverage via deleteSessionArtifacts.\n\n* fix(ai): stabilize Cloudflare gateway model test\n\n---------\n\nCo-authored-by: Seth <seth@primeintellect.ai>"},{"name":"defaults.ts","kind":"file","size":132,"lastCommitHash":"3e5ad67e0f325d4888f82f9b82966218eb4407f5","lastCommitWhen":"2026-05-07T15:59:42+02:00","lastCommitMessage":"chore: migrate pi packages to earendil works scope\n"},{"name":"diagnostics.ts","kind":"file","size":452,"lastCommitHash":"4719929f6a18ec897b6c0af00c51177df2efc9cb","lastCommitWhen":"2026-01-24T00:45:01+01:00","lastCommitMessage":"refactor(coding-agent): unify SkillWarning and ResourceDiagnostic\n\n- Create shared diagnostics.ts with ResourceCollision and ResourceDiagnostic types\n- Update loadSkills() to return diagnostics instead of warnings\n- Remove SkillWarning type and skillWarningsToDiagnostics() conversion\n- Update skills.test.ts to use diagnostics\n"},{"name":"event-bus.ts","kind":"file","size":795,"lastCommitHash":"be330fdd9caebbea8bb7e3df7669703b40843e7f","lastCommitWhen":"2026-01-04T22:04:50+01:00","lastCommitMessage":"Fix event bus async error handling, clear pending messages on session switch, improve SDK docs\n\n- event-bus.ts: await async handlers to catch errors properly\n- agent-session.ts: clear _pendingNextTurnMessages on newSession/switchSession/branch\n- sdk.ts: make eventBus first (required) param for discoverHooks/discoverCustomTools\n- docs/sdk.md: document eventBus sharing pattern for hook/tool communication\n"},{"name":"exec.ts","kind":"file","size":3160,"lastCommitHash":"032e3ee74574ca16efaf8745a1394b821256a5d0","lastCommitWhen":"2026-08-18T12:17:35+02:00","lastCommitMessage":"chore: remove redundant comments and unused internals (#1505)\n\n* chore: remove redundant comments\n\n* chore(tui): remove redundant export comments\n\n* chore(coding-agent): remove redundant example comments\n\n* chore(ai): remove redundant comments\n\n* chore(coding-agent): remove obsolete core comments\n\n* chore(coding-agent): remove redundant test comments\n\n* chore(coding-agent): remove redundant test comments\n\n* chore(coding-agent): remove redundant rpc test comments\n\n* chore(coding-agent): remove redundant CLI comments\n\n* chore(agent): remove redundant comments\n\n* chore(tui): remove redundant source comments\n\n* chore(coding-agent): remove redundant mode comments\n\n* chore(coding-agent): remove redundant mode comments\n\n* chore(coding-agent): remove redundant test comments\n\n* chore(ai): remove redundant source comments\n\n* chore(coding-agent): remove redundant session comments\n\n* chore(coding-agent): remove redundant core comments\n\n* chore(coding-agent): remove redundant test comments\n\n* chore(tests): remove redundant test comments\n\n* chore: remove unused internal helpers\n\n* docs: restore public API contracts\n\n* chore(coding-agent): restore invariant documentation\n\n* chore(coding-agent): clarify agent family contracts\n\n* style(coding-agent): format restored contracts\n\n* fix: restore intentional catch explanations"},{"name":"footer-data-provider.ts","kind":"file","size":9171,"lastCommitHash":"728ebde01f524379062073e376b1068021d40b9d","lastCommitWhen":"2026-06-21T14:46:38-07:00","lastCommitMessage":"store git commit, ref, and repo url in session traces (#208)\n\n* store git commit, ref, and repo url in session traces\n\n* read git state via git commands instead of parsing .git\n\n* make git dedup branch-aware and trace headers reflect latest commit\n\n* make trace git headers branch-aware\n\n* capture git context in forked session headers\n\n* trim redundant comments on git-context code\n\n* capture git context when forking a session file\n\n* drop source git_state entries when forking a session\n\n* trim git-context code comments to essentials\n\n* capture git state at end of turn to catch mid-run commits"},{"name":"goals.ts","kind":"file","size":9348,"lastCommitHash":"61eb64748eb077e2a084432db92d101a2a83e146","lastCommitWhen":"2026-08-26T15:24:10-07:00","lastCommitMessage":"Minimal CPython REPL runtime (rlm.repl) (#1685)\n\n* feat(coding-agent): add async-by-default bash() to the kernel runtime\n\n* chore(coding-agent): tighten bash() comments and changelog fragment\n\n* feat(coding-agent): add a standalone CPython REPL runtime speaking JSON lines over stdio\n\n* chore(coding-agent): tighten REPL runtime comments\n\n* feat(coding-agent): run the kernel on the REPL runtime over stdio\n\n* fix(coding-agent): reject pending host requests on kernel teardown\n\nThe runtime now fails pending host_request futures when stdin hits EOF or\na shutdown request arrives, so a cell awaiting a host reply can no longer\nblock _serve from consuming the shutdown and wedge the process. Startup\nand busy-kernel messages plus the ipython tool description now say Python\nkernel, matching the default REPL runtime client.\n\n* chore(coding-agent): describe the kernel-heavy test tag client-neutrally\n\n* feat(coding-agent): make the REPL runtime the only kernel\n\nRemoves the Jupyter/ipykernel/ZMQ kernel client, the fork server, the\nPRIME_AGENT_KERNEL escape hatch, and the %%bash/%cd/%env cell rewriting.\nMagic-style cells (%/%%/!) return a one-line error naming the Python or\nbash() replacement. The kernel venv no longer installs ipykernel;\nexisting venvs are rebuilt once via the bootstrap schema bump. Old\nsnapshot artifacts still restore through the runtime's pickle compat.\n\n* fix(coding-agent): close MCP transports in REPL shutdown\n\n* fix(coding-agent): address bash() review findings — exact tail retention, foreground-status lifecycle with group anchoring, post-kill forkserver reap, Windows start-id parity, executor-free await\n\n* fix(coding-agent): tree-kill bash() process trees on Windows and make running reflect group liveness\n\n* fix(runtime): address repl runtime review findings\n\n- revalidate targeted interrupts through SIGINT delivery so a stale signal\n  cannot cancel a later request\n- preserve a parked untargeted interrupt while another request is inflight\n- reject non-string interrupt ids and validate snapshot options\n  (prune_oversized bool, max_bytes/max_variable_bytes present => int)\n- guard str(exc) in error/skip/fail reasons so a broken __str__ cannot\n  kill the runtime\n- fail the snapshot when the manifest write fails (before any pruning)\n- report 'snapshot not found' reason on restore of a missing path\n- wait unbounded for the output-pump drain marker so done never precedes\n  captured output and marker bytes never leak\n- document that aggregate-cap skips are not pruned\n\n* fix(coding-agent): carry bash() status pipe as stdin so strict-POSIX shells accept single-digit fd redirections\n\n* fix(coding-agent): address host-swap review findings — runtime-neutral kernel wording, %cd/%env rewrite fidelity, linear-time magic regexes, restart supersession guard\n\n* fix(coding-agent): reject stale column-0 line magics on any cell line, not just the first\n\n* fix(coding-agent): close status fds when wake-pipe creation fails and gate bash() commands on orphan-journal registration\n\n* fix(coding-agent): strip quoted %cd targets, use UTF-16-safe %env parsing, and expand $var/${var} values PEP-215-style\n\n* fix(coding-agent): fail rlm.run fast outside a live kernel so vitest workers cannot hang on a comm that never replies\n\n* fix(coding-agent): clear the active cell id before terminal events so late background output is never tagged with a finished cell\n\n* fix(coding-agent): update legacy IPython-era tests to assert cutover behavior\n\n* fix(coding-agent): describe the column-0 magic scan without referencing the removed rewrite backend\n\n* fix(coding-agent): consume parked interrupts on compile failures and survive user-closed stdio in the drain path\n\n* fix(coding-agent): redact bare %env listings, prefer '=' in %env parsing, echo %cd targets, and keep graceful shutdowns owning their cleanup\n\n* fix(coding-agent): reject kernel startup promptly on spawn errors and commit %cd previous-dir tracking only after chdir succeeds\n\n* fix(coding-agent): trim ParsedIpythonBashCell to the body field its callers use\n\n* fix(coding-agent): kill full process trees in the Windows orphan reaper via taskkill /T\n\n* fix(coding-agent): survive compile-phase crashes and fd-reuse drain hangs in the REPL runtime\n\n* fix(coding-agent): shield snapshot prune deletions from interrupts and pin the host comm probe to its real seam\n\n* fix(coding-agent): route list_names through the per-request backstop and skip non-string namespace keys\n\n* fix(coding-agent): reject snapshot requests whose manifest path aliases the payload path\n\n* fix(coding-agent): reject negative snapshot size caps that would prune every user variable\n\n* fix(coding-agent): kill one-shot await bash() on cancel, resolve Windows helpers via System32, retry taskkill after reap, and fail closed on orphan-journal enrollment\n\n* fix(coding-agent): attribute REPL stream output at write time so raw fd and user-thread bytes never carry another cell's id\n\n* fix(coding-agent): surface unattributed REPL stream output as separate background output instead of dropping or merging it\n\n* fix(coding-agent): confirm group exit before a cancelled one-shot bash() await propagates and complete-write orphan-journal records\n\n* fix(coding-agent): expose a working sys.stdout.buffer on the tagged REPL writer routing bytes through the null-attributed raw channel\n\n* fix(coding-agent): mark between-cell background output truncated when the pending buffer cap is hit\n\n* fix(coding-agent): shield the cancelled-await bash() confirm-exit from re-cancellation, fail clearly without bash on Windows, and fence slow pumps out of result assembly\n\n* fix(coding-agent): survive hostile protocol lines in the REPL reader thread and interrupt without pthread_kill on Windows\n\n* fix(coding-agent): send the protocol shutdown from dispose() so the runtime closes MCP servers and kills live bash groups before the hard kill\n\n* fix(coding-agent): flag the pump's read-to-commit window so the bash() drain fence cannot miss an in-flight chunk\n\n* fix(coding-agent): guard the whole REPL request line against hostile input, reject duplicate in-flight ids, complete short buffer-pipe writes, and clean the snapshot temp file on KeyboardInterrupt\n\n* fix(coding-agent): drop stale between-cell background output on kernel teardown so it cannot surface after a restart\n\n* fix(coding-agent): assert the tagged channel only in the large buffer-write REPL test since cross-channel ordering is not guaranteed\n\n* fix(coding-agent): resolve taskkill via absolute System32 path in the host orphan reaper\n\n* fix(coding-agent): write the inactive orphan-journal record only after a delivered kill so undelivered signals leave the host reaper in charge\n\n* fix(coding-agent): keep a REPL request interrupt-targetable through its trailing-expression repr and output drain until done is emitted\n\n* fix(coding-agent): count an already-exited leader as delivered in the Windows bash() reap so clean exits still journal inactive\n\n* fix(coding-agent): reject NaN and Infinity in emit() payloads before they corrupt REPL protocol framing\n\n* chore(coding-agent): correct the stale ipykernel requirement on the python override doc\n\n* chore(coding-agent): drop migration-era wording from kernel comments\n\n* fix(coding-agent): resolve trusted absolute shell host-side and close Windows journal/reap gaps\n\n* fix(coding-agent): best-effort-kill pid-only orphan records in daemon force-stop and recovery reaps\n\n* refactor(coding-agent): drop the magic-cell rejection gate\n\n%-prefixed and !-prefixed cells now reach CPython and fail with its own\nSyntaxError, which names the offending line. The rejection layer guarded\nagainst model-produced IPython syntax, but with the shipped prompt fresh\nsessions do not produce it, and the plain SyntaxError is protection enough.\nparseIpythonBashCell stays: transcripts from ipykernel-era sessions render\n%%bash cells with shell highlighting forever.\n\n* fix(coding-agent): report a committed destructive snapshot as success even when an interrupt was parked\n\n* chore(ai): drop stray live-regen drift in models.generated.ts\n\nad657d7ec accidentally committed generate-models output produced by a local\nbuild; the catalog belongs to its own regen PRs.\n\n* test(coding-agent): expect a plain SyntaxError for legacy %%bash cells after the magic-rejection gate removal\n\n* fix(coding-agent): consume a finishing-targeted interrupt after a completed state request instead of failing the done\n\n* fix(coding-agent): exit the REPL runtime when its owner dies even during a busy cell\n\n* fix(coding-agent): resolve the kernel bash shell only from trusted absolute paths on Windows\n\n* fix(coding-agent): contain Windows bash children with kill-on-close job objects\n\n* test(coding-agent): cover owner death during a non-yielding REPL cell\n\n* fix(coding-agent): skip concurrently deleted names during snapshot instead of aborting\n\n* fix(coding-agent): fall back to taskkill when job termination fails\n\n* fix(coding-agent): stop telling REPL-default users they need ipykernel\n\n* fix(coding-agent): clear the SIGINT target when its request finishes\n\n* test(coding-agent): drop migration-era wording from the %%bash rejection comment\n\n* fix(coding-agent): start Windows bash children suspended and fail closed when job containment cannot be established\n\n* fix(coding-agent): re-assert the kernel SIGINT handler between cells so a cell rebinding SIGINT cannot break interrupts\n\n* fix(coding-agent): kill the whole tree for enriched orphan records on Windows force-stop\n\nstopTrackedProcess signals only the shell pid on Windows; use killOrphanProcess (taskkill /T) after the identity check, matching the owned-session-worker and daemon-supervisor reapers.\n\n* docs(coding-agent): describe current magic-cell behavior in release notes\n\nMagic-style cells fail with a plain SyntaxError; the migration error and %cd/%env rewrites were removed, so the notes stop claiming them.\n\n* fix(coding-agent): skip the liveness check when the orphan identity is stale\n\nA reused pid looked like a failed kill after the identity re-check skipped taskkill, blocking worker cleanup with a spurious failure.\n\n* fix(coding-agent): journal Windows bash() children before job assignment so a kernel kill mid-spawn cannot leak an unjournaled suspended process\n\n* fix(coding-agent): pre-create the Windows bash() job before spawn and contain the child before the journal start-id query\n\n* fix(coding-agent): create Windows bash() children atomically inside the kill-on-close job via PROC_THREAD_ATTRIBUTE_JOB_LIST, closing the Popen-to-assignment leak window\n\n* chore(coding-agent): compress the atomic-job-association comments to one-line rationale\n\n* fix(coding-agent): send duplicate-id protocol errors outside the interrupt lock and reject int payloads in the captured stdout buffer\n\n* docs(coding-agent): update the kernel provisioner docstring for the REPL/IPython split\n\n* fix(coding-agent): retain the Windows bash() process handle through job cleanup and taskkill fallbacks so a recycled pid can never be killed\n\n* fix(coding-agent): serialize Windows bash() abort cleanup under the kill lock so shutdown taskkill can never race the process-handle close\n\n* fix(coding-agent): commit REPL snapshot payload and manifest atomically via unique temp files with guaranteed cleanup and parked-SIGINT restore\n\n* fix(coding-agent): stage REPL restore before an interrupt-parked apply and recover committed snapshot/restore results from protocol interrupts so a committed operation is never misreported as failed\n\n* chore(coding-agent): compress restore-shield rationale comments to one line each\n\n* fix(coding-agent): surface unattributed background output in IPython cell details and render it after the traceback in the expanded cell view\n\n* docs(coding-agent): replace stale Jupyter comm vocabulary in rlm-runtime failure modes and focused validation with stdio-transport equivalents\n\n* docs(coding-agent): describe the REPL trust boundary and runtime-bootstrap failure in stdio terms and drop the removed TokenUsage export\n\n* fix(runtime): address REPL review findings\n\n* fix(runtime): preserve near-cap snapshots\n\n---------\n\nCo-authored-by: Seth <seth@primeintellect.ai>"},{"name":"index.ts","kind":"file","size":2794,"lastCommitHash":"878bf91309c9dfa8030245019a17cf411920fd4b","lastCommitWhen":"2026-08-31T21:52:03+09:00","lastCommitMessage":"feat(coding-agent): unify RLM subagent lifecycle, messaging, and observation on rlm\n\n- rlm() and rlm.list_subagents() return one mutable RLMSubagent handle owning refresh, send, observe, info, result, and delete; RLMSpawnHandle is removed\n- agent messaging and observation move into rlm (send_parent, send_sibling, send_child, family, observe, info); agent_message.* and agent_observe.* host routes register whenever their controllers exist, independent of skill visibility\n- bundled agent-message and agent-observe skills are no longer model-visible; prompts document the rlm-native surface only\n- composable schema-validated result and context-admission contracts for RLM subagents\n- docs and changelog fragments updated for the unified surface\n"},{"name":"keybindings.ts","kind":"file","size":13030,"lastCommitHash":"e64fbcbf33c8861db4b3ceb15c3ac9b1971cb824","lastCommitWhen":"2026-08-17T10:21:35+02:00","lastCommitMessage":"Add Ctrl+J to toggle edit diffs independently of tool output (#1388)\n\n* feat(coding-agent): add ctrl+j toggle to expand edit diffs independently of tool output\n\n* feat(coding-agent): make ctrl+j sole owner of edit-diff visibility and hint the summary line\n\n* fix(coding-agent): stop duplicating the ctrl+j hint on collapsed edits\n\nCollapsed built-in edits showed the hint twice: on the edit header and on\nthe summary line. The header hint now renders only when the diff is\nexpanded (where no summary line exists); collapsed rows keep the single\nhint on the summary line.\n\n* fix(coding-agent): keep the ctrl+j hint visible while no summary line renders\n\nGating the header hint on expansion assumed the collapsed summary line\nalways carries the cue, but that summary only mounts once a successful\nresult with a countable diff lands. During the preview-only window and on\nerror rows the diff was expandable with no visible hint.\n\nThe header now keeps the hint whenever the summary line is absent\n(mirroring its mount condition) and yields it once the summary renders,\nso exactly one hint is visible in every state.\n\n* fix(coding-agent): advertise the collapse key on expanded ipython diff headers\n\n* fix(coding-agent): move the expanded-diff collapse hint to the truncated cell header"},{"name":"logging.ts","kind":"file","size":935,"lastCommitHash":"189bb1466836a474ba98a25a0c3b43751f08fd43","lastCommitWhen":"2026-07-02T13:00:08-07:00","lastCommitMessage":"make provider failures diagnosable from logs (#313)\n\n* add structured logging and provider stream-failure classification\n\n* address review: reserved log keys, sink fallback, body request_id\n\n* address review: never auto-retry structured auth/invalid_request failures\n\n* address review: log serialization must survive circular refs and bigints\n\n* show users a concise classified error, keep the raw cause in the log"},{"name":"messages.ts","kind":"file","size":18903,"lastCommitHash":"b0023ef6c0a260b08f9c00d08e81f4106da7430e","lastCommitWhen":"2026-09-01T21:18:22+09:00","lastCommitMessage":"feat(coding-agent): add dot continuation shortcut\n"},{"name":"model-registry.ts","kind":"file","size":57019,"lastCommitHash":"378e32d5813087768ec3f34ed32901813a36744c","lastCommitWhen":"2026-08-28T14:15:16+02:00","lastCommitMessage":"refactor(coding-agent): remove test-only config cache reset APIs (#1849)"},{"name":"model-resolver.ts","kind":"file","size":22145,"lastCommitHash":"056014620853010778e478396b76ac04b3341864","lastCommitWhen":"2026-08-29T10:12:24+02:00","lastCommitMessage":"refactor(coding-agent): remove test-only parser and feature-hint seams (#1860)\n\n* refactor(coding-agent): remove test-only parser and feature-hint seams\n\n* test(coding-agent): restore provider-overlap and invalid-suffix warning coverage via public resolver API"},{"name":"new-session-command.ts","kind":"file","size":2349,"lastCommitHash":"05aa747fec4311e6361165d4d1ea93fe0c93fce4","lastCommitWhen":"2026-07-28T19:34:27+02:00","lastCommitMessage":"feat(coding-agent): start named sessions with prompts (#546)"},{"name":"orphan-process-journal.ts","kind":"file","size":5657,"lastCommitHash":"0940833b771fbaf5144451988604b310a96722fd","lastCommitWhen":"2026-08-26T14:41:46-07:00","lastCommitMessage":"Async bash() tool for the kernel runtime (#1684)\n\n* feat(coding-agent): add async-by-default bash() to the kernel runtime\n\n* chore(coding-agent): tighten bash() comments and changelog fragment\n\n* fix(coding-agent): address bash() review findings — exact tail retention, foreground-status lifecycle with group anchoring, post-kill forkserver reap, Windows start-id parity, executor-free await\n\n* fix(coding-agent): tree-kill bash() process trees on Windows and make running reflect group liveness\n\n* fix(coding-agent): carry bash() status pipe as stdin so strict-POSIX shells accept single-digit fd redirections\n\n* fix(coding-agent): close status fds when wake-pipe creation fails and gate bash() commands on orphan-journal registration\n\n* fix(coding-agent): kill full process trees in the Windows orphan reaper via taskkill /T\n\n* fix(coding-agent): kill one-shot await bash() on cancel, resolve Windows helpers via System32, retry taskkill after reap, and fail closed on orphan-journal enrollment\n\n* fix(coding-agent): confirm group exit before a cancelled one-shot bash() await propagates and complete-write orphan-journal records\n\n* fix(coding-agent): shield the cancelled-await bash() confirm-exit from re-cancellation, fail clearly without bash on Windows, and fence slow pumps out of result assembly\n\n* fix(coding-agent): flag the pump's read-to-commit window so the bash() drain fence cannot miss an in-flight chunk\n\n* fix(coding-agent): resolve taskkill via absolute System32 path in the host orphan reaper\n\n* fix(coding-agent): write the inactive orphan-journal record only after a delivered kill so undelivered signals leave the host reaper in charge\n\n* fix(coding-agent): count an already-exited leader as delivered in the Windows bash() reap so clean exits still journal inactive\n\n* fix(coding-agent): resolve trusted absolute shell host-side and close Windows journal/reap gaps\n\n* fix(coding-agent): best-effort-kill pid-only orphan records in daemon force-stop and recovery reaps\n\n* fix(coding-agent): resolve the kernel bash shell only from trusted absolute paths on Windows\n\n* fix(coding-agent): contain Windows bash children with kill-on-close job objects\n\n* fix(coding-agent): fall back to taskkill when job termination fails\n\n* fix(coding-agent): start Windows bash children suspended and fail closed when job containment cannot be established\n\n* fix(coding-agent): kill the whole tree for enriched orphan records on Windows force-stop\n\nstopTrackedProcess signals only the shell pid on Windows; use killOrphanProcess (taskkill /T) after the identity check, matching the owned-session-worker and daemon-supervisor reapers.\n\n* fix(coding-agent): skip the liveness check when the orphan identity is stale\n\nA reused pid looked like a failed kill after the identity re-check skipped taskkill, blocking worker cleanup with a spurious failure.\n\n* fix(coding-agent): journal Windows bash() children before job assignment so a kernel kill mid-spawn cannot leak an unjournaled suspended process\n\n* fix(coding-agent): pre-create the Windows bash() job before spawn and contain the child before the journal start-id query\n\n* fix(coding-agent): create Windows bash() children atomically inside the kill-on-close job via PROC_THREAD_ATTRIBUTE_JOB_LIST, closing the Popen-to-assignment leak window\n\n* chore(coding-agent): compress the atomic-job-association comments to one-line rationale\n\n* fix(coding-agent): retain the Windows bash() process handle through job cleanup and taskkill fallbacks so a recycled pid can never be killed\n\n* fix(coding-agent): serialize Windows bash() abort cleanup under the kill lock so shutdown taskkill can never race the process-handle close"},{"name":"output-guard.ts","kind":"file","size":2009,"lastCommitHash":"f1fe49a641cfd7698325a0c9024a127c50a104a9","lastCommitWhen":"2026-03-22T21:21:29+01:00","lastCommitMessage":"fix(coding-agent): reserve stdout in print and json mode closes #2482\n"},{"name":"package-manager.ts","kind":"file","size":75327,"lastCommitHash":"032e3ee74574ca16efaf8745a1394b821256a5d0","lastCommitWhen":"2026-08-18T12:17:35+02:00","lastCommitMessage":"chore: remove redundant comments and unused internals (#1505)\n\n* chore: remove redundant comments\n\n* chore(tui): remove redundant export comments\n\n* chore(coding-agent): remove redundant example comments\n\n* chore(ai): remove redundant comments\n\n* chore(coding-agent): remove obsolete core comments\n\n* chore(coding-agent): remove redundant test comments\n\n* chore(coding-agent): remove redundant test comments\n\n* chore(coding-agent): remove redundant rpc test comments\n\n* chore(coding-agent): remove redundant CLI comments\n\n* chore(agent): remove redundant comments\n\n* chore(tui): remove redundant source comments\n\n* chore(coding-agent): remove redundant mode comments\n\n* chore(coding-agent): remove redundant mode comments\n\n* chore(coding-agent): remove redundant test comments\n\n* chore(ai): remove redundant source comments\n\n* chore(coding-agent): remove redundant session comments\n\n* chore(coding-agent): remove redundant core comments\n\n* chore(coding-agent): remove redundant test comments\n\n* chore(tests): remove redundant test comments\n\n* chore: remove unused internal helpers\n\n* docs: restore public API contracts\n\n* chore(coding-agent): restore invariant documentation\n\n* chore(coding-agent): clarify agent family contracts\n\n* style(coding-agent): format restored contracts\n\n* fix: restore intentional catch explanations"},{"name":"prime-inference-auth.ts","kind":"file","size":20646,"lastCommitHash":"cad81d9b682c04bf559c28ac168634c0c14b4375","lastCommitWhen":"2026-07-06T15:46:06-07:00","lastCommitMessage":"sync prime auth with prime cli (#322)\n\n* fix(coding-agent): sync prime auth with cli\n\n* fix(coding-agent): update sdk example model\n\n* fix(coding-agent): harden prime cli auth storage\n\n* fix(coding-agent): preserve prime cli team reuse\n\n* fix(coding-agent): harden prime auth follow-ups\n\n* fix(coding-agent): align prime team status\n\n* fix(coding-agent): prioritize prime env team\n\n* fix(tests): align ci expectations\n\n* fix(coding-agent): persist reused prime cli auth\n\n* fix(coding-agent): preserve prime cli team on same key\n\n* fix(coding-agent): reconcile reused prime cli auth\n\n* fix(coding-agent): preserve legacy personal prime team"},{"name":"prime-inference-model-selection.ts","kind":"file","size":1088,"lastCommitHash":"a2bc615663993892a7dec49268ae6f5b8b5a96ea","lastCommitWhen":"2026-07-14T19:01:37-07:00","lastCommitMessage":"fix(coding-agent): persist prime inference model (#400)"},{"name":"prime-inference-models.ts","kind":"file","size":2395,"lastCommitHash":"ff669cd79990446f40686eb637d806b97eb7e9ef","lastCommitWhen":"2026-07-30T15:27:54+02:00","lastCommitMessage":"fix(coding-agent): stop blocking startup on private Prime Inference model authorization (#560)\n\n* fix(coding-agent): stop blocking startup on private Prime Inference model authorization\n\nrefreshAvailableModels() awaited a network request to the Prime\nInference model catalog on every call, including on the startup model\nresolution path (~350-600ms before first session was usable, worse on\nslow networks with a 10s timeout), and ignored PI_OFFLINE.\n\nThe authorization decision is now persisted next to models.json,\nfingerprinted by API key + team id. A matching cache is served without\nany network call; a stale cache triggers a deduplicated background\nrefresh that applies to subsequent lookups; a missing/mismatched cache\n(login, team switch) still fetches synchronously as before, and\nPI_OFFLINE skips all fetching.\n\n* chore: desloppify private model auth cache and drop generated-file churn\n\n* chore(coding-agent): remove private model auth cache tests\n\n* fix(coding-agent): key background auth refresh by credentials and verify fingerprint before applying\n\n* fix(coding-agent): recheck credentials after sync private model auth fetch"},{"name":"prompt-admission.ts","kind":"file","size":1294,"lastCommitHash":"2f218e15130904568a805ac8d1920927747d7791","lastCommitWhen":"2026-07-30T17:38:20+02:00","lastCommitMessage":"feat: unified agents and resume view (#541)\n\n* feat(coding-agent): unify searchable session view\n\n* fix(tui): keep session durations stable\n\n* test(daemon): tolerate partial session manager fixtures\n\n* test(tui): narrow session view race coverage\n\n* fix(tui): stabilize unified session catalogs\n\n* fix(tui): preserve session view lifecycle\n\n* fix(tui): preserve compact session view layout\n\n* test(tui): align cumulative session fixtures\n\n* fix(tui): preserve unified session identity and drafts\n\n* feat(tui): color recognized slash commands\n\n* fix(tui): keep view cancels and subagent matches local\n\n* test(tui): avoid platform-specific markdown styling\n\n* fix(tui): align session view status, reselect, and local resume flows\n\n* test(tui): consolidate slash command rendering coverage\n\n* test(tui): cover session view exit shutdown from chat\n\n* fix(tui): preserve dynamic command presentation\n\n* test(coding-agent): deadline-wait the create dedup race\n\n* test(coding-agent): align stacked fixtures\n\n* fix(tui): show seconds for sub-minute heartbeat countdowns\n\n* test(coding-agent): align cumulative session behavior\n\n* fix(coding-agent): flush child traces regardless of retention\n\n* fix(tui): single-own replacement catalog refresh\n\n* fix(tui): preserve drafts and completed child traces\n\n* fix(coding-agent): align template argument whitespace\n\n* fix(tui): restore saved sessions after reconnect\n\n* test(coding-agent): consolidate command presentation coverage\n\n* feat(tui): resume saved sessions from the reply composer\n\n* fix(tui): require heartbeat reconnect probe\n\n* test(coding-agent): align cumulative admission errors\n\n* fix(tui): schedule resumed replies from the resume summary\n\n* test(tui): align lifecycle stash handoff result\n\n* test(coding-agent): preserve unique lifecycle coverage\n\n* fix(tui): preserve inactive reply state on failures\n\n* fix(tui): route local agents view startup\n\n* refactor(tui): single-owner command catalog refresh\n\n* fix(tui): preserve selection after saved resume\n\n* test(tui): align startup lifecycle handoff\n\n* test(tui): resolve cumulative submit fixture\n\n* fix(tui): preserve in-flight reply drafts\n\n* test(tui): align owned startup exit shape\n\n* test(daemon): align delivery waiter contract\n\n* fix(tui): refresh resumed reply failures\n\n* fix(tui): preserve search selection\n\n* style(test): format cumulative prompt coverage\n\n* fix(agents-view): refresh reply target before send\n\n* fix(tui): complete onboarding before sessions\n\n* fix(tui): fence resync rendering by generation\n\n* refactor(coding-agent): consolidate prompt-admission cancellation\n\nExtract one shared waitForPromptAdmission helper and typed\nPromptAdmissionCancelledError into core/prompt-admission.ts, replacing\nthree near-identical copies in agent-session, daemon-mode, and\ndaemon-supervisor along with their copy-paste tests and the supervisor's\nstringly cancelled-status cast.\n\nAlso:\n- make _steeringStopPending a derived getter instead of a cached field\n  manually re-synced at 15 call sites\n- surface genuine handoff errors in _isDeferredSessionInputError instead\n  of silently requeueing them when the session is coincidentally busy\n- remove the production-dead pauseQueuedWork shim and narrow\n  resumeQueuedWork to pump-suspension recovery only\n\n* test(coding-agent): deterministic waits and shared test helpers\n\n- replace the 50ms sleep proving no queued turn starts after\n  abortForUpdateRestart with waitForSessionInputIdle\n- replace the 300ms sleep proving no prompt retry after an uncertain\n  admission failure with a bounded microtask drain\n- use the shared createDeferred from suite/scheduling.ts instead of two\n  local reimplementations\n- guard Reflect-based private access in the agents-view and supervisor\n  harnesses so renamed members fail with explicit messages, and document\n  why the constructor-bypass supervisor harness exists\n\n* chore(coding-agent): trim redundant comments from recent refactors\n\n* fix(coding-agent): guard session-input error surfacing against listener throws\n\nA throwing extension error listener could escape _surfaceSessionInputError\ninside _isDeferredSessionInputError before the pump requeued undelivered\nprompts, dropping them. Surfacing is now best-effort.\n\n* chore(coding-agent): tighten fix comment\n\n* fix(tui): keep the selection anchor across fallback unblocking\n\nResolving a missing anchor no longer overwrites the persisted anchor\nidentities with the visible fallback row, and typing while the anchor is\npending no longer claims the fallback either, so a late poll that\ndelivers the intended session re-anchors selection instead of opening\nthe wrong session.\n\n* fix(tui): open the unified session view on back navigation in local chats\n\nThe left-arrow back gesture only worked for daemon-backed sessions;\nprocess-local chats could reach the same unified view only via /resume.\nBack navigation now routes through requestAgentsView, which opens the\nlocal session view in place for process-local sessions.\n\n* fix(tui): preserve reply statuses across post-reply catalog refreshes\n\nThe refreshes triggered after a reply send or a failed resumed send used\ndefault error handling, so a failing catalog refresh could overwrite the\nsticky cwd-fallback notice or the send-failure message. Both refreshes\nnow preserve the current status on error.\n\n* chore(tui): drop redundant back-navigation comment\n\n* chore(tui): tighten reply-status comments\n\n* feat(tui): new session shortcut and steer/queue reply delivery\n\nctrl+n (app.agents.new) creates a fresh daemon session from the agents\nview and opens it. In the reply composer, Enter now steers a streaming\nagent and alt+enter (app.message.followUp) queues the reply as a\nfollow-up. While the composer is armed the hint line switches to\ncomposer hints: steer/send/resume & send, queue once text is typed, and\nesc to cancel.\n\n* feat(tui): session-owned slash commands in the reply composer\n\n/compact, /refine, /goal, and /autonomous pass through the daemon\nprompt path from the agents-view reply composer, with slash\nautocomplete active only while a reply target is armed. Other built-in\ncommands are rejected with guidance instead of being sent to the model\nas plain text.\n\n* feat(tui): view commands in the agents view\n\n/new, /fork, /name, and /kill run from the search editor against the\nselected row and from the armed reply composer against its target,\nwith autocomplete in both contexts. /fork forks at the current leaf via\nthe existing daemon fork RPC, resuming saved rows first; /name renames\nactive or saved sessions; /kill stops a running agent. Unknown or\nsession-only commands are rejected with guidance and plain text remains\na search query. The search hints now advertise \"/ commands\".\n\n* fix(tui): harden new-session shortcut and follow-up delivery\n\nctrl+n no longer fires while the reply composer is armed, so an unsent\ndraft cannot be discarded by opening a new session. Alt+Enter now\nexpands paste markers like Enter does. A session created after the view\nalready finished is killed instead of orphaned in the agents list.\n\n* fix(tui): preserve rejected drafts and bind completions to the target cwd\n\nA rejected command no longer loses the typed text (submitValue clears\nthe buffer before onSubmit; the rejection path now restores it unless\nnewer input arrived). The composer autocomplete provider is rebuilt\nwhen a target is armed, so @-file completions resolve in the target\nsession's cwd instead of the view's startup directory.\n\n* fix(tui): harden view commands against races, stale composers, and cancels\n\nAdapter-mode search no longer suggests view commands it will not run.\nArmed view commands cannot double-run (the buffer is already clear\nduring the RPC) and a failed command restores the typed draft in both\nthe composer and the search editor, without clobbering newer input.\nComposer disarm after /kill and /fork is guarded against a composer\nre-armed mid-command, and a fork cancelled by an extension is reported\nas cancelled instead of success.\n\n* fix(tui): report new-session outcome to callers\n\ncreateNewSession returns whether a session was created and opened, so\ncommand callers can restore a cleared draft on failure.\n\n* fix(tui): refresh after failed resumed forks and propagate /new outcome\n\nA saved row resumed for a fork that then fails, cancels, or has nothing\nto fork now refreshes the catalog so the newly live session appears\nimmediately. /new propagates createNewSession's outcome so a failed\ncreate restores the cleared draft.\n\n* fix(tui): enable @-path completion in the reply composer\n\nThe composer provider was built without an fd path, so @ fuzzy file\nsearch always returned empty. The view now resolves fd once and rebinds\nan armed provider when it becomes available.\n\n* fix(tui): create sessions over a dedicated connection\n\nfinish() closes the shared client, which rejected an in-flight create\nand made its session unkillable; a missing client also threw before the\nguard reset, permanently disabling the shortcut. Session creation now\nruns on its own short-lived connection inside the guarded try, so the\norphan-kill path works even after the view finished.\n\n* fix(tui): harden view commands against stale targets and filter churn\n\nSlash input in the search editor no longer filters the list, which\ncould swap the selected row before Enter ran the command on it. The\narmed composer re-resolves its captured summary before dispatch so\n/kill, /name, and /fork act on the current runtime, and rejects view\ncommands under the local adapter instead of sending them as prompt\ntext. A session resumed only to serve a fork is stopped again when the\nfork fails or is cancelled.\n\n* docs(tui): move the dedicated-connection rationale to its helper\n\n* fix(tui): drop submitted view commands from the persisted query\n\nsubmitValue clears the editor without queryChanged, so a successful\nsearch-editor command stayed in persistentState.query and a remount\nrestored it where Enter could re-run it on an arbitrary row. Failed\ncommands restore the draft through setSearchQuery so the persisted\nquery stays in sync.\n\n* fix(tui): only freeze the search filter for recognized command input\n\nUnknown slash-prefixed terms like /foo stayed unfiltered because any\nleading slash suppressed the query. The filter now freezes only while\nthe input is a view command or a prefix that can still extend into one,\nso ordinary slash search terms keep filtering.\n\n* fix(tui): warn on view commands in the adapter search editor\n\nAdapter sessions fell through to openSelected() when a view command was\ntyped, opening an unrelated row. The search branch now rejects them\nwith the same unavailable-command warning the reply composer shows.\n\n* test: consolidate overlapping reply-composer tests\n\n* test: fold command-classification cases into one test\n\n* test: consolidate overlapping view-command tests\n\n* refactor(tui): drop the /fork view command\n\nThe in-place daemon fork semantics (runtime rebind at the current leaf,\nresume-then-rollback for saved rows) carried a third of the view-command\ncomplexity for a command whose behavior we already flagged as awkward\nuntil isolated forking lands. /new, /name, and /kill remain.\n\n* fix(tui): restore the draft when the adapter search rejects a command\n\nsubmitValue had already cleared the buffer, so the warning silently ate\nthe typed command; it now comes back through setSearchQuery like other\nfailed search-editor commands.\n\n* test: fold sendReply delivery and follow-up keybinding cases together\n\n* test: fold draft-restore rejection cases together\n\n* docs(tui): tighten create-session comments\n\n* docs(tui): tighten the fd-rebind comment\n\n* test: fold overlapping composer tests; tighten comments\n\n* fix(tui): ctrl+c cancels the armed composer as its hint advertises\n\napp.clear ran first and started the exit flow, so a second ctrl+c could\nexit the view and discard the draft.\n\n* fix(tui): refresh the saved catalog after a live /name rename\n\nOnly the live list was refreshed, so the stale saved entry resurfaced\nthe old name once the agent was killed. Mirrors confirmRename.\n\n* fix(tui): gate search autocomplete on command input; refresh both catalogs after /kill\n\nAbsolute-path queries like /tmp/ fell through CombinedAutocompleteProvider\nto filesystem completions; the search editor now uses the same\nisAgentsViewCommandInput predicate as the filter freeze. Catalog\nrefreshes after rename and kill go through a shared refreshBothCatalogs\nso a killed agent reliably reappears under Inactive.\n\n* refactor(tui): share one renameSession path between rename mode and /name\n\n/name reimplemented the rename separately: it reported success before\nthe refresh and missed the older-daemon restart hint. Both entry points\nnow use the same rename/refresh/report sequence.\n\n* fix(tui): tolerate an already-finished agent in /kill\n\ndeactivatePendingAgent treats \"Unknown active session\" as already\nstopped; /kill surfaced the same race as a raw error.\n\n* docs(tui): drop comments that restate adjacent code\n\n* refactor(tui): search-only search bar; retire /resume and the local session view\n\nThe agents-view search bar no longer parses commands: /name and /kill\nlive only in the armed reply composer (their target is captured\nexplicitly), and new-session stays on its keybinding. This deletes the\nsearch-command autocomplete, the filter-freeze machinery, and the\npersisted-query replay handling that command input required.\n\nSession browsing is daemon-only: /resume and bare --resume are removed\nalong with the process-local SessionViewAdapter and every adapter\nbranch in the view. --resume <id|path> still resumes directly;\nnon-daemon `agents` warns and opens a chat. The chat hint now reads\n\"agents/resume\".\n\n* test: port #502 saved-catalog regressions off the removed adapter seam\n\nThe adapter layer was removed with /resume, so refreshSavedSessions now\nstreams list_saved_sessions through the daemon client and confirmRename\ndelegates to the shared renameSession path. The #502 regression harnesses\nstill faked options.adapter, so three tests failed (and two more passed\nonly because the missing client stub produced the expected false). Rebuild\nthem against client.request with onProgress streaming and the renameSession\ndelegate; behavior under test is unchanged.\n\n* chore: drop orphaned JSDoc for the removed bare --resume option"},{"name":"prompt-templates.ts","kind":"file","size":8900,"lastCommitHash":"f8f02221eecad192c65324ebba50037505cfdac6","lastCommitWhen":"2026-08-20T13:17:52+02:00","lastCommitMessage":"feat: add generic kernel-owned MCP runtime (#1495)\n\n* feat(coding-agent): add generic MCP runtime\n\n* fix(coding-agent): harden MCP lifecycle and overrides\n\n* fix(runtime): close cancelled host request comms\n\n* fix(runtime): preserve MCP SDK result aliases\n\n* fix(runtime): preserve synchronous kernel shutdown\n\n* fix(runtime): allow MCP close retry after cancellation\n\n* feat(coding-agent): manage MCP servers from CLI and TUI\n\n* fix(coding-agent): preserve inherited stdio env names\n\n* fix(coding-agent): reserve built-in MCP identities\n\n* fix(coding-agent): allow cleanup of reserved MCP entries\n\n* test(coding-agent): update MCP command hint\n\n* fix: address MCP reload and cleanup findings\n\n* fix(coding-agent): advertise generic MCP connections\n\n* fix(coding-agent): keep MCP command results visible\n\n* fix(runtime): surface safe stdio startup diagnostics\n\n* fix(runtime): preserve startup errors through cleanup\n\n* fix(coding-agent): drop stored MCP credentials when a server is removed or replaced\n\n* fix(coding-agent): scope credential drops to generic servers and keep quoted empty argv tokens\n\n* docs(coding-agent): document the removed catalog-name override as a breaking change\n\n* fix: close kernel MCP servers during shutdown\n\n* docs: preserve changelog sections after main merge\n\n* fix: harden MCP shutdown boundaries\n\n* fix: bound graceful kernel shutdown\n\n---------\n\nCo-authored-by: Sebastian <sebastian@primeintellect.ai>"},{"name":"provider-display-names.ts","kind":"file","size":1121,"lastCommitHash":"724f351af7e4bf889a2a386278b066e53e86d574","lastCommitWhen":"2026-06-17T14:28:06-07:00","lastCommitMessage":"add opt-in trace uploads (#169)\n\n* add opt-in trace uploads\n\n* slow trace upload cadence\n\n* clarify missing trace endpoint\n\n* use prod trace upload endpoint by default\n\n* address trace upload review comments\n\n* serialize trace upload flushes"},{"name":"resolve-config-value.ts","kind":"file","size":4447,"lastCommitHash":"378e32d5813087768ec3f34ed32901813a36744c","lastCommitWhen":"2026-08-28T14:15:16+02:00","lastCommitMessage":"refactor(coding-agent): remove test-only config cache reset APIs (#1849)"},{"name":"resource-loader.ts","kind":"file","size":33219,"lastCommitHash":"ecd32905eeed103c0d3677b0083dcc2e1f726c15","lastCommitWhen":"2026-07-09T15:46:40-07:00","lastCommitMessage":"add built-in herdr integration (#360)\n\n* feat(coding-agent): add built-in herdr integration\n\nHerdr cannot detect Prime Agent panes: its process detection only knows\nthe legacy \"pi\" binary name, and its \"herdr integration install pi\"\nwrites to ~/.pi/agent/extensions which Prime Agent does not read.\n\nShip the pi lifecycle-reporter as a built-in extension factory loaded\nfor every session. It reports working/idle/blocked and session refs to\nHerdr's unix socket and releases the pane on shutdown, using the agent\nlabel \"prime-agent\" (verified accepted and displayed by herdr 0.7.0\nagainst a live pane). The factory captures HERDR_* env per invocation,\nso daemon sessions pick up their own pane identity inside the client-env\nwindow, and it is a no-op outside Herdr or when the user has installed\nHerdr's own file-based integration.\n\n* fix(coding-agent): keep herdr seq monotonic across sessions and release only on quit\n\nHerdr guards pane.report_agent with a per-source monotonic seq and\nsilently drops lower-seq reports (verified live: ok response, state\nunchanged). Seeding seq per factory instance meant a successor session\nafter /new, resume, fork, or reload could restart below the\npredecessor's counter, so all its reports were dropped and the pane\nstuck at working.\n\n- move the seq counter to module scope and clamp it to\n  max(prev + 1, now*1000) so it never regresses across instances\n- release the pane only on quit; on session replacement the successor\n  re-reports immediately and a racing release could clear it\n- report idle immediately on agent_end when no messages are queued;\n  keep the debounce only when queued follow-ups restart the loop\n\n* fix(coding-agent): address herdr integration review findings\n\n- unsubscribe the shared-bus herdr:blocked listener on session_shutdown;\n  the event bus survives reloads and session replacements, so a leaked\n  listener kept stale instances reporting with captured pane identity\n- move the file-based integration check into createAgentSessionServices\n  using the same extension dirs the loader discovers from, so agentDir\n  overrides are honored\n- stop treating the legacy ~/.pi/agent path as an active reporter;\n  Prime Agent never loads extensions from there, so deferring to it left\n  panes with no reporter at all\n\n* fix(coding-agent): scope herdr reporter to its own session and recheck deferral on reload\n\n- bind the reporter to the first session that starts and ignore events\n  from other sessions sharing the closure; inline RLM children reuse the\n  parent's resource loader, so a subagent's turns flipped the pane state\n  and a subagent quit released the pane while the parent was running\n- skip the built-in reporter entirely for subagent runtimes\n  (rlmDepth > 0), which share the parent's HERDR_* pane identity\n- re-check for Herdr's file-based integration on every factory\n  invocation instead of once at service creation, so installing it and\n  running /reload hands the pane over without both reporters active\n- also match herdr-agent-state.js for compiled installs\n\n* fix(coding-agent): make quit release the final write to the herdr socket\n\nreleaseAgent now stops new reports, drops the queued state, and awaits\nthe in-flight drain before sending pane.release_agent, so a late report\ncannot land after the release and reclaim the pane for an exited agent.\n\n* fix(coding-agent): seed working state when the reporter starts mid-turn\n\nDaemon-driven reloads and extension ctx.reload() are not gated on idle,\nso a fresh reporter's session_start could publish idle while the agent\nwas still streaming, and the agentActive guard then swallowed the\nturn's real end transition. session_start now seeds agentActive from\nctx.isIdle().\n\n* fix(coding-agent): settle the retry hold when a blocked event cancels its timer\n\nA herdr:blocked event during the retry-hold window cancelled the retry\ntimer but left retryHoldActive set, so after the block lifted the pane\nreported working forever. The blocked handler now settles the hold to\nfailureBlocked, matching what the cancelled timer would have done.\n\n* fix(coding-agent): do not defer to file-based herdr reporter under noExtensions\n\nWith noExtensions the loader never scans the extension dirs, so a\nfile-based herdr-agent-state there never becomes an active reporter;\ndeferring to it left the pane with no reporter at all.\n\n* fix(coding-agent): hold working for every error end instead of a pattern subset\n\nThe agent's auto-retry treats nearly all provider errors as retryable\nand runs after extension agent_end, so an error the reporter's pattern\nlist missed flipped the pane to idle while a retry was pending. Drop\nthe pattern list and hold working for any error end; a retry's\nagent_start keeps the pane working, and with no retry the grace window\nsettles it to blocked with the error message.\n\n* fix(coding-agent): silence replaced reporter instances on non-quit shutdown\n\nA replaced instance kept its report queue armed after reload/new/resume\nshutdowns; a late report carrying the process-wide seq could outrank\nand stomp the successor's state. Non-quit shutdowns now set released\nand drop the queued state so the old instance goes quiet.\n\n* fix(coding-agent): make noExtensions disable the built-in herdr reporter\n\nnoExtensions is a full opt-out: inline factories deliberately bypass it\nfor embedder-supplied extensions, but the built-in reporter should\nrespect it so --no-extensions leaves nothing extension-driven running.\n\n* fix(coding-agent): defer to the file-based herdr reporter only when it loaded\n\nDeferral now consults the resource loader's actually-loaded extension\npaths (late-bound, per factory invocation) instead of raw disk\nexistence, so a herdr-agent-state file disabled via settings overrides\nor outside the discovery dirs no longer silences the built-in reporter\nand leaves the pane with no reporter."},{"name":"rlm-contract.ts","kind":"file","size":35199,"lastCommitHash":"4a770d657c741044a547b490f2059c1aafb7f7a7","lastCommitWhen":"2026-08-31T21:52:03+09:00","lastCommitMessage":"make rlm spawns fail-closed: schema-bound results by default, guarded context, explicit unguarded opt-out\n"},{"name":"rlm-max-depth.ts","kind":"file","size":356,"lastCommitHash":"5929ebee6004da12602e8051e43a77b05118c80e","lastCommitWhen":"2026-08-05T04:46:50+02:00","lastCommitMessage":"feat(coding-agent): /rlm-max-depth session command (#585)\n\n* feat(coding-agent): /rlm-max-depth session command\n\nSession-owned command (fifth SessionCommandAction arm) controlling the RLM\nrecursion cap per D6 of the recursive-agent-harness plan:\n\n- /rlm-max-depth shows the effective cap and its origin\n  (chat/inherited/global/env/default)\n- /rlm-max-depth <int> sets it for this chat, persisted forever via an\n  rlm_max_depth_state JSONL entry (goal pattern, flushNow); children spawned\n  afterward inherit copy-at-spawn; no retroactive push-down, no upward\n  propagation; a child's own setting overrides its inherited value across\n  reopen (persisted chat state > spawn config > global > env > 1)\n- /rlm-max-depth <int> --global sets the settings.json default for new\n  sessions everywhere and pins this session\n- branch navigation reloads the persisted state alongside goal state and\n  refreshes the system prompt when the effective value changes\n- absolute-depth cap semantics unchanged (depth >= maxDepth blocks spawn)\n\nTrack A PR 3 of the recursive-agent-harness plan.\n\n* refactor(coding-agent): make /rlm-max-depth immediate with one-line feedback\n\nUser decision: make this a state command like /name that never steers or queues. Replace the compaction-style status message with dim one-line feedback while leaving persisted chat state and global settings behavior unchanged.\n\nInteractive and daemon AgentConnection clients use the immediate direct API. RPC has no dedicated command yet; sending /rlm-max-depth as a prompt is no longer a command path.\n\n* fix(coding-agent): preserve live command and prompt state\n\n- Clear /rlm-max-depth input before awaiting its daemon RPC so new drafts survive.\n- Resolve the system prompt per turn so active runs observe max-depth updates.\n\n* fix(coding-agent): preserve extension prompt on depth changes\n\n- Refresh the active extension-modified system prompt when RLM max depth changes.\n- Add regression coverage for preserving extension doctrine while applying new depth doctrine mid-run.\n\n* fix(coding-agent): report failed global saves when settings cannot parse\n\nSettingsManager.save bailed silently when the global settings file had\na load error: no write was enqueued and no error recorded, so after the\nstartup diagnostic was drained, setRlmMaxDepth reported globalSaved\neven though nothing reached disk. The bail now records a scoped\nsettings error so the drain reports the failure.\n\n* fix(coding-agent): resolve prompt after API key lookup\n\n- Resolve the live system prompt after asynchronous API key lookup, immediately before the provider call.\n- Add regression coverage for prompt changes during API key resolution."},{"name":"rlm-runtime.ts","kind":"file","size":12650,"lastCommitHash":"7e70aea03dcf78c97aa65cc2a8e1aeb2a068e5fe","lastCommitWhen":"2026-08-31T22:05:28+09:00","lastCommitMessage":"complete guarded RLM results and background completion wakeups\n"},{"name":"sdk.ts","kind":"file","size":14577,"lastCommitHash":"94f25d4f34f31f4b5a096834097edd9ccb1a2992","lastCommitWhen":"2026-09-01T22:32:33+09:00","lastCommitMessage":"feat(coding-agent): add root session controls\n"},{"name":"session-action-store.ts","kind":"file","size":14520,"lastCommitHash":"878bf91309c9dfa8030245019a17cf411920fd4b","lastCommitWhen":"2026-08-31T21:52:03+09:00","lastCommitMessage":"feat(coding-agent): unify RLM subagent lifecycle, messaging, and observation on rlm\n\n- rlm() and rlm.list_subagents() return one mutable RLMSubagent handle owning refresh, send, observe, info, result, and delete; RLMSpawnHandle is removed\n- agent messaging and observation move into rlm (send_parent, send_sibling, send_child, family, observe, info); agent_message.* and agent_observe.* host routes register whenever their controllers exist, independent of skill visibility\n- bundled agent-message and agent-observe skills are no longer model-visible; prompts document the rlm-native surface only\n- composable schema-validated result and context-admission contracts for RLM subagents\n- docs and changelog fragments updated for the unified surface\n"},{"name":"session-cwd.ts","kind":"file","size":1628,"lastCommitHash":"080af6fc062f41be2d0a4862a741d54ed4bc130a","lastCommitWhen":"2026-04-05T21:24:32+02:00","lastCommitMessage":"fix(coding-agent): handle missing session cwd\n"},{"name":"session-file-actions.ts","kind":"file","size":2765,"lastCommitHash":"a9a8655037b009036c1fbcc4bb66aed65afcb532","lastCommitWhen":"2026-08-17T10:52:38-07:00","lastCommitMessage":"fix(daemon): drop deleted rlm children's kernel state and dedupe artifact paths (#1450)\n\n* refactor: canonical session artifact path helpers in session-manager\n\n* fix(daemon): drop a deleted rlm child's nested artifact dir, keep the transcript\n\n* feat(daemon): bounded per-parent reaper for tombstoned rlm child artifact dirs\n\n* fix(daemon): re-sweep artifact dirs resurrected by teardown snapshots\n\n* test(daemon): artifact-dir deletion, best-effort rm, reaper bounds, path helper equivalence\n\n* fix(daemon): guard degenerate session-file names in the artifact reaper\n\nAlso sweep every tombstoned edge on retry-heal, skip the chmod rm-failure test as root, and pin the depth-2 transcript boundary.\n\n* docs: trim redundant policy comments to repo discipline\n\n* fix(daemon): re-sweep artifact dirs even when child teardown throws\n\n* fix(daemon): never let jobs-store errors mask a child deletion\n\nPre-round-2 a cancel throw on the healthy path propagated as a deletion\nfailure. Swallowing it is deliberate: both tombstones are durable by this\npoint, the reaper and retry-heal converge on leftover state, and a deletion\nshould not fail over jobs-store bookkeeping.\n\n* revert(daemon): drop the orphan-artifact reaper, keep the deletion hook\n\nNew children never orphan artifact dirs once the deletion hook exists; the pre-fix garbage is a one-time mess not worth a permanent mechanism in the deletion path. The degenerate-basename guard keeps direct coverage via deleteSessionArtifacts.\n\n* fix(ai): stabilize Cloudflare gateway model test\n\n---------\n\nCo-authored-by: Seth <seth@primeintellect.ai>"},{"name":"session-id.ts","kind":"file","size":1411,"lastCommitHash":"b0a77adeb9f7e9c219803e25829c83a92c639ebb","lastCommitWhen":"2026-07-20T13:28:04-07:00","lastCommitMessage":"reject invalid resume session ids (#479)\n\n* fix(coding-agent): reject invalid resume selectors (ENG-4722)\n\n* fix(coding-agent): resolve ambiguous session selectors\n\nfixes #479\n\n* fix(coding-agent): prefer exact session ids\n\nfixes #479"},{"name":"session-import-errors.ts","kind":"file","size":243,"lastCommitHash":"032e3ee74574ca16efaf8745a1394b821256a5d0","lastCommitWhen":"2026-08-18T12:17:35+02:00","lastCommitMessage":"chore: remove redundant comments and unused internals (#1505)\n\n* chore: remove redundant comments\n\n* chore(tui): remove redundant export comments\n\n* chore(coding-agent): remove redundant example comments\n\n* chore(ai): remove redundant comments\n\n* chore(coding-agent): remove obsolete core comments\n\n* chore(coding-agent): remove redundant test comments\n\n* chore(coding-agent): remove redundant test comments\n\n* chore(coding-agent): remove redundant rpc test comments\n\n* chore(coding-agent): remove redundant CLI comments\n\n* chore(agent): remove redundant comments\n\n* chore(tui): remove redundant source comments\n\n* chore(coding-agent): remove redundant mode comments\n\n* chore(coding-agent): remove redundant mode comments\n\n* chore(coding-agent): remove redundant test comments\n\n* chore(ai): remove redundant source comments\n\n* chore(coding-agent): remove redundant session comments\n\n* chore(coding-agent): remove redundant core comments\n\n* chore(coding-agent): remove redundant test comments\n\n* chore(tests): remove redundant test comments\n\n* chore: remove unused internal helpers\n\n* docs: restore public API contracts\n\n* chore(coding-agent): restore invariant documentation\n\n* chore(coding-agent): clarify agent family contracts\n\n* style(coding-agent): format restored contracts\n\n* fix: restore intentional catch explanations"},{"name":"session-lease.ts","kind":"file","size":8230,"lastCommitHash":"039eba051a93e009c9336262cf6357523e85473d","lastCommitWhen":"2026-07-16T15:24:29-07:00","lastCommitMessage":"fix daemon update restart coordination (#406)\n\n* fix(coding-agent): prevent concurrent daemon supervisors\n\nFixes ENG-4600\n\n* fix(coding-agent): harden supervisor handoff\n\nFixes ENG-4600\n\n* test(coding-agent): prove resident handoff\n\nFixes ENG-4600\n\n* test(coding-agent): preserve daemon socket exports\n\nFixes ENG-4600\n\n* test(coding-agent): isolate supervisor registry\n\nFixes ENG-4600\n\n* fix(coding-agent): reduce supervisor ownership scope (ENG-4600)\n\n* test(coding-agent): make supervisor teardown deterministic (ENG-4600)\n\n* test(coding-agent): contain supervisor fixtures (ENG-4600)\n\n* test(coding-agent): grace supervisor fixture cleanup (ENG-4600)\n\n* fix(coding-agent): coordinate daemon update restarts\n\nFixes ENG-4606\n\n* test(coding-agent): clean stale fixture owners (ENG-4600)\n\n* fix(coding-agent): harden update restart recovery\n\nFixes ENG-4606\n\n* fix(coding-agent): contain restart recovery failures\n\nFixes ENG-4606\n\n* test(coding-agent): clean replacement fixture owner (ENG-4600)\n\n* fix(coding-agent): report restart recovery results\n\nFixes ENG-4606\n\n* fix(coding-agent): await update recovery completion\n\nFixes ENG-4606\n\n* fix(coding-agent): defer daemon startup fence (ENG-4600)\n\n* fix(coding-agent): watchdog update restart progress\n\nFixes ENG-4606\n\n* fix(coding-agent): fence late daemon hello (ENG-4600)\n\n* fix(coding-agent): join concurrent update recovery\n\nFixes ENG-4606\n\n* fix(coding-agent): fence Windows process identity\n\nFixes ENG-4606\n\n* fix(coding-agent): harden update restart progress\n\nFixes ENG-4606\n\n* fix(coding-agent): complete supervisor shutdown cleanup (ENG-4600)\n\n* fix(coding-agent): scope update restart recovery\n\nFixes ENG-4606\n\n* fix(coding-agent): normalize restart identity lazily\n\nFixes ENG-4606\n\n* fix(coding-agent): recover ambiguous daemon shutdown\n\nFixes ENG-4606\n\n* chore: trigger ci after retargeting\n\nFixes ENG-4606\n\n* fix(coding-agent): preserve interactive daemon boundary\n\nFixes ENG-4606\n\n* test(coding-agent): isolate self-update install paths\n\nFixes ENG-4606\n\n* fix(coding-agent): harden coordinator completion waits\n\nFixes ENG-4606\n\n* fix(coding-agent): stabilize restart coordinator home\n\n* fix(coding-agent): preserve interactive update child"},{"name":"session-manager.ts","kind":"file","size":62083,"lastCommitHash":"032e3ee74574ca16efaf8745a1394b821256a5d0","lastCommitWhen":"2026-08-18T12:17:35+02:00","lastCommitMessage":"chore: remove redundant comments and unused internals (#1505)\n\n* chore: remove redundant comments\n\n* chore(tui): remove redundant export comments\n\n* chore(coding-agent): remove redundant example comments\n\n* chore(ai): remove redundant comments\n\n* chore(coding-agent): remove obsolete core comments\n\n* chore(coding-agent): remove redundant test comments\n\n* chore(coding-agent): remove redundant test comments\n\n* chore(coding-agent): remove redundant rpc test comments\n\n* chore(coding-agent): remove redundant CLI comments\n\n* chore(agent): remove redundant comments\n\n* chore(tui): remove redundant source comments\n\n* chore(coding-agent): remove redundant mode comments\n\n* chore(coding-agent): remove redundant mode comments\n\n* chore(coding-agent): remove redundant test comments\n\n* chore(ai): remove redundant source comments\n\n* chore(coding-agent): remove redundant session comments\n\n* chore(coding-agent): remove redundant core comments\n\n* chore(coding-agent): remove redundant test comments\n\n* chore(tests): remove redundant test comments\n\n* chore: remove unused internal helpers\n\n* docs: restore public API contracts\n\n* chore(coding-agent): restore invariant documentation\n\n* chore(coding-agent): clarify agent family contracts\n\n* style(coding-agent): format restored contracts\n\n* fix: restore intentional catch explanations"},{"name":"session-resolver.ts","kind":"file","size":4907,"lastCommitHash":"b0a77adeb9f7e9c219803e25829c83a92c639ebb","lastCommitWhen":"2026-07-20T13:28:04-07:00","lastCommitMessage":"reject invalid resume session ids (#479)\n\n* fix(coding-agent): reject invalid resume selectors (ENG-4722)\n\n* fix(coding-agent): resolve ambiguous session selectors\n\nfixes #479\n\n* fix(coding-agent): prefer exact session ids\n\nfixes #479"},{"name":"session-stats.ts","kind":"file","size":420,"lastCommitHash":"032e3ee74574ca16efaf8745a1394b821256a5d0","lastCommitWhen":"2026-08-18T12:17:35+02:00","lastCommitMessage":"chore: remove redundant comments and unused internals (#1505)\n\n* chore: remove redundant comments\n\n* chore(tui): remove redundant export comments\n\n* chore(coding-agent): remove redundant example comments\n\n* chore(ai): remove redundant comments\n\n* chore(coding-agent): remove obsolete core comments\n\n* chore(coding-agent): remove redundant test comments\n\n* chore(coding-agent): remove redundant test comments\n\n* chore(coding-agent): remove redundant rpc test comments\n\n* chore(coding-agent): remove redundant CLI comments\n\n* chore(agent): remove redundant comments\n\n* chore(tui): remove redundant source comments\n\n* chore(coding-agent): remove redundant mode comments\n\n* chore(coding-agent): remove redundant mode comments\n\n* chore(coding-agent): remove redundant test comments\n\n* chore(ai): remove redundant source comments\n\n* chore(coding-agent): remove redundant session comments\n\n* chore(coding-agent): remove redundant core comments\n\n* chore(coding-agent): remove redundant test comments\n\n* chore(tests): remove redundant test comments\n\n* chore: remove unused internal helpers\n\n* docs: restore public API contracts\n\n* chore(coding-agent): restore invariant documentation\n\n* chore(coding-agent): clarify agent family contracts\n\n* style(coding-agent): format restored contracts\n\n* fix: restore intentional catch explanations"},{"name":"settings-manager.ts","kind":"file","size":41526,"lastCommitHash":"c382f09856d4a8c8d2b765179657047d58691f25","lastCommitWhen":"2026-08-30T17:18:36+02:00","lastCommitMessage":"feat(coding-agent): render Mermaid diagrams inline in the terminal (#1893)\n\n* feat(coding-agent): render Mermaid code blocks as inline Unicode diagrams\n\nPorts pi-mono's Mermaid rendering (grok-mermaid) into prime-agent:\n- pi-tui Markdown gains an options.transform hook that rewrites source\n  Markdown with the exact content width before parsing (ported from\n  upstream pi-tui).\n- New mermaid.ts transform replaces top-level mermaid code blocks with\n  themed Unicode diagrams, falls back to the raw block when the diagram\n  is wider than the message, and appends a themed warning line for\n  partially rendered final diagrams.\n- AssistantMessageComponent applies the transform to text blocks only\n  (never thinking blocks) and tracks streaming state so the\n  streaming-to-final transition re-renders.\n- New markdown.mermaid setting (off/final/streaming, default streaming)\n  with a settings-selector entry.\n\nLinear: ENG-5673\n\n* test(coding-agent): kill mermaid mutation survivors\n\nAdversarial review mutation testing found three surviving mutants:\n- width guard flipped to >= (exact-fit diagrams would fall back)\n- codeSpan fence reduced to a single backtick (backtick labels break)\n- isStreaming inverted at the message_end call site (final mode never renders)\n\nAdds an exact-width boundary test, a backtick-label test, and a\nhandleEvent-level final-mode transition test that kill them.\n\n* build(coding-agent): pin grok-mermaid exactly for renderer-output stability\n\n* test(coding-agent): collapse redundant mermaid coverage\n\n* docs(coding-agent): tighten mermaid comments\n\n* fix(coding-agent): tolerate non-object markdown settings values\n\nNormalize a malformed markdown settings value at the migration boundary\n(mirroring the telemetry handling) so changing the Mermaid mode cannot\nthrow, and add the missing tui changelog fragment.\n\n* test(coding-agent): drop mermaid.test.ts\n\n* chore(coding-agent): one-line mermaid codeSpan comments"},{"name":"side-question.ts","kind":"file","size":4468,"lastCommitHash":"5b808362d8100dc5c7709a97cc88c659be22dd5c","lastCommitWhen":"2026-07-24T14:25:06-07:00","lastCommitMessage":"feat: multi-turn /btw side conversations (#512)\n\n* feat: multi-turn /btw side conversations\n\nWhile the /btw pane is open, plain replies continue the side conversation\ninstead of going to the main session; esc returns (now visibly hinted in\nthe pane). Each follow-up re-clones the latest main-session context and\nreplays prior side turns, so brainstorming always sees fresh state while\nthe main thread keeps working. Still no tools, still nothing added to the\nsession.\n\n- thread previousTurns through core, in-process, and daemon connections\n  (additive protocol field; schema revision bumped)\n- pane renders all turns with a ↳ prefix and an esc/reply hint line\n- docs and /btw command description updated\n\nCo-Authored-By: Claude Fable 5 <noreply@anthropic.com>\n\n* fix: keep follow-up draft when submitted while running\n\n* feat: better styling for side chat\n\n* feat: slash and shell commands handled in side convo\n\n* feat: image input and bash output in side chat handled\n\n* fix: fixed hint and bash permission during active turn\n\n* fix: daemon gate and bash failure reasons\n\n* chore: bump schema\n\n* fix: transient side bash + render it with the main-thread component\n\nAddresses bugbot findings on #512:\n\n- side !/!! runs are now transient: never recorded into the session, so\n  reloads and chat rebuilds cannot resurface them (new transient flag on\n  runUserBash/executeBash and the execute_bash daemon command, gated by a\n  new transient_bash capability; schema revision bumped to 5, clients\n  fail loudly against older daemons)\n- a side bash discarded at pane close is re-aborted when its bash_start\n  arrives late, so an escaped run cannot keep executing invisibly\n\nAlso drops the pane's bespoke bash presentation: bash_start now mounts\nthe same BashExecutionComponent as the main thread inside the pane\n(spinner, streamed output, exit status), the bash_output/bash_end\nhandlers are unified, and finishSideQuestionBash only seeds follow-up\nside-question context.\n\nCo-Authored-By: Claude Fable 5 <noreply@anthropic.com>\n\n* fix: correlate side-conversation bash runs by identity\n\nbash_* session events broadcast to every client attached to a session,\nand the side pane previously claimed the next run it saw — so a\nconcurrent client's run could mount in the pane, seed the side\ntranscript, be aborted by a stale discard, or leak a side run into\nanother window's chat (bugbot/macroscope findings on #512).\n\nReplaces heuristic correlation with run identity end to end:\n\n- execute_bash carries a client-generated runId (with transient, under\n  the existing transient_bash capability), echoed with a transient\n  marker on the run's bash_start/bash_end events\n- the pane mounts only its own runId and seeds the transcript only when\n  that exact run ends; foreign transient runs are suppressed everywhere\n  (no chat mount, no output, no failure toast); foreign non-transient\n  runs render in the chat as usual\n- a discarded side bash re-aborts only its own late bash_start; a\n  different run claiming the slot clears the discard marker and renders\n  normally instead of being aborted or swallowed\n- finishSideQuestionBash releases the pane's running state before any\n  early return, so the cancel hint cannot stay stuck\n\nOld daemons without the capability still fail loudly for side bash and\nrender main bash unchanged.\n\nCo-Authored-By: Claude Fable 5 <noreply@anthropic.com>\n\n* fix(coding-agent): harden side conversations (fixes #512)\n\n* fix(coding-agent): release side bash after resync (fixes #512)\n\n---------\n\nCo-authored-by: Claude Fable 5 <noreply@anthropic.com>\nCo-authored-by: Kevin Thomas <kevin.jt2007@gmail.com>"},{"name":"skill-blocks.ts","kind":"file","size":618,"lastCommitHash":"891b99800bdd40d53c8f67bbae03acc55262e585","lastCommitWhen":"2026-06-09T21:11:57-07:00","lastCommitMessage":"decouple interactive mode from agent runtime (#79)\n\n* decouple interactive mode from agent runtime\n\n* add rich tui attach for daemon sessions\n\n* clarify agent connection boundary\n\n* document agent connection architecture\n\n* fix daemon interactive session replacement\n\n* refresh transcript after session replacement\n\n* fix daemon session attach edge cases\n\n* fix remaining daemon tui review findings\n\n* fix daemon tui review regressions\n\n* fix daemon tui cancellation gaps\n\n* fix daemon attach by session file\n\n* fix daemon extension ui client routing\n\n* fix daemon close ui cancellation order\n\n* fix daemon active session lookup startup\n"},{"name":"skills.ts","kind":"file","size":17621,"lastCommitHash":"61eb64748eb077e2a084432db92d101a2a83e146","lastCommitWhen":"2026-08-26T15:24:10-07:00","lastCommitMessage":"Minimal CPython REPL runtime (rlm.repl) (#1685)\n\n* feat(coding-agent): add async-by-default bash() to the kernel runtime\n\n* chore(coding-agent): tighten bash() comments and changelog fragment\n\n* feat(coding-agent): add a standalone CPython REPL runtime speaking JSON lines over stdio\n\n* chore(coding-agent): tighten REPL runtime comments\n\n* feat(coding-agent): run the kernel on the REPL runtime over stdio\n\n* fix(coding-agent): reject pending host requests on kernel teardown\n\nThe runtime now fails pending host_request futures when stdin hits EOF or\na shutdown request arrives, so a cell awaiting a host reply can no longer\nblock _serve from consuming the shutdown and wedge the process. Startup\nand busy-kernel messages plus the ipython tool description now say Python\nkernel, matching the default REPL runtime client.\n\n* chore(coding-agent): describe the kernel-heavy test tag client-neutrally\n\n* feat(coding-agent): make the REPL runtime the only kernel\n\nRemoves the Jupyter/ipykernel/ZMQ kernel client, the fork server, the\nPRIME_AGENT_KERNEL escape hatch, and the %%bash/%cd/%env cell rewriting.\nMagic-style cells (%/%%/!) return a one-line error naming the Python or\nbash() replacement. The kernel venv no longer installs ipykernel;\nexisting venvs are rebuilt once via the bootstrap schema bump. Old\nsnapshot artifacts still restore through the runtime's pickle compat.\n\n* fix(coding-agent): close MCP transports in REPL shutdown\n\n* fix(coding-agent): address bash() review findings — exact tail retention, foreground-status lifecycle with group anchoring, post-kill forkserver reap, Windows start-id parity, executor-free await\n\n* fix(coding-agent): tree-kill bash() process trees on Windows and make running reflect group liveness\n\n* fix(runtime): address repl runtime review findings\n\n- revalidate targeted interrupts through SIGINT delivery so a stale signal\n  cannot cancel a later request\n- preserve a parked untargeted interrupt while another request is inflight\n- reject non-string interrupt ids and validate snapshot options\n  (prune_oversized bool, max_bytes/max_variable_bytes present => int)\n- guard str(exc) in error/skip/fail reasons so a broken __str__ cannot\n  kill the runtime\n- fail the snapshot when the manifest write fails (before any pruning)\n- report 'snapshot not found' reason on restore of a missing path\n- wait unbounded for the output-pump drain marker so done never precedes\n  captured output and marker bytes never leak\n- document that aggregate-cap skips are not pruned\n\n* fix(coding-agent): carry bash() status pipe as stdin so strict-POSIX shells accept single-digit fd redirections\n\n* fix(coding-agent): address host-swap review findings — runtime-neutral kernel wording, %cd/%env rewrite fidelity, linear-time magic regexes, restart supersession guard\n\n* fix(coding-agent): reject stale column-0 line magics on any cell line, not just the first\n\n* fix(coding-agent): close status fds when wake-pipe creation fails and gate bash() commands on orphan-journal registration\n\n* fix(coding-agent): strip quoted %cd targets, use UTF-16-safe %env parsing, and expand $var/${var} values PEP-215-style\n\n* fix(coding-agent): fail rlm.run fast outside a live kernel so vitest workers cannot hang on a comm that never replies\n\n* fix(coding-agent): clear the active cell id before terminal events so late background output is never tagged with a finished cell\n\n* fix(coding-agent): update legacy IPython-era tests to assert cutover behavior\n\n* fix(coding-agent): describe the column-0 magic scan without referencing the removed rewrite backend\n\n* fix(coding-agent): consume parked interrupts on compile failures and survive user-closed stdio in the drain path\n\n* fix(coding-agent): redact bare %env listings, prefer '=' in %env parsing, echo %cd targets, and keep graceful shutdowns owning their cleanup\n\n* fix(coding-agent): reject kernel startup promptly on spawn errors and commit %cd previous-dir tracking only after chdir succeeds\n\n* fix(coding-agent): trim ParsedIpythonBashCell to the body field its callers use\n\n* fix(coding-agent): kill full process trees in the Windows orphan reaper via taskkill /T\n\n* fix(coding-agent): survive compile-phase crashes and fd-reuse drain hangs in the REPL runtime\n\n* fix(coding-agent): shield snapshot prune deletions from interrupts and pin the host comm probe to its real seam\n\n* fix(coding-agent): route list_names through the per-request backstop and skip non-string namespace keys\n\n* fix(coding-agent): reject snapshot requests whose manifest path aliases the payload path\n\n* fix(coding-agent): reject negative snapshot size caps that would prune every user variable\n\n* fix(coding-agent): kill one-shot await bash() on cancel, resolve Windows helpers via System32, retry taskkill after reap, and fail closed on orphan-journal enrollment\n\n* fix(coding-agent): attribute REPL stream output at write time so raw fd and user-thread bytes never carry another cell's id\n\n* fix(coding-agent): surface unattributed REPL stream output as separate background output instead of dropping or merging it\n\n* fix(coding-agent): confirm group exit before a cancelled one-shot bash() await propagates and complete-write orphan-journal records\n\n* fix(coding-agent): expose a working sys.stdout.buffer on the tagged REPL writer routing bytes through the null-attributed raw channel\n\n* fix(coding-agent): mark between-cell background output truncated when the pending buffer cap is hit\n\n* fix(coding-agent): shield the cancelled-await bash() confirm-exit from re-cancellation, fail clearly without bash on Windows, and fence slow pumps out of result assembly\n\n* fix(coding-agent): survive hostile protocol lines in the REPL reader thread and interrupt without pthread_kill on Windows\n\n* fix(coding-agent): send the protocol shutdown from dispose() so the runtime closes MCP servers and kills live bash groups before the hard kill\n\n* fix(coding-agent): flag the pump's read-to-commit window so the bash() drain fence cannot miss an in-flight chunk\n\n* fix(coding-agent): guard the whole REPL request line against hostile input, reject duplicate in-flight ids, complete short buffer-pipe writes, and clean the snapshot temp file on KeyboardInterrupt\n\n* fix(coding-agent): drop stale between-cell background output on kernel teardown so it cannot surface after a restart\n\n* fix(coding-agent): assert the tagged channel only in the large buffer-write REPL test since cross-channel ordering is not guaranteed\n\n* fix(coding-agent): resolve taskkill via absolute System32 path in the host orphan reaper\n\n* fix(coding-agent): write the inactive orphan-journal record only after a delivered kill so undelivered signals leave the host reaper in charge\n\n* fix(coding-agent): keep a REPL request interrupt-targetable through its trailing-expression repr and output drain until done is emitted\n\n* fix(coding-agent): count an already-exited leader as delivered in the Windows bash() reap so clean exits still journal inactive\n\n* fix(coding-agent): reject NaN and Infinity in emit() payloads before they corrupt REPL protocol framing\n\n* chore(coding-agent): correct the stale ipykernel requirement on the python override doc\n\n* chore(coding-agent): drop migration-era wording from kernel comments\n\n* fix(coding-agent): resolve trusted absolute shell host-side and close Windows journal/reap gaps\n\n* fix(coding-agent): best-effort-kill pid-only orphan records in daemon force-stop and recovery reaps\n\n* refactor(coding-agent): drop the magic-cell rejection gate\n\n%-prefixed and !-prefixed cells now reach CPython and fail with its own\nSyntaxError, which names the offending line. The rejection layer guarded\nagainst model-produced IPython syntax, but with the shipped prompt fresh\nsessions do not produce it, and the plain SyntaxError is protection enough.\nparseIpythonBashCell stays: transcripts from ipykernel-era sessions render\n%%bash cells with shell highlighting forever.\n\n* fix(coding-agent): report a committed destructive snapshot as success even when an interrupt was parked\n\n* chore(ai): drop stray live-regen drift in models.generated.ts\n\nad657d7ec accidentally committed generate-models output produced by a local\nbuild; the catalog belongs to its own regen PRs.\n\n* test(coding-agent): expect a plain SyntaxError for legacy %%bash cells after the magic-rejection gate removal\n\n* fix(coding-agent): consume a finishing-targeted interrupt after a completed state request instead of failing the done\n\n* fix(coding-agent): exit the REPL runtime when its owner dies even during a busy cell\n\n* fix(coding-agent): resolve the kernel bash shell only from trusted absolute paths on Windows\n\n* fix(coding-agent): contain Windows bash children with kill-on-close job objects\n\n* test(coding-agent): cover owner death during a non-yielding REPL cell\n\n* fix(coding-agent): skip concurrently deleted names during snapshot instead of aborting\n\n* fix(coding-agent): fall back to taskkill when job termination fails\n\n* fix(coding-agent): stop telling REPL-default users they need ipykernel\n\n* fix(coding-agent): clear the SIGINT target when its request finishes\n\n* test(coding-agent): drop migration-era wording from the %%bash rejection comment\n\n* fix(coding-agent): start Windows bash children suspended and fail closed when job containment cannot be established\n\n* fix(coding-agent): re-assert the kernel SIGINT handler between cells so a cell rebinding SIGINT cannot break interrupts\n\n* fix(coding-agent): kill the whole tree for enriched orphan records on Windows force-stop\n\nstopTrackedProcess signals only the shell pid on Windows; use killOrphanProcess (taskkill /T) after the identity check, matching the owned-session-worker and daemon-supervisor reapers.\n\n* docs(coding-agent): describe current magic-cell behavior in release notes\n\nMagic-style cells fail with a plain SyntaxError; the migration error and %cd/%env rewrites were removed, so the notes stop claiming them.\n\n* fix(coding-agent): skip the liveness check when the orphan identity is stale\n\nA reused pid looked like a failed kill after the identity re-check skipped taskkill, blocking worker cleanup with a spurious failure.\n\n* fix(coding-agent): journal Windows bash() children before job assignment so a kernel kill mid-spawn cannot leak an unjournaled suspended process\n\n* fix(coding-agent): pre-create the Windows bash() job before spawn and contain the child before the journal start-id query\n\n* fix(coding-agent): create Windows bash() children atomically inside the kill-on-close job via PROC_THREAD_ATTRIBUTE_JOB_LIST, closing the Popen-to-assignment leak window\n\n* chore(coding-agent): compress the atomic-job-association comments to one-line rationale\n\n* fix(coding-agent): send duplicate-id protocol errors outside the interrupt lock and reject int payloads in the captured stdout buffer\n\n* docs(coding-agent): update the kernel provisioner docstring for the REPL/IPython split\n\n* fix(coding-agent): retain the Windows bash() process handle through job cleanup and taskkill fallbacks so a recycled pid can never be killed\n\n* fix(coding-agent): serialize Windows bash() abort cleanup under the kill lock so shutdown taskkill can never race the process-handle close\n\n* fix(coding-agent): commit REPL snapshot payload and manifest atomically via unique temp files with guaranteed cleanup and parked-SIGINT restore\n\n* fix(coding-agent): stage REPL restore before an interrupt-parked apply and recover committed snapshot/restore results from protocol interrupts so a committed operation is never misreported as failed\n\n* chore(coding-agent): compress restore-shield rationale comments to one line each\n\n* fix(coding-agent): surface unattributed background output in IPython cell details and render it after the traceback in the expanded cell view\n\n* docs(coding-agent): replace stale Jupyter comm vocabulary in rlm-runtime failure modes and focused validation with stdio-transport equivalents\n\n* docs(coding-agent): describe the REPL trust boundary and runtime-bootstrap failure in stdio terms and drop the removed TokenUsage export\n\n* fix(runtime): address REPL review findings\n\n* fix(runtime): preserve near-cap snapshots\n\n---------\n\nCo-authored-by: Seth <seth@primeintellect.ai>"},{"name":"slash-commands.ts","kind":"file","size":10231,"lastCommitHash":"f8f02221eecad192c65324ebba50037505cfdac6","lastCommitWhen":"2026-08-20T13:17:52+02:00","lastCommitMessage":"feat: add generic kernel-owned MCP runtime (#1495)\n\n* feat(coding-agent): add generic MCP runtime\n\n* fix(coding-agent): harden MCP lifecycle and overrides\n\n* fix(runtime): close cancelled host request comms\n\n* fix(runtime): preserve MCP SDK result aliases\n\n* fix(runtime): preserve synchronous kernel shutdown\n\n* fix(runtime): allow MCP close retry after cancellation\n\n* feat(coding-agent): manage MCP servers from CLI and TUI\n\n* fix(coding-agent): preserve inherited stdio env names\n\n* fix(coding-agent): reserve built-in MCP identities\n\n* fix(coding-agent): allow cleanup of reserved MCP entries\n\n* test(coding-agent): update MCP command hint\n\n* fix: address MCP reload and cleanup findings\n\n* fix(coding-agent): advertise generic MCP connections\n\n* fix(coding-agent): keep MCP command results visible\n\n* fix(runtime): surface safe stdio startup diagnostics\n\n* fix(runtime): preserve startup errors through cleanup\n\n* fix(coding-agent): drop stored MCP credentials when a server is removed or replaced\n\n* fix(coding-agent): scope credential drops to generic servers and keep quoted empty argv tokens\n\n* docs(coding-agent): document the removed catalog-name override as a breaking change\n\n* fix: close kernel MCP servers during shutdown\n\n* docs: preserve changelog sections after main merge\n\n* fix: harden MCP shutdown boundaries\n\n* fix: bound graceful kernel shutdown\n\n---------\n\nCo-authored-by: Sebastian <sebastian@primeintellect.ai>"},{"name":"source-info.ts","kind":"file","size":852,"lastCommitHash":"4e5af01d73a09e78244029d766c352971b515398","lastCommitWhen":"2026-03-23T02:02:42+01:00","lastCommitMessage":"fix(coding-agent): unify source provenance, closes #1734\n"},{"name":"system-prompt.ts","kind":"file","size":8205,"lastCommitHash":"4a770d657c741044a547b490f2059c1aafb7f7a7","lastCommitWhen":"2026-08-31T21:52:03+09:00","lastCommitMessage":"make rlm spawns fail-closed: schema-bound results by default, guarded context, explicit unguarded opt-out\n"},{"name":"telemetry.ts","kind":"file","size":21587,"lastCommitHash":"9db2722ed48bcf5c2576176a463cd23d3e59eec9","lastCommitWhen":"2026-08-29T10:53:35+02:00","lastCommitMessage":"refactor(coding-agent): remove the NODE_ENV=test telemetry branch (#1848)"},{"name":"thinking-levels.ts","kind":"file","size":178,"lastCommitHash":"824a9ee3b51e839c5daefa7fe5adf9e7333a8428","lastCommitWhen":"2026-08-18T12:23:59-07:00","lastCommitMessage":"Let subagents be spawned with their own reasoning level (#1510)\n\n* feat(coding-agent): let subagents be spawned with an explicit reasoning level, fixes ENG-5301\n\n* fix(coding-agent): neutral wording for the subagent thinking option in the rlm prompt\n\n* chore(coding-agent): drop a redundant doc comment\n\n* chore(coding-agent): drop the remaining name-restating doc comments in rlm-runtime\n\n* chore(coding-agent): simplify subagent thinking validation\n\n* fix(coding-agent): preserve early thinking validation\n\n* refactor(coding-agent): centralize thinking levels\n\n* refactor(coding-agent): keep thinking validation local\n\n* test(coding-agent): retain thinking option boundaries\n\n---------\n\nCo-authored-by: Seth <seth@primeintellect.ai>"},{"name":"timings.ts","kind":"file","size":1033,"lastCommitHash":"189bb1466836a474ba98a25a0c3b43751f08fd43","lastCommitWhen":"2026-07-02T13:00:08-07:00","lastCommitMessage":"make provider failures diagnosable from logs (#313)\n\n* add structured logging and provider stream-failure classification\n\n* address review: reserved log keys, sink fallback, body request_id\n\n* address review: never auto-retry structured auth/invalid_request failures\n\n* address review: log serialization must survive circular refs and bigints\n\n* show users a concise classified error, keep the raw cause in the log"},{"name":"usage.ts","kind":"file","size":1989,"lastCommitHash":"08544de14b3a32e1e71912939d484f0443372e0c","lastCommitWhen":"2026-06-12T14:40:54-07:00","lastCommitMessage":"add /context command for agent and sub-agent overview (#156)\n\n* add /context command with agent and sub-agent usage tree, alias /usage to it\n\n* derive disk child status from stop reason and sum only branch entries\n\n* match attributions by target across branches and estimate trailing context tokens\n\n* document and test cumulative spend totals across compaction"},{"name":"websearch-credential.ts","kind":"file","size":350,"lastCommitHash":"d773015ba9b1f3e9d17a5eb801601f7688792fcf","lastCommitWhen":"2026-06-24T20:37:36-07:00","lastCommitMessage":"feat(coding-agent): bundle default websearch skill (#86)\n\n* feat(ai): add Claude Opus 4.8 to Prime Inference\n\n* feat(coding-agent): bundle default websearch skill\n\nShip a Serper-backed websearch Python skill with Prime Agent so web\nsearch works without manually installing a skill package. Bundled\nskills load by default and are overridden by user/project/package/CLI\nskills with the same name; --no-skills excludes them.\n\n* fix(coding-agent): resolve bundled skills dir by src checkout\n\nMatch the established srcOrDist asset convention: pick the package-root\nskills dir on source checkouts and dist/skills otherwise, so a stale\ndist/ from a prior build does not shadow live source edits.\n\n* fix(coding-agent): configure bundled websearch skill\n\n* fix(coding-agent): clarify websearch startup warning\n\n* store serper websearch key via /login instead of env var\n\nAdd the Serper key as an api-key credential in the /login screen so it is\nstored in auth.json and injected into the kernel as SERPER_API_KEY; an env\nvar still takes precedence. Drop the startup warning and make the skill's\nmissing-key error instruct the agent to guide the user through /login.\n\nAlso fix two websearch.py bugs: bad numeric env vars no longer crash run(),\nand truncation stays within max_output.\n\n* put serper under a services tab in /login and read its key from auth.json\n\nAdd a Providers/Services tab split to the /login selector (left/right to\nswitch) so the Serper web-search credential lives under Services instead of\nbeing buried in the provider list. Skip the post-login model picker for\nservice credentials.\n\nThe websearch skill now resolves its key from SERPER_API_KEY or auth.json on\neach call, so a key added via /login works even when the kernel started\nfirst.\n\n* harden websearch key resolution and login tab cursor handling\n\nAddress review feedback: resolve the Serper key from a programmatic (SDK)\nagentDir by exporting it to the kernel, ignore non-mapping auth.json and\n\"!command\" key references instead of crashing or sending them verbatim, and\nonly steal left/right for tab switching when the /login search field is empty\nso cursor editing still works.\n\n* resolve serper key via auth storage and fix login tab layout\n\nInject the Serper key resolved through AuthStorage (handles literal, env-var,\nand !command credential forms) into the kernel when websearch is active,\nusing the session's own storage so it is correct for SDK-injected managers.\nThe skill's mid-session auth.json fallback now resolves env-var-reference\nkeys too. Reserve the extra rows the /login tab bar consumes so the selector\nno longer overflows small terminals.\n\n* always export agent dir for websearch and clamp truncation\n\nExport PRIME_AGENT_CODING_AGENT_DIR regardless of the bundled-skill setting so\na --skill or project websearch copy can still locate auth.json; only the key\ninjection stays gated on the bundled skill. Hard-clamp truncated output so it\nnever exceeds max_output when the budget is smaller than the marker.\n\n* scope agent dir to explicit config and use callable skill form in docs\n\nPass agentDir to the session only when the caller set it explicitly, so an\ninjected custom auth storage backed by another directory is not overridden by\nthe default path. Update the websearch docs to call the skill directly. Trim\ncomments.\n\n* gate serper key injection on a loaded websearch skill, not settings\n\nInject the key whenever any websearch skill is loaded (bundled, --skill, or\nproject), so a custom skill relying on the agent to resolve command-backed\ncredentials still works when bundledSkills.websearch is off.\n\n---------\n\nCo-authored-by: Kevin Thomas <kevin.jt2007@gmail.com>"}]