@earendil-works/pi-coding-agent
1.6.0 · 20 Nov 2026MIT6.6M / weekRepositoryHomepagenpmAtom feed
0.99.2 is the newest release of 0.84.x.
In short
12 breaking2 security32 new72 fixed1 changed
- Breaking
Renamed the inherited pi-ai
ModelsStreamTransformsinterface toModelsRequestTransformsbecause its header transformation now applies to all authenticated provider requests. - Breaking
Changed JSON and RPC
message_updateevents to emit onlyassistantMessageEventdeltas, removing the cumulativemessageandassistantMessageEvent.partialfields that caused quadratic output growth. Clients that need partial messages must assemble deltas betweenmessage_startandmessage_end; the latter remains authoritative (#7290). - Breaking
ModelRegistry.getApiKeyAndHeaders()now returnsProviderHeaderswithstring | nullvalues and preservesnullheader-deletion markers. Extensions that inspect returned headers must handlenull; extensions forwarding them to pi-ai streams should pass them through unchanged. This prevents placeholder OpenAI credentials from being sent through Cloudflare AI Gateway (#7030). - Breaking
Changed
ModelRegistry.refresh()to acceptModelsRefreshOptionsand returnModelsRefreshResultinstead of discarding cancellation and provider errors. - Breaking
Changed
ModelRuntime.setRuntimeApiKey()to accept auth cancellation options rather than catalog refresh options. Callrefresh({ providers: [providerId], signal })separately when remote freshness is required. - Breaking
Required config-form extension OAuth
refreshToken(credentials, signal)callbacks to accept and honor a concrete abort signal. - Breaking
Replaced dynamic provider refresh context store access with the read-only
context.storedsnapshot and generation-checkedcontext.publish()transaction. - Breaking
Replaced the inherited pi-agent-core harness session model with the v4 lane-based
Session,SessionStorage, andSessionRepoAPIs, including durable operation records, global facts, shared sequence numbers, and tree-scoped lane views.
Release note
New Features
Fullscreen TUI mode — Switch between regular and fullscreen modes at runtime, with a sticky editor and footer, independently scrollable transcript, and draggable scrollbars. See UI & Display.
Mermaid and LaTeX rendering — Render Mermaid diagrams and terminal-friendly Unicode math in interactive transcripts. See Markdown settings and TUI Markdown.
Per-directory context overrides — Use
AGENTS.override.mdto replace context files for a specific directory. See Context Files.Advanced custom model sampling — Configure arbitrary OpenAI-compatible
samplingParamsand opt-in vLLMthinking_token_budgetvalues. See Sampling Parameters.Baseten provider — Use built-in Baseten authentication and model support. See API Keys.
Breaking Changes
- Breaking
Renamed the inherited pi-ai
ModelsStreamTransformsinterface toModelsRequestTransformsbecause its header transformation now applies to all authenticated provider requests. - Breaking
Changed JSON and RPC
message_updateevents to emit onlyassistantMessageEventdeltas, removing the cumulativemessageandassistantMessageEvent.partialfields that caused quadratic output growth. Clients that need partial messages must assemble deltas betweenmessage_startandmessage_end; the latter remains authoritative (#7290). - Breaking
ModelRegistry.getApiKeyAndHeaders()now returnsProviderHeaderswithstring | nullvalues and preservesnullheader-deletion markers. Extensions that inspect returned headers must handlenull; extensions forwarding them to pi-ai streams should pass them through unchanged. This prevents placeholder OpenAI credentials from being sent through Cloudflare AI Gateway (#7030). - Breaking
Changed
ModelRegistry.refresh()to acceptModelsRefreshOptionsand returnModelsRefreshResultinstead of discarding cancellation and provider errors. - Breaking
Changed
ModelRuntime.setRuntimeApiKey()to accept auth cancellation options rather than catalog refresh options. Callrefresh({ providers: [providerId], signal })separately when remote freshness is required. - Breaking
Required config-form extension OAuth
refreshToken(credentials, signal)callbacks to accept and honor a concrete abort signal. - Breaking
Replaced dynamic provider refresh context store access with the read-only
context.storedsnapshot and generation-checkedcontext.publish()transaction.Providers built with
createProvider({ fetchModels }): no catalog-publication migration is required. Before and after, return the fetched models and register the resulting provider;createProvider()owns restoration, persistence, and in-memory publication.// Before const beforeProvider = createProvider({ // ... fetchModels: async ({ signal }) => { const response = await fetch(catalogUrl, { signal }); return parseModels(await response.json()); }, }); pi.registerProvider(beforeProvider); // After: unchanged const afterProvider = createProvider({ // ... fetchModels: async ({ signal }) => { const response = await fetch(catalogUrl, { signal }); return parseModels(await response.json()); }, }); pi.registerProvider(afterProvider);Handwritten native
Provider.refreshModels(): replace direct store access and pre-publication mutation with generation-guarded publications.// Before refreshModels: async (context) => { const stored = await context.store.read(); if (stored) currentModels = stored.models; if (!context.allowNetwork) return; const refreshed = await fetchModels(context.signal); currentModels = refreshed; await context.store.write({ models: refreshed, checkedAt: Date.now() }); }, // After refreshModels: async (context) => { if (context.stored) { const restored = context.stored.models; if (!(await context.publish({ update: () => { currentModels = restored; }, }))) return; } if (!context.allowNetwork) return; const refreshed = await fetchModels(context.signal); if (context.signal.aborted) return; await context.publish({ persist: { models: refreshed, checkedAt: Date.now() }, update: () => { currentModels = refreshed; }, }); },For the config-form
pi.registerProvider(name, { refreshModels }), callbacks that only return models remain unchanged; pi publishes the returned list. If such a callback previously usedcontext.storefor custom persistence, readcontext.storedand callcontext.publish({ persist: entry }). Inpublish(), omitpersistto leave storage unchanged, pass aModelsStoreEntryto write it, or passpersist: nullto delete it. - Breaking
Replaced the inherited pi-agent-core harness session model with the v4 lane-based
Session,SessionStorage, andSessionRepoAPIs, including durable operation records, global facts, shared sequence numbers, and tree-scoped lane views. - Breaking
Promoted the inherited v2 session and
AgentHarnessAPI from pi-agent-core's experimental entrypoint to its default export and removed the experimental subpaths. - Breaking
Removed the inherited legacy JSONL and in-memory repository APIs. Use pi-agent-core's v4
JsonlSessionRepoorInMemorySessionRepo, both implementing the newSessionRepocontract. - Breaking
Added the inherited required pi-agent-core
FileSystem.renameFile()operation for atomic JSONL publication; custom harness file-system implementations must provide same-filesystem replacement semantics - Breaking
Replaced experimental remote-session list summaries with durable
SessionMetadata;RemoteSession.sessionsno longer exposes runtime phase, model, thinking, attachment, or lock state, which remains available from acquiredSessionSnapshotvalues (#7708).
Added
Added built-in Baseten provider support with
BASETEN_API_KEYauthentication andzai-org/GLM-5.2as the default model.Added experimental remote-session client APIs: the transport-neutral
PiClient, CBOR protocol, Unix-socket transport, and@earendil-works/pi-coding-agent/clientRemoteSessioncontroller with transcript reducers. See Pi Client and Remote Protocol (#7344, #7348, #7371, #7409).Added
CredentialSynchronizationErrorfor credential changes that commit successfully but fail to synchronize local model state.Added chainable
pi.registerMarkdownTransformer()hooks for display-only transformation of user and assistant Markdown. Seepi.registerMarkdownTransformer()Added an experimental fullscreen TUI mode, selectable through
--tui-mode fullscreenor/settings(#7304).Added runtime switching between regular and fullscreen TUI modes through
/settings.Added a sticky editor, status, widget, and footer dock to fullscreen mode while keeping the transcript independently scrollable.
Added a draggable transcript scrollbar to fullscreen mode with configurable
auto,always, andhiddenmodes through/settings;alwaysreserves the rightmost column.Added page scrolling and marked-message navigation shortcuts to fullscreen mode.
Added an optional
scrollbarThumbtheme color for fullscreen scrollbar thumbs, falling back toselectedBg.Added configurable themed Unicode rendering for supported Mermaid diagrams in interactive messages, including optional rendering while streaming. See Markdown settings
Added opt-in
Ctrl+P/Ctrl+Nprompt history navigation, with explicit history bindings taking precedence over application shortcuts while the editor is focused.Added per-directory
AGENTS.override.mdcontext files, which replaceAGENTS.mdorCLAUDE.mdin the same directory while preserving context from other directories. See Context FilesAdded
AI_AGENT=pito CLI and RPC child-process environments for generic agent attribution. See Environment VariablesAdded inherited terminal-friendly Unicode rendering for LaTeX expressions in Markdown. See TUI Markdown.
Added stacked transient notifications in fullscreen mode.
Added arbitrary OpenAI-compatible model sampling parameters through
samplingParamsinmodels.json, model overrides, extension providers, and stream options. See Sampling ParametersAdded inherited opt-in vLLM
thinking_token_budgetsupport for OpenAI-compatible models, reserving output tokens for the final answerAdded inherited support for OpenAI-compatible streams that omit
finish_reason, usingcompat.supportsFinishReasonto infer normal and tool-use stops when the stream ends. See OpenAI Compatibility.Added inherited deferred provider request contracts, durable response handles, authenticated fetch/cancel dispatch, and faux-provider support for pending, ready, failed, and cancelled responses
Added inherited vendor-neutral telemetry contracts plus agent-owned typed AI-request and harness schemas, composed span starters, and callback helpers. See the agent telemetry schema reference.
Added inherited structured Amazon Bedrock failure diagnostics with HTTP status, modeled error code, and AWS request id when available
Added inherited
AgentOptions.shouldStopAfterTurnfor gracefully stopping after a completed turn before queued messages or another model call are processed. See Agent OptionsAdded inherited v4
JsonlSessionReposupport for append-only JSONL harness sessionsAdded inherited bounded branch-entry and indexed open-operation recovery queries to the v4 session API (#7448, #7646).
Added the inherited compile-complete
AgentHarnessv2 scaffold; unfinished operation paths reject withHarnessNotImplementedwhile durable execution is implemented.
Changed
Added inherited optional cancellation to pi-ai
ModelsStorereads, writes, and deletions; catalog orchestration binds these waits to the provider refresh signal.Reduced the inherited default fullscreen mouse wheel step from three lines to one for finer scrolling.
Fixed
Fixed the footer showing
(sub)for generic OAuth/OpenID sign-ins without a known subscription; extension OAuth providers can opt in withisSubscription.Fixed inherited OAuth token refreshes so stalled requests release the credential-store lock (#7508).
Fixed inherited tool argument validation to preserve values that already match an
anyOf/oneOfunion arm before coercion, avoiding nullable unions convertingnullto another primitive value (#7328).Fixed inherited Fireworks GLM 5.2 requests sending the unsupported
prompt_cache_retentionfield when long cache retention is enabled, and enabled session affinity for automatic prompt caching (#7676).Fixed inherited
JsonlSessionRepoenforcing session IDs globally across working directories; IDs are now unique within each working directory.Fixed inherited JSONL session forks and torn-tail repairs to publish atomically, avoiding partially written or corrupted sessions after interrupted writes
Fixed path-containing
findglobs returning no results on Windows (#6817).Fixed messages queued during manual
/compactfailing instead of being sent after compaction completes.Fixed Git Bash, MSYS, Cygwin, and WSL drive paths passed to built-in file tools resolving against the current Windows drive instead of their native drive (#7064, #7547).
Fixed project-level nested provider retry settings replacing unmodified global provider retry settings (#7572).
Fixed inherited GitHub Copilot Grok 4.5 requests to use the supported Responses API (#7560).
Fixed fullscreen shutdown leaking terminal capability-query replies into the parent shell prompt.
Fixed bare exact
--modelIDs shared by multiple providers choosing the first catalog entry instead of the sole authenticated provider or a clear ambiguity error (#7327).Fixed standalone x64 binaries requiring Haswell-era AVX2/BMI2 instructions by compiling release executables against Bun's baseline runtime
Fixed
Ctrl+Xcopy confirmations in fullscreen mode adding a transcript status line instead of showing the transientCopied!marker.Fixed Kitty image previews in fullscreen mode overlapping the sticky editor and footer dock while scrolling.
Fixed image-heavy fullscreen sessions lagging when layout changes retransmitted visible Kitty image payloads and rendered the transcript twice per frame.
Fixed spaces in
/settingssearches toggling the highlighted setting while typing multi-word queries such as TUI mode or Quiet startup.Fixed custom editors not inheriting the default editor's autocomplete dropdown item limit (#7333).
Fixed malformed resource arrays in package manifests crashing session startup (#7187).
Fixed the DOOM overlay example downloading its shareware WAD from a dead URL.
Fixed
setToolsExpanded(false)to be a no-op when tool output is already collapsed, avoiding redundantTool output: collapsedstartup notices from extensions (#7292).Fixed extension-driven model calls in custom compaction, handoff, and Q&A examples to dispatch through the coding-agent model runtime so custom providers and resolved auth options are preserved (#7325).
Fixed long-running sessions using stale credentials after another process updates
auth.jsonwithout serializing concurrent credential reads and delaying startup (#7319).Fixed concurrent
models-store.jsonreads forming a file-lock convoy and delaying startup.- Security
Updated the packaged
brace-expansiondependency to 5.0.8 to address GHSA-mh99-v99m-4gvg (#7316). Fixed forced model availability refreshes remaining blocked behind a stalled earlier refresh (#7301, #7421
Fixed
/modelcatalog refresh failures to identify every catalog that failed.Fixed provider login remaining stuck after saving credentials when a model catalog refresh stalls by separating local credential consistency from bounded background freshness (#7027, #7113, #7418).
Fixed
/scoped-modelswaiting for remote catalogs before rendering instead of showing cached models and cancelling refresh on close (#7153).Fixed
/model <name>waiting for catalog refresh before checking cached model matches (#7443).Fixed stale availability snapshots and errors publishing after a newer availability pass.
Fixed stale pi.dev, Radius, llama.cpp, and extension catalog refreshes publishing after a newer provider refresh.
Fixed cancellation while waiting for file-backed credential or model-catalog locks, preventing cancelled mutations from running or committing later.
Fixed concurrent in-memory credential mutations losing unrelated provider updates by serializing their read-modify-write sections.
- Security
Updated
undicito 8.9.0 and the packagedbrace-expansionto 5.0.9 to address GHSA-8xcm-r25x-g524, GHSA-4cwx-7wf7-3272, GHSA-m8rv-5g2x-5cg5, GHSA-jr45-8vmc-qm54, GHSA-v3r7-h72x-cjcm, and GHSA-rgw5-rvv9-x895. Fixed GitHub Copilot compaction and branch summaries using the Individual endpoint instead of the credential-resolved Business or Enterprise endpoint (#6768).
Fixed extension model calls dropping credential-resolved endpoints when forwarding request authentication, including custom compaction with GitHub Copilot Business and Enterprise accounts (#7579).
Fixed fullscreen transcript navigation leaving no editor-accessible
Home,End,PageUp, orPageDownvariants by adding Ctrl-modified editor bindings (#7574).Fixed extension event-bus listeners surviving session reloads and disposal
Fixed
/copyfailing to read clipboard text on Wayland when no X11 clipboard is available (#7387).Fixed slow connections failing during the initial connection attempt by increasing the connect timeout
Fixed oversized images returned by extension and built-in tools bypassing automatic image resizing. See Image settings
Fixed session discovery missing sessions stored through symlinked directories
Fixed manual compaction racing with threshold auto-compaction
Fixed responses truncated below their intended output limit ending the run instead of compacting and retrying once
Fixed Git package updates leaving dependencies missing when
git cleancannot remove an ignored dependency directoryFixed
findresults from POSIX and Windows filesystem roots losing the first path segment or gaining duplicate trailing separatorsFixed transient version-check, catalog, managed-tool, and package-management HTTP failures not being retried
Fixed interactive errors ignoring the configured output padding.
Fixed the inherited OpenCode Go provider display name.
Fixed inherited provider error normalization treating arrays and class instances as structured response bodies instead of preserving their original errors
Fixed inherited Anthropic streams dropping text or thinking included in the initial content-block event
Fixed inherited Google history conversion dropping signed empty text and thinking blocks required for replay
Fixed inherited OpenAI Codex cached WebSocket sessions being shared across different account credentials (#7364).
Fixed inherited transient Google Generative AI and Vertex AI provider errors bypassing automatic retries
Fixed inherited Gemini 3 tool call ids being discarded during history conversion, breaking signed multi-turn replay
Restored inherited GitHub Copilot models returned through account-specific policy responses
Replaced the inherited retired Qwen Token Plan
qwen3.8-max-previewmodel withqwen3.8-maxFixed inherited terminal width accounting for Indic conjunct grapheme clusters
Fixed inherited nested fullscreen stack layouts ignoring child minimum sizes.
Fixed inherited batched terminal color-scheme reports being parsed as one malformed response (#7550).
Fixed inherited terminal progress clearing to emit the complete OSC 9;4 sequence (#7581).
Fixed inherited iTerm2 image payloads omitting the size metadata required by the xterm.js image addon (#7612).
Fixed inherited width truncation leaving OSC 8 hyperlinks unterminated
Updated inherited GPT-5.6 Terra and Luna pricing across OpenAI and passthrough model catalogs.
Fixed inherited Fireworks Kimi K3 models to use the OpenAI-compatible API with native reasoning-effort levels and deferred tools (#7199, #7230
Updated the inherited Groq Qwen reasoning override for the replacement
qwen/qwen3.6-27bmodel.Fixed inherited Windows Shift+Enter detection by reading modifier state from the native Win32 helper.
Fixed the inherited pi-tui npm package omitting the source and build scripts needed to rebuild its Windows and Darwin native addons.
Fixed inherited Windows console truecolor detection when Windows Terminal does not provide
WT_SESSIONto child shells.Fixed inherited phantom fullscreen text selection from unmatched mouse events when changing terminal pane focus.
Fixed inherited keyboard input rendering latency on Windows by letting input preempt the throttled render timer.
Fixed inherited agent harness path handling on Windows for file basenames, recursive skill loading, and prompt template names.
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.