You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Atomic declares @earendil-works/pi-{agent-core,ai,tui} at ^0.83.0 across six workspace packages. Upstream has shipped v0.84.0. This issue covers both halves of a sync: bumping the consumed artifacts and porting the upstream packages/coding-agent source changes into the Atomic fork, which maintains its own copy of that tree.
Measured scope (from a clone of earendil-works/pi at the tags):
The last sync classified 63 commits and ported 8. This one is 5.4× larger. Note that 119 bullets is a user-visible projection of 341 commits: a bullet-complete matrix is necessary but not sufficient, and plan step 4 (upstream evidence capture) remains the authority for commit-level completeness.
2. Decisions required before any porting begins
These three gate the work. Making them first collapses most of the ambiguity below.
Because we fork that tree, deferral is not free — any ported source importing them drags them in. The decision is binary and resolves 14 absent files at once (§6.2, Group 1):
Adopt — add both dependencies, create all 14 files.
Defer — exclude the importing source paths, mark all 14 not applicable, and record the exclusion as an intentional divergence.
2.2 RemoteSession versus Atomic's isolated interactive engine
v0.84.0's pi-client/pi-protocolRemoteSession is upstream solving out-of-process session control — a problem Atomic already solved with src/modes/interactive-engine/** (create-isolated-runtime.ts, engine-dialog-host.ts, remote-component.ts, engine-diagnostic-view.ts).
v0.83.0 already forced an intentionally adapted classification for cefa40ed, because upstream's unconditional await this.session.abort() in teardown would hang every session replacement on a dead engine (our facade's abort is the unbounded abortAndRecover()).
Decide deliberately: adopt upstream's, keep ours, or bridge. A bulk port must not silently reintroduce upstream's blocking teardown.
2.3 Atomic's AI_AGENT value
Upstream adds AI_AGENT=pi to CLI and RPC child environments. AI_AGENT is currently unset anywhere in this repo (verified). Choose Atomic's value, and propagate it to subagent and workflow child processes, not only CLI/RPC.
3. Porting rules
3.1 Clean break — no compatibility shims unless pi ships one
Atomic does not keep a back-compat path unless pi keeps one. If upstream removed or re-shaped an API, the fork takes the break at the call site. No adapters, type aliases, overloads, defaulted parameters, or re-exports. Review-blocking. These seven are where a shim tends to appear on its own:
Break
Shim to not write
ModelsStreamTransforms → ModelsRequestTransforms
No export type ModelsStreamTransforms = … alias. Rename every reference.
message_update delta-only
No cumulative message reconstruction in rpc-output-buffer/rpc-event-buffer to keep old consumers alive.
getApiKeyAndHeaders() → ProviderHeaders with string | null
No null-stripping normalization. null is a deletion marker and must reach pi-ai intact — stripping it re-opens #7030.
ModelRegistry.refresh() → ModelsRefreshResult
No overload retaining the old call. Callers handle provider errors and cancellation.
No wrapper that still accepts catalog-refresh options and quietly refreshes.
v4 Session/SessionStorage/SessionRepo
No re-export or reimplementation of the deleted JSONL / in-memory repo APIs.
FileSystem.renameFile() required
No default or mixin implementation. Implement real same-filesystem replacement.
Where pi does ship a compatibility path — createProvider({ fetchModels }) needing no migration, scrollbarThumb falling back to selectedBg, opt-in compat.supportsFinishReason — mirror it exactly, no more and no less.
3.2 Divergence is not an exemption
A legitimate upstream fix is taken. If our architecture differs, the fix is reworked into our shape and classified intentionally adapted. Owning the module is what obliges us to carry the fix, not what excuses us from it.
Where we diverge deliberately (§5), we keep the divergence and still absorb the fix.
3.3 Matrix classification — five categories, with an evidence bar
Use the five categories already established by research/pi-0.83.0-port-matrix.md:27-31. Do not collapse them to three: intentionally adapted is where architecture divergence gets stated, and equivalent is where Atomic already had the behaviour. Both vanish under a port/inherit/N-A split, and a hidden intentionally adapted row is indistinguishable from the shim §3.1 forbids.
Category
Bar
ported
Upstream behaviour present in Atomic-owned source.
intentionally adapted
Behaviour present, mechanism differs because our architecture differs. The difference must be stated.
inherited dependency
Lives in packages/{ai,tui,agent}, consumed as exact-resolved 0.84.0.
equivalent
Atomic already had the behaviour. Requires a named passing test. A plausible filename is not evidence.
not applicable
No behavioural analogue exists here — never merely "ours looks different".
pi-telemetry is not an adoption decision. Both pi-agent-core and pi-ai depend on @earendil-works/pi-telemetry@^0.84.0, so it lands in package-lock.json and the published shrinkwrap regardless. Four@earendil-works/pi-* packages must resolve at 0.84.0, single instance each — not three.
grok-mermaid@0.2.2 is a new third-party package, so the committed .npmrc gate applies: min-release-age=2 can block the install outright if the version is fresh, and save-exact=true governs the pin. It must also land in the published shrinkwrap.
Apply the #2101 reconciliation rule unchanged: on conflict, pi's transitive pin wins, downgrades included. Reconcile the open Dependabot queue against pi's pins before landing any bump.
4.4 Committed artifacts carrying stale pins
Artifact
Stale 0.83.0 refs
Action
package-lock.json
18
npm install --package-lock-only --ignore-scripts
packages/coding-agent/npm-shrinkwrap.json
10 (incl. its own dep block, lines 14-16)
npm run shrinkwrap:coding-agent
npm run check:shrinkwrap only validates; it does not regenerate. The shrinkwrap ships inside @bastani/atomic, and scripts/cut-release.ts:170 regenerates it again at release time.
4.5 Binary build — the Haswell fix is half-solved, and not where it looks
There is no --target on the compile step (the earlier --target=bun calls are bundling). Meanwhile publish.yml:150-153 sets RUSTFLAGS=-C target-cpu=x86-64-v2, which constrains only the Rust native addons.
Four filenames collide by name inside a module graph four times larger. A file-wise application of the upstream compaction diff will either overwrite Verbatim Compaction or leave two competing implementations. Every upstream compaction commit needs a hand-placed intentionally adapted row.
5.2 The Copilot subsystem has no upstream counterpart
Checked against git ls-tree v0.84.0 packages/coding-agent/src — all absent upstream:
Atomic reached endpoint routing, provider display naming, model restoration, and retry classification independently. Per §3.2, the four v0.84.0 Copilot bullets are re-decided against our modules and reworked in, not skipped:
Upstream bullet
Requirement
Copilot compaction/branch summaries using the Individual rather than credential-resolved Business/Enterprise endpoint (#6768)
Prove by test that our calls already resolve Business/Enterprise. If any path resolves Individual, rework the fix into copilot-env-routing.ts.
Extension model calls dropping credential-resolved endpoints (#7579)
Verify all five builtin extensions, not one representative call site.
Gated on #2204 — see §5.3. Sequencing, not a decline.
Copilot models restored via account-specific policy responses (#7672)
Diff against model-runtime-restoration.ts; port if absent.
5.3 Sequencing hazard: #7560 widens the blast radius of open bug #2204
#2204 is open and lives in our own openai-responses-payload-sanitizer.ts. On the github-copilot + openai-responses path, across a model-identity mismatch, the sanitizer synthesizes a 64-character function_call.id that the server rejects with 400 invalid_request_body. It is deterministic, nothing auto-retries it (agent-session-retry.ts does not classify HTTP 400), and the session cannot progress.
#7560 moves Copilot Grok 4.5 onto that exact API surface. #2204 must land before or with the #7560 port.
6. Work inventory
6.1 Breaking changes to absorb
Upstream break
Atomic surface
ModelsStreamTransforms → ModelsRequestTransforms
src/core/model-runtime-streaming.ts. Header transforms now apply to all authenticated requests, not just streams.
src/core/provider-composer-internal.ts, src/core/extensions/{provider-types,api-types}.ts. The fork owns this surface — a port, not inherit. No companion package registers a provider (N/A for those).
v4 lane-based Session/SessionStorage/SessionRepo; v2 session + AgentHarness promoted out of experimental
55 of 78 changed files (70%) exist in Atomic at the same path — diffs are path-aligned and the fork has not drifted structurally on them. The 23 absent files resolve to three decisions, not 23:
Group 1 — remote-session stack: 14 files, one decision (§2.1).
Verified, not assumed. Each is real work behind an architectural divergence:
Upstream fix
Atomic state
Manual /compact racing threshold auto-compaction (#7370)
Strictly worse than upstream.agent-session-compaction.ts:231refuses the operation: "Automatic compaction is already in progress; wait for it to finish before compacting manually." Upstream fixed the race so it proceeds.
Messages queued during manual /compact failing
No analogue.agent-session-compaction.ts contains no queue handling at all.
Truncated responses compacting and retrying once (#7540)
Not covered by truncated-range-recovery.ts, which parses compaction planner deletion records on a length stop — a different layer. Port as a behavioural diff against the length-stop handling at agent-session-auto-compaction.ts:179,256.
6.4 Features to pick up
Fullscreen TUI mode — sticky editor/footer dock, independently scrollable transcript, draggable scrollbar (auto/always/hidden), page-scroll and marked-message shortcuts, stacked transient notifications, runtime mode switching, optional scrollbarThumb theme color, mouse wheel step reduced 3 → 1 lines. Audit every Atomic theme and how our workflow/subagent widgets behave in the sticky dock.
Mermaid + LaTeX rendering, with optional render-while-streaming.
Arbitrary OpenAI-compatible samplingParams in models.json, model overrides, extension providers, and stream options; opt-in vLLM thinking_token_budget.
CredentialSynchronizationError — credential changes that commit but fail to sync local model state. Handle explicitly, do not fold into the generic path.
AgentHarness v2 scaffold — unfinished operation paths reject with HarnessNotImplementedat runtime, not compile time. Enumerate which operations we reach.
Optional cancellation on pi-ai ModelsStore reads/writes/deletes — audit that our store calls pass the signal on cancellable paths.
Opt-in Ctrl+P/Ctrl+N prompt history — see keybinding collisions in §6.5.
6.5 Fixes landing on real Atomic surface
Upstream fix
Atomic surface
anyOf/oneOf union arm preserved before coercion (#7328)
Highest-value inherited fix in the release.packages/subagents tool schemas (skill, reads, output are anyOf of string | boolean | string[]), packages/workflows inputs. Add regression coverage rather than assuming green.
setToolsExpanded(false) no-op when already collapsed (#7292)
We are the reported symptom: subagents/src/extension/index.ts:295, subagents/src/slash/slash-commands.ts:271, workflows/src/extension/wiring.ts:397
Extension model calls dispatch through the coding-agent model runtime (#7325)
web-access/summary-review.ts, web-access/web-search-summary.ts. One coherent change with the ProviderHeaders break and #7579.
Oversized images from extension/built-in tools resized (#7330)
web-access/{content-tools,github-api,video-extract,youtube-extract}.ts emit base64 payloads; new module required (§6.2).
We already bind raw pageUp/pageDown: workflows/src/tui/stage-chat-view-input.ts:171-175, prompt-card-select.ts:83-86, keybindings-adapter.ts:53-54. Check precedence in both TUI modes, together with Ctrl+P/Ctrl+N.
6.6 Inherit-only (arrive with the bump; evidence is a green suite)
pi-ai provider fixes: Fireworks GLM 5.2 prompt_cache_retention + session affinity (#7676); provider error normalization preserving arrays and class instances (#7205); Anthropic streams retaining initial content-block text/thinking (#7358); Google history conversion preserving signed empty blocks (#7362); Gemini 3 tool call ids preserved (#7494); OpenAI Codex WebSocket sessions no longer shared across credentials (#7364); transient Google GenAI/Vertex retries (#7471); OAuth refreshes releasing the credential-store lock (#7508); OpenCode Go display name.
Model catalog updates — cross-check docs/models/model-selection.md and any pinned stage models: GPT-5.6 Terra/Luna pricing; Fireworks Kimi K3 on the OpenAI-compatible API; Groq Qwen override for qwen/qwen3.6-27b; retired qwen3.8-max-preview → qwen3.8-max (#7670).
Build the commit-by-commit port matrix (§3.3) over 107 forked-tree commits, stating expected size so truncation is visible.
Bump the three pi packages to ^0.84.0 in all six packages including peer blocks; refresh package-lock.json; regenerate the shrinkwrap; reconcile grok-mermaid and undici against the Dependabot queue.
Port packages/coding-agent/src, absorbing every §6.1 break and the §6.3 gaps.
npm run check, npm run test:all, npm run test --workspace=@bastani/atomic, npm run test:scripts; verify the Bun-compiled binary on macOS/Linux/Windows including the baseline x64 target.
Update packages/coding-agent/docs (§6.7) via the release-docs workflow; add packages/*/CHANGELOG.md entries under [Unreleased] for user-visible surface only.
8. Acceptance criteria
Decisions
Client/protocol adoption decided before matrix work; all 14 Group 1 files resolved by it.
RemoteSession ↔ isolated-engine overlap resolved by an explicit written decision, not by default.
Atomic's AI_AGENT value chosen and propagated to subagent and workflow children.
Dependencies and artifacts
No ^0.83.0 pi reference in any package.json, dependency or peer block.
package-lock.json (18 stale refs) and packages/coding-agent/npm-shrinkwrap.json (10) regenerated; four@earendil-works/pi-* packages resolve at 0.84.0, single instance each, pi-telemetry included.
grok-mermaid@0.2.2 reconciled against .npmrcmin-release-age/save-exact and present in the shrinkwrap.
build:binary compiles against Bun's baseline x64 runtime; RUSTFLAGS=-C target-cpu=x86-64-v2 retained for the natives; both verified on x64 legs.
Matrix integrity
A row for all 119 upstream bullets and all 107 forked-tree commits; expected sizes stated.
Five categories used; every equivalent row cites a named passing test; no row is equivalent or N/A on the grounds that Atomic owns the module.
No compatibility shim, alias, overload, or re-export added for any §3.1 break.
Divergences intact
All seven Atomic-only Copilot modules present and behaviourally unchanged; none replaced by an upstream file unaware of them.
No upstream compaction file applied wholesale; Verbatim Compaction still default, VERBATIM_COMPACTION_PROMPT_VERSION unchanged unless deliberately bumped.
Isolated-engine teardown still non-blocking; upstream's unconditional abort() not reintroduced.
1. Summary
Atomic declares
@earendil-works/pi-{agent-core,ai,tui}at^0.83.0across six workspace packages. Upstream has shipped v0.84.0. This issue covers both halves of a sync: bumping the consumed artifacts and porting the upstreampackages/coding-agentsource changes into the Atomic fork, which maintains its own copy of that tree.Measured scope (from a clone of
earendil-works/piat the tags):packages/coding-agentsrc)packages/agent(v4 session rewrite)coding-agent/srcfiles changedThe last sync classified 63 commits and ported 8. This one is 5.4× larger. Note that 119 bullets is a user-visible projection of 341 commits: a bullet-complete matrix is necessary but not sufficient, and plan step 4 (upstream evidence capture) remains the authority for commit-level completeness.
2. Decisions required before any porting begins
These three gate the work. Making them first collapses most of the ambiguity below.
2.1
pi-client/pi-protocoladoption — gates 14 of 23 absent filesUpstream's
packages/coding-agentnow takes both as direct dependencies:Because we fork that tree, deferral is not free — any ported source importing them drags them in. The decision is binary and resolves 14 absent files at once (§6.2, Group 1):
2.2
RemoteSessionversus Atomic's isolated interactive enginev0.84.0's
pi-client/pi-protocolRemoteSessionis upstream solving out-of-process session control — a problem Atomic already solved withsrc/modes/interactive-engine/**(create-isolated-runtime.ts,engine-dialog-host.ts,remote-component.ts,engine-diagnostic-view.ts).v0.83.0 already forced an intentionally adapted classification for
cefa40ed, because upstream's unconditionalawait this.session.abort()in teardown would hang every session replacement on a dead engine (our facade'sabortis the unboundedabortAndRecover()).Decide deliberately: adopt upstream's, keep ours, or bridge. A bulk port must not silently reintroduce upstream's blocking teardown.
2.3 Atomic's
AI_AGENTvalueUpstream adds
AI_AGENT=pito CLI and RPC child environments.AI_AGENTis currently unset anywhere in this repo (verified). Choose Atomic's value, and propagate it to subagent and workflow child processes, not only CLI/RPC.3. Porting rules
3.1 Clean break — no compatibility shims unless pi ships one
Atomic does not keep a back-compat path unless pi keeps one. If upstream removed or re-shaped an API, the fork takes the break at the call site. No adapters, type aliases, overloads, defaulted parameters, or re-exports. Review-blocking. These seven are where a shim tends to appear on its own:
ModelsStreamTransforms→ModelsRequestTransformsexport type ModelsStreamTransforms = …alias. Rename every reference.message_updatedelta-onlymessagereconstruction inrpc-output-buffer/rpc-event-bufferto keep old consumers alive.getApiKeyAndHeaders()→ProviderHeaderswithstring | nullnullis a deletion marker and must reach pi-ai intact — stripping it re-opens #7030.ModelRegistry.refresh()→ModelsRefreshResultModelRuntime.setRuntimeApiKey()auth-cancellation optionsSession/SessionStorage/SessionRepoFileSystem.renameFile()requiredWhere pi does ship a compatibility path —
createProvider({ fetchModels })needing no migration,scrollbarThumbfalling back toselectedBg, opt-incompat.supportsFinishReason— mirror it exactly, no more and no less.3.2 Divergence is not an exemption
Where we diverge deliberately (§5), we keep the divergence and still absorb the fix.
3.3 Matrix classification — five categories, with an evidence bar
Use the five categories already established by
research/pi-0.83.0-port-matrix.md:27-31. Do not collapse them to three: intentionally adapted is where architecture divergence gets stated, and equivalent is where Atomic already had the behaviour. Both vanish under a port/inherit/N-A split, and a hidden intentionally adapted row is indistinguishable from the shim §3.1 forbids.packages/{ai,tui,agent}, consumed as exact-resolved0.84.0.4. Dependency and artifact state
4.1 Declared pins to move
Each companion package carries a matching
peerDependencies/peerDependenciesMetablock that must move in lockstep.4.2 Upstream package inventory — eight published, three new
agent/ai/tui/coding-agent/serverpi-agent-core,pi-ai,pi-tui,pi-coding-agent,pi-serverclient@earendil-works/pi-clientprotocol@earendil-works/pi-protocoltelemetry@earendil-works/pi-telemetrysession-backends/sqlite-nodeevalspi-telemetryis not an adoption decision. Bothpi-agent-coreandpi-aidepend on@earendil-works/pi-telemetry@^0.84.0, so it lands inpackage-lock.jsonand the published shrinkwrap regardless. Four@earendil-works/pi-*packages must resolve at0.84.0, single instance each — not three.4.3 New third-party dependencies
grok-mermaid@0.2.2is a new third-party package, so the committed.npmrcgate applies:min-release-age=2can block the install outright if the version is fresh, andsave-exact=truegoverns the pin. It must also land in the published shrinkwrap.Apply the #2101 reconciliation rule unchanged: on conflict, pi's transitive pin wins, downgrades included. Reconcile the open Dependabot queue against pi's pins before landing any bump.
4.4 Committed artifacts carrying stale pins
0.83.0refspackage-lock.jsonnpm install --package-lock-only --ignore-scriptspackages/coding-agent/npm-shrinkwrap.jsonnpm run shrinkwrap:coding-agentnpm run check:shrinkwraponly validates; it does not regenerate. The shrinkwrap ships inside@bastani/atomic, andscripts/cut-release.ts:170regenerates it again at release time.4.5 Binary build — the Haswell fix is half-solved, and not where it looks
The compile lives in
packages/coding-agent/package.json:68(build:binary), not inpublish.yml:There is no
--targeton the compile step (the earlier--target=buncalls are bundling). Meanwhilepublish.yml:150-153setsRUSTFLAGS=-C target-cpu=x86-64-v2, which constrains only the Rust native addons.x86-64-v2viaRUSTFLAGSdist/atomic--bytecodeis target-specific, so the baseline target and bytecode generation must agree per platform.5. Atomic divergences to preserve
A 341-commit port is exactly where an unstated divergence gets "fixed" by someone acting in good faith. Both prior matrices encode this intent:
src/modes/interactive-engine/**abort()would hang on a dead engine.src/core/compaction/**(16 files vs upstream's 4),agent-session-{,auto-,post-tool-}compaction.tsPI_*/.pialiases,.atomicconfig rootpackages/*/package.jsonat0.0.0,scripts/cut-release.tspackages/{workflows,subagents,mcp,web-access,intercom}.github/workflows/**(9 contexts, full Windows, Blacksmith, per-job timeouts)AGENTS.mdexplicitly declines pi's single-job shape. 16 file touches in range, all N/A unless shipped behaviour changes.src/core/tools/hashline-engine/**packages/{workflows,subagents,mcp,web-access,intercom}5.1 Compaction: 16 Atomic modules against 4 upstream, sharing 4 filenames
src/core/compaction/compaction.ts,branch-summarization.ts,utils.ts,index.tsrange-planner.ts,fallback-planner.ts,region-trimming.ts,truncated-range-recovery.ts,compaction-boundary.ts,compaction-runner.ts,deleted-ranges.ts,transcript-serialization.ts, …src/core/agent-session-compaction.ts,agent-session-auto-compaction.ts,agent-session-post-tool-compaction.tsVERBATIM_COMPACTION_STRATEGY,runVerbatimCompaction,VERBATIM_COMPACTION_PROMPT_VERSIONFour filenames collide by name inside a module graph four times larger. A file-wise application of the upstream compaction diff will either overwrite Verbatim Compaction or leave two competing implementations. Every upstream compaction commit needs a hand-placed intentionally adapted row.
5.2 The Copilot subsystem has no upstream counterpart
Checked against
git ls-tree v0.84.0 packages/coding-agent/src— all absent upstream:core/copilot-env-routing.ts·core/openai-responses-payload-sanitizer.ts·core/agent-session-retry.ts·core/model-runtime-restoration.ts·core/model-runtime-providers.ts·core/model-resolver-defaults.ts·core/provider-display-names.tsAtomic reached endpoint routing, provider display naming, model restoration, and retry classification independently. Per §3.2, the four v0.84.0 Copilot bullets are re-decided against our modules and reworked in, not skipped:
copilot-env-routing.ts.model-runtime-restoration.ts; port if absent.5.3 Sequencing hazard: #7560 widens the blast radius of open bug #2204
#2204 is open and lives in our own
openai-responses-payload-sanitizer.ts. On thegithub-copilot+openai-responsespath, across a model-identity mismatch, the sanitizer synthesizes a 64-characterfunction_call.idthat the server rejects with400 invalid_request_body. It is deterministic, nothing auto-retries it (agent-session-retry.tsdoes not classify HTTP 400), and the session cannot progress.#7560 moves Copilot Grok 4.5 onto that exact API surface. #2204 must land before or with the #7560 port.
6. Work inventory
6.1 Breaking changes to absorb
ModelsStreamTransforms→ModelsRequestTransformssrc/core/model-runtime-streaming.ts. Header transforms now apply to all authenticated requests, not just streams.getApiKeyAndHeaders()→ProviderHeaders(string | null)src/core/model-runtime.ts,packages/web-access/{summary-review,web-search-summary}.tsmessage_updateemits onlyassistantMessageEventdeltassrc/core/agent-session-events.ts,src/core/extensions/{api-types,agent-events}.ts,src/modes/interactive/**,src/modes/rpc/rpc-{output,event}-buffer.ts,examples/sdk/*. Upstream'smodes/json-event.tsdoes not exist here — placement decision required (§6.2).ModelRegistry.refresh()→ModelsRefreshOptions/ModelsRefreshResultModelRuntime.setRuntimeApiKey()auth-cancellation optionssrc/core/runtime-credentials.ts,src/core/model-runtime.tscontext.store→ read-onlycontext.stored+ generation-checkedcontext.publish()Provider.refreshModels();createProvider({ fetchModels })users unaffectedrefreshToken(credentials, signal)src/core/provider-composer-internal.ts,src/core/extensions/{provider-types,api-types}.ts. The fork owns this surface — a port, not inherit. No companion package registers a provider (N/A for those).Session/SessionStorage/SessionRepo; v2 session +AgentHarnesspromoted out ofexperimentalsrc/core/index.ts,src/index.ts,test/experimental.test.tsJsonlSessionRepo/InMemorySessionRepoFileSystem.renameFile()requiredRemoteSession.sessionsreturns durableSessionMetadata6.2 Path portability of the 107 commits
55 of 78 changed files (70%) exist in Atomic at the same path — diffs are path-aligned and the fork has not drifted structurally on them. The 23 absent files resolve to three decisions, not 23:
Group 1 — remote-session stack: 14 files, one decision (§2.1).
Group 2 — features to build, not merge: 5 files.
modes/interactive/interactive-tui.tstui-mode/fullscreencode — from-scratch port.modes/interactive/components/mermaid.tsgrok-mermaiddependency.modes/interactive/components/markdown-transform.tsregisterMarkdownTransformer(); lands on five builtin extensions.utils/tool-result-images.tssrc/utils/image-resize-worker.ts.cli/thinking-level.tsGroup 3 — new utility modules other fixes depend on: 4 files.
modes/json-event.tsmessage_updatedelta-only break. No path-aligned home here — placement decision required.utils/management-http.tsutils/abort.tscore/pi-manifest.ts6.3 Known gaps where Atomic is behind upstream
Verified, not assumed. Each is real work behind an architectural divergence:
/compactracing threshold auto-compaction (#7370)agent-session-compaction.ts:231refuses the operation:"Automatic compaction is already in progress; wait for it to finish before compacting manually."Upstream fixed the race so it proceeds./compactfailingagent-session-compaction.tscontains no queue handling at all.truncated-range-recovery.ts, which parses compaction planner deletion records on a length stop — a different layer. Port as a behavioural diff against the length-stop handling atagent-session-auto-compaction.ts:179,256.6.4 Features to pick up
auto/always/hidden), page-scroll and marked-message shortcuts, stacked transient notifications, runtime mode switching, optionalscrollbarThumbtheme color, mouse wheel step reduced 3 → 1 lines. Audit every Atomic theme and how our workflow/subagent widgets behave in the sticky dock.pi.registerMarkdownTransformer()— chainable display-only Markdown transforms; useful to our workflow/intercom renderers.AGENTS.override.mdcontext files.samplingParamsinmodels.json, model overrides, extension providers, and stream options; opt-in vLLMthinking_token_budget.BASETEN_API_KEY, defaultzai-org/GLM-5.2).CredentialSynchronizationError— credential changes that commit but fail to sync local model state. Handle explicitly, do not fold into the generic path.AgentHarnessv2 scaffold — unfinished operation paths reject withHarnessNotImplementedat runtime, not compile time. Enumerate which operations we reach.AgentOptions.shouldStopAfterTurn, deferred provider request contracts, vendor-neutral telemetry contracts,compat.supportsFinishReason, structured Bedrock failure diagnostics, v4JsonlSessionRepo, bounded branch-entry and indexed open-operation recovery queries.ModelsStorereads/writes/deletes — audit that our store calls pass the signal on cancellable paths.Ctrl+P/Ctrl+Nprompt history — see keybinding collisions in §6.5.6.5 Fixes landing on real Atomic surface
anyOf/oneOfunion arm preserved before coercion (#7328)packages/subagentstool schemas (skill,reads,outputareanyOfofstring | boolean | string[]),packages/workflowsinputs. Add regression coverage rather than assuming green.setToolsExpanded(false)no-op when already collapsed (#7292)subagents/src/extension/index.ts:295,subagents/src/slash/slash-commands.ts:271,workflows/src/extension/wiring.ts:397web-access/summary-review.ts,web-access/web-search-summary.ts. One coherent change with theProviderHeadersbreak and #7579.web-access/{content-tools,github-api,video-extract,youtube-extract}.tsemit base64 payloads; new module required (§6.2).Home/End/PageUp/PageDowneditor bindings (#7574)pageUp/pageDown:workflows/src/tui/stage-chat-view-input.ts:171-175,prompt-card-select.ts:83-86,keybindings-adapter.ts:53-54. Check precedence in both TUI modes, together withCtrl+P/Ctrl+N.SKILL.mdfiles across four packages (coding-agent 17, subagents 5, workflows 5, intercom 1), nested more than one level deep.--modelIDs shared by multiple providers (#7327)workflow({ action: "models" }), stagemodel/fallbackModelspinning,docs/models/model-selection.md(sub)for generic OAuth/OpenID;isSubscriptionopt-inprovider-composer-internal.ts,extensions/{provider-types,api-types}.ts— the fork owns this.packages/workflows/src/tui/**build:binary,publish.yml, published shrinkwrap. Build-surface, not cosmetic..atomic/project config mergegit cleancannot remove an ignored dir (#7570)JsonlSessionRepoIDs unique per working directoryfind: path-containing globs on Windows (#6817); POSIX/Windows root segments (#7569); Git Bash/MSYS/Cygwin/WSL drive resolution (#7064, #7547)findtool, file tools. Three distinct fixes./scoped-modelsand/model <name>using cached models (#7153, #7443)refresh()break — verify no blocking wait returnsruntime-credentials.ts, model store pathsCtrl+Xtransient marker; phantom selection/settingsmulti-word search; interactive errors respecting output padding;/copyon Wayland; increased connect timeoutundici→ 8.9.0, packagedbrace-expansion→ 5.0.96.6 Inherit-only (arrive with the bump; evidence is a green suite)
prompt_cache_retention+ session affinity (#7676); provider error normalization preserving arrays and class instances (#7205); Anthropic streams retaining initial content-block text/thinking (#7358); Google history conversion preserving signed empty blocks (#7362); Gemini 3 tool call ids preserved (#7494); OpenAI Codex WebSocket sessions no longer shared across credentials (#7364); transient Google GenAI/Vertex retries (#7471); OAuth refreshes releasing the credential-store lock (#7508); OpenCode Go display name.docs/models/model-selection.mdand any pinned stage models: GPT-5.6 Terra/Luna pricing; Fireworks Kimi K3 on the OpenAI-compatible API; Groq Qwen override forqwen/qwen3.6-27b; retiredqwen3.8-max-preview→qwen3.8-max(#7670).6.7 Documentation targets
The release links seven upstream doc anchors; our fork maintains its own copies:
settings.md#ui--display,#markdown,#terminal--imagespackages/coding-agent/docs/settings.mdmodels.md#sampling-parameters,#openai-compatibilitypackages/coding-agent/docs/models.mdproviders.md#api-keys(Baseten)packages/coding-agent/docs/providers.mdusage.md#context-files(AGENTS.override.md)packages/coding-agent/docs/usage.mdextensions.md#piregistermarkdowntransformertransformerpackages/coding-agent/docs/extensions.mdREADME.md#environment-variables(AI_AGENT)packages/coding-agent/README.mdscrollbarThumbtheme colordocs/themes.mdplussrc/modes/interactive/theme/theme-schema.jsonandtheme-schema.tsThe theme row carries a schema change: both schema files must learn
scrollbarThumbor the optional color fails validation in user themes.7. Plan
v0.83.0..v0.84.0underresearch/— commit list,--name-status, per-commit paths, and thepackages/coding-agentdiff — matching the Pi v0.83.0 sync + Dependabot queue convergence (pi-authoritative version reconciliation) #2101 layout.^0.84.0in all six packages including peer blocks; refreshpackage-lock.json; regenerate the shrinkwrap; reconcilegrok-mermaidandundiciagainst the Dependabot queue.packages/coding-agent/src, absorbing every §6.1 break and the §6.3 gaps.fc_*function_call.idthat the GitHub Copilot Responses endpoint rejects with HTTP 400 #2204, then port #7560.npm run check,npm run test:all,npm run test --workspace=@bastani/atomic,npm run test:scripts; verify the Bun-compiled binary on macOS/Linux/Windows including the baseline x64 target.packages/coding-agent/docs(§6.7) via therelease-docsworkflow; addpackages/*/CHANGELOG.mdentries under[Unreleased]for user-visible surface only.8. Acceptance criteria
Decisions
RemoteSession↔ isolated-engine overlap resolved by an explicit written decision, not by default.AI_AGENTvalue chosen and propagated to subagent and workflow children.Dependencies and artifacts
^0.83.0pi reference in anypackage.json, dependency or peer block.package-lock.json(18 stale refs) andpackages/coding-agent/npm-shrinkwrap.json(10) regenerated; four@earendil-works/pi-*packages resolve at0.84.0, single instance each,pi-telemetryincluded.grok-mermaid@0.2.2reconciled against.npmrcmin-release-age/save-exactand present in the shrinkwrap.build:binarycompiles against Bun's baseline x64 runtime;RUSTFLAGS=-C target-cpu=x86-64-v2retained for the natives; both verified on x64 legs.Matrix integrity
Divergences intact
VERBATIM_COMPACTION_PROMPT_VERSIONunchanged unless deliberately bumped.abort()not reintroduced.Gaps closed
fc_*function_call.idthat the GitHub Copilot Responses endpoint rejects with HTTP 400 #2204 resolved before or with #7560; regression test covers absentfunction_call.idon the Copilot Responses path./compactsucceeds during threshold auto-compaction; theagent-session-compaction.ts:231rejection removed or justified in writing.agent-session-auto-compaction.ts:179,256;truncated-range-recovery.tsrecorded as unrelated.copilot-env-routing.ts; #7579 verified across all five builtin extensions.anyOf/oneOfcoercion regression coverage for thesubagenttool's union-typed parameters.setToolsExpanded(false)emits no redundant startup notices from the three known call sites.ProviderHeadersthrough unchanged,nullmarkers included.CredentialSynchronizationErrorhandled explicitly;HarnessNotImplementedsurfaces enumerated and unreachable at runtime.Verification
npm run checkand all four suites pass on Linux, macOS, and Windows.AGENTS.override.mdverified in an Atomic session.scrollbarThumbor fall back cleanly toselectedBg; both theme schema files updated.Ctrl+P/Ctrl+Nand Ctrl-modifiedHome/End/PageUp/PageDownin both TUI modes.