[{"name":"acp","kind":"directory","size":0,"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":"agent-connection","kind":"directory","size":0,"lastCommitHash":"b2ea96f2fa7ab68f22c2735f6130e7196b754e6c","lastCommitWhen":"2026-09-17T22:39:15+03:00","lastCommitMessage":"coding-agent: clear the session search deadline when a roster miss resolves\n"},{"name":"agents-view","kind":"directory","size":0,"lastCommitHash":"988e4f41dd25a6f3df9cfc66f45496d630be1969","lastCommitWhen":"2026-09-17T08:25:36+03:00","lastCommitMessage":"fix: reconcile the rebased fork with upstream's refactors\n\nSecond pass over the residue the rebase left behind: the tree now\ntypechecks and lints clean, and the touched suites pass.\n\n- finish the credential reconciliation (firstCredential readers, MCP\n  static tokens, prime-cli config read/write helpers and the private\n  prime-cli accessors the fork's call sites need)\n- restore dropped wiring: the bash.consumed host request, the MCP\n  discovery assertions in the kernel ready check, and the snapshot\n  extras (activity, tool use, previews, labels, staleness) on kernel\n  roster entries next to the fork's turn/token accounting\n- rebuild the interactive-mode class fields and the /reload + /usage +\n  /context dispatch, and restore the async-bash header snippet\n- re-merge the agents view on upstream's newer file instead of the\n  per-commit resolutions, so the fork's view model survives: the\n  actions pane and its renderSessionRows early return, compactSessionRows\n  over the raw allRows, the pinned/expanded row markers and the\n  completed/needs-input icons, the running-subagent rows, and the\n  model-plus-host row label. upstream's timer-batched catalog reconcile\n  and its rebuild-free tick loop are kept, with a live cache ttl counted\n  as work so the ttl keeps counting down; the tray label providers dropped\n  upstream's redundant inline-picker guard\n- skip the quota wait when an unblocked sibling credential exists, so\n  the fork's quick account rotation still wins over a long Retry-After\n- restore real timers in the compaction regression suite, which the\n  preceding fake-timer test left mocked, and hold the fork's contracts in\n  the queue suite (200-message ceiling, batched steering) and the 4649\n  name-reservation test\n- drop upstream's subagentDefaultModel suite and its inherit-parent case:\n  this fork keeps an explicit model= on every spawn\n- move the deferred-session-event tests back to top level and wait on\n  the connection's own status sequence instead of a wall-clock poll\n- keep the fork's lazy session-open and sqlite catalog paths as the\n  session-loading fast path\n"},{"name":"daemon","kind":"directory","size":0,"lastCommitHash":"9e09089b2ac775e427e112e948d2aca2d3b55043","lastCommitWhen":"2026-09-17T22:18:11+03:00","lastCommitMessage":"fix(coding-agent): attribute worker exit reasons and defer heartbeat stops for busy workers\n"},{"name":"interactive","kind":"directory","size":0,"lastCommitHash":"bebad881b47634cff2ea4322af7c151b19fd8536","lastCommitWhen":"2026-09-17T14:54:49+03:00","lastCommitMessage":"fix(coding-agent): recover a window whose daemon session is unrestorable instead of exiting\n"},{"name":"rpc","kind":"directory","size":0,"lastCommitHash":"2ce443175b55a32075aa23ae41676a16b771d662","lastCommitWhen":"2026-09-06T23:14:48-04:00","lastCommitMessage":"fix: improve Windows session and Python reliability (#2036)\n\n* fix(coding-agent): resolve the kernel venv python under Scripts on win32\n\nuv creates <venv>/Scripts/python.exe on Windows, but both bootstrap sites\njoined <venv>/bin/python unconditionally, so first-run kernel bootstrap\nalways failed on native Windows. Mirror the existing win32 uv.exe branch\nwith one kernelVenvPython helper used at both sites.\n\n* fix(coding-agent): expand ~/ with the platform path separator\n\nTilde expansion concatenated homedir() with the posix remainder at three\nsites (expandPath, expandTildePath, and an inline PI_PACKAGE_DIR copy),\nproducing mixed-separator paths like C:\\Users\\u/rest on Windows. Join\nthrough the platform path module instead and route PI_PACKAGE_DIR through\nexpandTildePath.\n\n* fix(coding-agent): prefer non-System32 bash over the WSL trampoline on PATH\n\nfindBashOnPath took the first where-match, and System32\\bash.exe (the WSL\nlauncher, which executes Linux-side) precedes per-user Git Bash installs on\ndefault PATHs. Order matches so %SystemRoot% entries are only a last\nresort.\n\n* fix(coding-agent): dial the Herdr socket inside the named-pipe namespace on win32\n\nThe built-in Herdr reporter connected to the exported unix-style socket\npath verbatim; on Windows a local-domain connection must target\n\\\\.\\pipe\\, and the reporter swallows connect errors by design, so the\nmismatch was invisible. Map unmapped paths into the pipe namespace before\ndialing.\n\n* fix(coding-agent): cache the win32 process start id per pid for a short TTL\n\ngetWindowsProcessStartId spawns a synchronous powershell query that blocks\nthe event loop, and supervisor liveness checks plus daemon-ps poll loops\ncall it repeatedly for the same pid. Memoize successful ids for 5s so hot\npaths reuse one query.\n\n* fix(coding-agent): derive handshake budgets from the outer connect deadline\n\nconnectWorker granted every hello/worker_auth attempt a fixed 1s clock, so\na handshake that consistently needs longer (slow win32 boxes) failed every\nretry regardless of the 30s outer budget, and the adopt/recover paths\nshrank even the outer budget to 1.5-2s. Per-attempt waits now consume the\nremaining outer deadline, all connectWorker callers use the one 30s\nconstant, and the downward 1s hello/auth overrides in daemon-mode and the\nrouted client fall back to the client defaults.\n\n* fix(coding-agent): route background spawns through hidden-window wrappers\n\nwindowsHide defaults to false, so console-subsystem children of a\nwindowless daemon or detached worker allocate a fresh console and flash or\nsteal focus on every spawn; only one call site in the repo set the flag.\nAdd spawnHidden/spawnSyncHidden/execSyncHidden/execFileHidden/\nexecFileSyncHidden to utils/child-process.ts and migrate all 49\nnon-interactive coding-agent spawn/exec sites; the tui package's two\nbackground spawns set windowsHide inline. Interactive spawns (editors,\ninherit-stdio installers and relaunches) intentionally keep their console.\n\n* chore(coding-agent): add windows-seams changelog fragments; tighten new comments\n\n* test(coding-agent): align clipboard and login-dialog spawn assertions with hidden-window wrappers\n\n* revert(coding-agent): drop the win32 start-id TTL cache\n\nThe per-pid cache could hand a recycled pid the dead process's start id\nfor up to 5s. The start id exists solely to detect pid recycling, and its\nconsumers act on that identity: the orphan-process journal decides\ntaskkill /T from it and daemon-ps shutdown waits poll it for change, so a\nstale match can kill a replacement process tree or mask an exited owner.\nNo caller is both hot and staleness-tolerant; the handshake latency issue\nis already addressed by deriving budgets from the outer deadline.\n\n* fix(coding-agent): match Herdr pipe-namespace prefixes case-insensitively\n\nWindows pipe names are case-insensitive, but the pass-through check was\ncase-sensitive, so a valid \\\\.\\PIPE\\... target was re-joined into a\ndifferent pipe name and the error-swallowing reporter failed silently.\nLowercase only the prefix check; the returned path keeps its casing.\n\n* refactor(coding-agent): tighten windows-seam comments and consolidate pins\n\nCollapse the wrapper doc block to one line, drop test comments that restate\nassertions, share one recording wrapper in the child-process mock, unwrap\nsingle-test describes, and remove one posix assertion already covered by\nits sibling. No behavior coverage removed; all pins keep their failing\nassertions.\n\n* fix(coding-agent,tui): harden current-runtime Windows sessions\n\nImport selective Bun-independent fixes from #1994 at\nce2d04f872ae7df567e68695aa258a1a5cdf254c, relative to declared\n#1982 base 9680ac3dfa8bdafae0f9e53286e2274d8b9c9090.\n\nPreserve #2036 Windows seams and current Node runtime. Keep Bun,\ninstaller, shell-policy rollout, scratch directories, and CPython\nbatch overrides outside this consolidation. #1994 remains partial.\nAtomic writer and bootstrap-lock overlap awaits canonical #2035\nreconciliation after parent stacks land.\n\n* fix(coding-agent): normalize Windows bash candidate paths\n\n---------\n\nCo-authored-by: Seth <seth@primeintellect.ai>"},{"name":"session-worker","kind":"directory","size":0,"lastCommitHash":"165628f0da99fc4fbe1e4db052db74a2d1e909fb","lastCommitWhen":"2026-09-17T06:56:05+03:00","lastCommitMessage":"coding-agent/modes/session-worker: decode frames without re-copying the buffer\n"},{"name":"shared","kind":"directory","size":0,"lastCommitHash":"03c3ca484fbaa7f610a185df65fd73b05599651a","lastCommitWhen":"2026-09-17T05:52:15+03:00","lastCommitMessage":"feat(coding-agent,runtime): rebase minimal runtime extensions on upstream 0.9.3\n"},{"name":"command-autocomplete.ts","kind":"file","size":1387,"lastCommitHash":"c8b6cbb670a8e1f1c1384620c1144d52cdf967fb","lastCommitWhen":"2026-09-17T07:09:58+03:00","lastCommitMessage":"feat(coding-agent): complete extension command arguments in daemon-attached clients\n"},{"name":"headless-completion.ts","kind":"file","size":4594,"lastCommitHash":"71766abb2c1e427382871c77d2dc3896164a3456","lastCommitWhen":"2026-09-08T22:31:51-04:00","lastCommitMessage":"Static system prompt across refinements; harness state moves in-context (RES-1318) (#2098)\n\n* feat(coding-agent): keep the system prompt static across refinements and deliver harness state in-context\n\nFixes RES-1318.\n\nApplying a refinement no longer rebuilds and swaps agent.state.systemPrompt,\nso the provider prefix cache survives every refinement. Instead:\n\n- _applyRefine appends one durable refinement_notice custom message per\n  applied refinement at the apply seam, labeled [auto-refinement] /\n  [user-refinement] / [self-refinement] by source, with the trigger line and\n  applied edits in the digest's own notation (rollbacks print as rollbacks).\n  Zero-applied-edit refinements emit nothing and the notice never starts a\n  turn. convertToLlm passes the new type through as a user message while the\n  refinement_outcome audit message stays filtered and untouched.\n- The harness digest injection is removed from the system prompt entirely\n  (buildSystemPrompt loses the harnessState option). The digest now appears\n  at cold context boundaries only, reusing formatHarnessStateForPrompt\n  byte-identically: fresh sessions get a digest custom message as the first\n  context message; compaction attaches a digest snapshot to the compaction\n  entry mechanically (never through the summarizer) so the post-compaction\n  head message renders memories-first before the summary on both the initial\n  and update-merge paths; resumes append a fresh digest at the tail only when\n  the newest digest in live context no longer matches disk state (identity\n  dedupe), which is also the migration path for pre-change sessions.\n\nThe new compaction entry field and custom message types ride the existing\nschema-tolerant JSON entry stream (optional field, generic custom messages):\nbackward-compatible, no daemon protocol or schema revision change.\n\n* test(coding-agent): adapt message-sequence pins to the session-start harness digest\n\nEvery session now opens with a harness_digest custom message, so tests that\npinned exact message sequences, first-message identity, provider-context text\nlists, or entry counts see one extra leading custom message. Adds a\nconversationMessages helper to the suite harness (filters the digest) and\nupdates the affected assertions; provider-context probes now select the last\nuser message instead of the first.\n\n* fix(coding-agent): harden harness digest recency and keep digests out of the summarizer\n\nReview fixes on #2098:\n\n- _latestContextHarnessDigest picked the last digest by array position, but\n  retained pre-compaction messages are presented after the compaction head\n  while being chronologically older, so an old retained digest could defeat\n  resume dedupe. Recency is now the greatest message timestamp among all\n  in-context digest carriers.\n- The session-start harness digest entry was fed to the first compaction's\n  summarizer as an ordinary custom message. prepareCompaction now excludes\n  harness_digest entries from summarizer input; the digest is only attached\n  mechanically at the new compaction head.\n\n* fix(coding-agent): label non-serialized refine.run notices as self-refinement\n\nReview fix on #2098: _consumePendingRequestedRefine forwarded agent-callable\nrefine.run requests through refine() without a source, so the notice carried\nthe [user-refinement] label in non-serialized sessions. refine() now accepts\nan explicit source override and the pending-request consumer passes \"self\".\n\n* test(coding-agent): pin the self source on the pending refine.run consumer\n\n* fix(coding-agent): treat the digest as boundary-injected mechanical context everywhere\n\nReview round on #2098 (three findings):\n\n- Untouched sessions stay empty: the fresh-session digest is now injected\n  lazily at the first committed turn instead of at construction, so\n  abandoned-draft cleanup and raw message-count emptiness checks\n  (daemon-session-list lifecycle/activity, isEmptyDraftContent, branch\n  seedability, hasExistingSession) keep seeing an empty session. Non-empty\n  contexts (resume) still inject at construction with identity dedupe.\n- Tree navigation is a cold boundary: navigateTree rebuilds the context, so it\n  now runs the same refresh-iff-stale digest check as resume (fork/clone/switch\n  construct a new session and were already covered by the constructor path).\n- Headless terminal selection skips harness_digest like other non-output\n  customs, so resume-and-print returns the saved final assistant output.\n\nSweep of other message-kind-sensitive consumers: branch summarization now\nexcludes harness_digest from summarizer input (same rule as compaction);\nestimateContextTokens and side-question seeding intentionally keep the digest\n(it is live context); _repliedToParentSinceTask and getUserMessagesForForking\nare kind-filtered already.\n\n* chore(coding-agent): trim narrative comments and redundant test asserts on the digest work\n\nComments cut to one-line invariant guards; duplicate digest-notation and\ncontent asserts removed where a kept unit pin already covers the same\nrendering (labels and notation stay pinned in refinement-outcome-message.test,\nsource plumbing stays pinned per path). No behavioral change.\n\n* fix(coding-agent): scope the first-turn digest to the turn that delivers it\n\nReview fix on #2098 (Bugbot thread 2919fcf3): the first-turn digest was\npersisted directly at commit, before agent.prompt ran, so cancelling or\nclearing that first turn stripped the turn's captured messages but left the\ndigest in state and in the session file - resurfacing the emptiness-check\nclass through the cancel path. The digest now rides the turn's next-turn\ndelivery records: it persists at message_end like the rest of the turn,\nfirst-turn cancellation strips and restores it with the turn, and the lazy\ninjection re-delivers on the next committed turn.\n\n* test(coding-agent): event-order pins include the digest custom pair on the first turn\n\n* fix(coding-agent): deliver the first-turn digest on skip-policy turns and re-arm on cancel\n\nTwo follow-up review findings on the lazy-injection shape:\n\n- Custom-triggered turns use the skip next-turn-context policy, so a fresh\n  session whose first turn was sendCustomMessage(triggerTurn) ran without the\n  digest. The pending digest now attaches on every committed first turn; skip\n  policy still withholds ordinary pending next-turn messages.\n- A cancelled first turn whose digest record was already durable dropped the\n  digest from live context without restoring it (restorable records skip\n  durable ones). Lazy injection now owns digest delivery uniformly: cancelled\n  turns never restore the digest message and instead re-arm the pending flag,\n  so the next committed turn re-delivers a fresh one.\n\n* fix(coding-agent): never park the harness digest as pending next-turn context\n\nReview fix on #2098 (Bugbot skip-turn-digest-lost-on-failure): a failed commit\nparked the undelivered digest in _pendingNextTurnMessages, which skip-policy\ncustom-trigger turns never drain, and a parked copy plus a re-armed injection\ncould double-deliver. Parking now filters the digest out and re-arms\n_harnessDigestPending instead, keeping lazy injection the single owner of\ndigest delivery."},{"name":"index.ts","kind":"file","size":3932,"lastCommitHash":"367511225ebf6f5207e6d56c38f342f2f3e3579e","lastCommitWhen":"2026-09-05T20:43:57+02:00","lastCommitMessage":"feat(coding-agent): agents-view usage columns, section legend, empty-session sort, zebra striping (#2056)\n\n* feat(coding-agent): add optional agentsZebraBg theme color\n\nOptional background token for alternate agents-view rows. Unset or empty\ndisables striping, so existing custom themes stay valid; built-in themes\nget subtle values.\n\n* feat(coding-agent): agents-view usage columns, section legend, empty-session sort, zebra rows\n\n- Row details become aligned columns: in/out tokens, own cost, total\n  descendant count (explicit 0), recursive total, age. Empty sessions\n  (no messages) keep only the age.\n- Descendant counts roll up through the same unfiltered enumeration as\n  recursive costs (computeRecursiveCosts -> computeRecursiveRollups),\n  so passive/saved children are counted for inactive sessions too.\n- Every section header shows its row count and a bold right-aligned\n  usage legend.\n- Empty sessions sort last within their section, except the session the\n  view was entered from, which keeps its recency slot.\n- Session rows zebra-stripe per top-level block, restarting at each\n  section header; selection highlight takes precedence and the stripe\n  uses the optional agentsZebraBg theme color.\n\n* feat(coding-agent): share one per-section column layout between the agents-view legend and rows\n\nColumn width = max(widest row value in the section, legend label width);\nlegend labels and row values are all right-aligned into those columns, so\nthe ' . ' separators land in the same terminal column for the legend and\nevery row. Widths are per section, so an expensive row widens only its own\nsection, and empty sections show the legend at natural label widths.\n\n* fix(coding-agent): keep the agents-view zebra stripe on the light side of the real terminal background\n\nA theme stripe darker than the actual terminal background (or too close to\nit) rendered as black bands. When the terminal background is known, keep\nthe configured stripe only if it sits on the contrast side with a minimal\ndelta; otherwise re-derive a subtle stripe from the terminal background,\nlike the popup surfaces do.\n\n* fix(coding-agent): keep an end-of-list selection visible under the leading ellipsis\n\nThe prepended ellipsis consumed a viewport line without shifting the\ncontent window, so a selection at the very end of the agents list was\nsliced out of view. Pre-existing on main; surfaced by review on #2056.\n\n* fix(coding-agent): roll up only subagent descendants, not branched-session lineage\n\nBranch/fork headers point parentSession at the source while keeping the\nsource's rlmDepth, so the rollup walk counted a branched chat as a\ndescendant and double-booked its copied-transcript cost. Count a child\nonly when it is a subagent by runtimeKind (resident) or deeper rlmDepth\n(saved).\n\n* fix(coding-agent): judge the zebra stripe on its rendered 256-color value\n\nQuantization can collapse the configured stripe onto the terminal\nbackground's own palette cell (e.g. #202020 and #1c1c1c both map to\ncell 234), so the keep/re-derive decision now uses the rendered\nbestAnsiColor value like the selection color path does.\n\n* revert(coding-agent): remove agents-view zebra striping at user request\n\nThe stripe conflicts visually with the selection highlight. Removes the\nzebra rendering, the agentsZebraBg theme token, and the adaptive-stripe\ncontrast logic with its pins; history and the PR discussion preserve the\nadaptive-contrast approach if striping is ever revived. Columns, legend,\nsort anchor, and viewport fixes stay.\n\n* fix(coding-agent): stop nesting branched sessions under their source in the agents view\n\nThe rollup walk already excluded branch/fork lineage from #sub and $total,\nbut the tree still nested any saved child with parentSessionPath and the\nexpander counted it, so a source could show '1 subagent' next to #sub 0.\nThe nesting decision now shares the rollup's subagent-lineage predicate: a\nbranched/forked session renders as its own top-level row, matching how the\ndaemon reports resident forks (runtimeKind top-level)."},{"name":"model-autocomplete.ts","kind":"file","size":757,"lastCommitHash":"ecc2660c25837ffc4fbdefe8862feeb116c71da6","lastCommitWhen":"2026-07-17T17:11:36-07:00","lastCommitMessage":"show public models and authenticate on selection (#454)\n\n* fix model authentication in selector (ENG-4575)\n\n* fix stale model auth and autocomplete (ENG-4575)\n\n* fix selector navigation (ENG-4575)\n\n* fix configuration menu navigation (ENG-4575)\n\n* fix scoped model navigation (ENG-4575)\n\n* fix post-login model catalog state (ENG-4575)\n\n* update post-login model regression (ENG-4575)\n\n* sync agents view models after auth (ENG-4575)\n\n* keep model menu open on switch failure (ENG-4575)\n\n* restore model menu after switch failure (ENG-4575)\n\n* fix(coding-agent): reconcile selector auth state\n\nfixes #454\n\n* test(coding-agent): complete selector registry fixture\n\nfixes #454\n\n* fix(coding-agent): align model auth gating\n\nfixes #454\n\n* fix(coding-agent): expose full scoped model catalog\n\nfixes #454"},{"name":"print-mode.ts","kind":"file","size":6192,"lastCommitHash":"276b6404e6e7bb71786a3bf91ca73c1e8c5f9679","lastCommitWhen":"2026-08-04T13:33:11+02:00","lastCommitMessage":"fix(coding-agent): release print session on SIGINT (#604)"}]