npm / @earendil-works/pi-coding-agent
@earendil-works/pi-coding-agent
What changed in @earendil-works/pi-coding-agent 0.78 to 1, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.
91 breaking13 security1 deprecations196 new APIs and options14 performance69 behavior and defaults4 tooling286 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@earendil-works/pi-coding-agent 1158 changes
Breaking changes 29
The unsupported off thinking level is no longer offered.
Uses OpenAI Chat Completions at the Kimi coding endpoint; models.json base URL overrides must include /v1.
Pi's Node.js is now only a fallback on PATH, so bash tool shells use the user's node/npm.
Moved to the opencode.ai/inference endpoints; OpenCode Go also gains Google Generative AI support.
Malformed final JSON arguments now fail validation and show the model the raw arguments instead of silently running with partial fields.
The models now expose only the off and high thinking levels, avoiding 400 errors at minimal.
An abort requested while a run is starting now aborts the run once it starts.
The event also fires for idle runs started with
pi.sendMessage(..., { triggerTurn: true }); handlers receive a user or custom event, and handlers limited to prompts must checkevent.messageType === "user".The event is now a union: user events carry
promptandimages, while custom events carry the startingmessageand noprompt.The unpublished experimental
./clientexport was removed.Returns false while a run is starting, including during
before_agent_starthandlers.The package used by the unreleased experimental stack was removed and is no longer released.
The unpublished experimental
./experimental/pluginexport was removed.OAuth sign-in now fails with an issuer mismatch when an authorization response includes an
issparameter that cannot be checked because server metadata was not discovered.A
// @options:line that is not the first script line now causes an error before execution instead of being silently ignored, preventing runs without the requested timeout.Print mode now prints partial text, warns on stderr, and exits 1 when the final response is cut off at the model's output token limit.
The JSON output reports
resources: truefor servers offering resources instead of resource and resource-template counts.When a run is starting, the session counts as busy and
pi.sendMessage()queues into that run instead of trying to start a second run.Calls made while a run is starting now require
deliverAs.MCP tool calls now handle structured content that is an array, null, or primitive; codemode types it as
unknownwhen no output schema is declared.The theme schema URL changed, and themes loaded at startup now receive the same schema validation as themes reloaded later.
The timeout now limits the whole sign-in, including requests to the authorization server, rather than only the wait for the browser.
Julia-1, Laya, Kev, lev, and OpenJev served by llama.cpp 0.6.0 or later run natively as classifiers rather than chat models.
The Azure provider is renamed from azure-openai-responses to azure; update its key in auth.json, models.json, and settings.json. AZURE_OPENAI_* environment variables are unchanged.
Home and End now always move the editor cursor to the line start or end; Ctrl+Home and Ctrl+End move to the fullscreen transcript top or bottom without moving the editor cursor.
A script that exceeds 16 Mi characters of output or 100000 items now fails instead of crashing pi from memory exhaustion.
The published package no longer includes the shrinkwrap file, so npm installations no longer pin transitive dependencies and library consumers can override them.
Using
--providerwithout--modelnow fails with an error instead of silently running the default model from another provider.Scripts probing for a tool must use the
inoperator;typeof tools.nameno longer works for this purpose.
Security 4
Models disabled by an organization owner are no longer listed.
Output files, including full text of truncated tool output, binary MCP resources, and codemode images, are now readable only by the user.
When another login occupies the callback port, sign-in now fails with a port-in-use error instead of continuing and causing an OAuth state mismatch.
MCP OAuth rejects an authorization response whose
issparameter names another authorization server before exchanging the code.
New APIs and options 34
Choose automatic, GitHub gist, or Radius uploads for /share.
Tool namespaces can define aliases, which codemode namespace descriptions and
searchTools()namespace matching recognize; MCP namespaces use the server name.Pi lists only chat models available to the configured OpenRouter key, with that key's model limits and prices, and saves the list for offline use.
Setting
PI_CLIPBOARD_OSC52=1sends copied text to the terminal after the local clipboard write, enabling copies to reach remote clients when Pi cannot detect the remote session.Tool definitions can declare which other tools a call may reach, allowing the MCP extension to wait for needed servers and determine whether replacement tools can reach MCP tools.
Published schemas for settings, models, keybindings, and themes can be referenced from configuration files for editor validation and completion.
agent_settled session, extension, and JSON events include aborted so integrations can distinguish a cancelled run from a finished one.
Claude Haiku 5.5 is available with adaptive thinking up to xhigh/max effort and prompt caching on Bedrock.
OpenAI's GPT-6 Luna is available as a classifier model through the Decisions API.
Tool render context and tool_execution_end extension events include the recorded execution time of a final tool result.
The codemode classification context accepts images for classifiers that support them.
Pi reports whether it is working, blocked on a dialog or login, done, or failed to terminals and dashboards that support OSC 7501.
Overrides detection of program status reporting with a value of 1 or 0.
Entries such as +codemode and -write adjust the default tool selection instead of replacing it.
Disables built-in MCP support for one run.
Gains
getPromptGuidelines()for retrieving tool prompt guidelines.The azure provider now serves Foundry Chat Completions deployments, starting with azure/deepseek-v4-pro.
Set sampling parameters such as temperature and top_p for each thinking level on OpenAI-compatible APIs.
A copy key, defaulting to ctrl+x, copies the OAuth sign-in URL when the browser cannot be opened or the wrapped link cannot be selected.
Cloudflare's Clef classifier model is usable from codemode scripts and extensions.
Cloudflare's Clef Flash classifier model is usable from codemode scripts and extensions.
The command can enable or disable a user-level MCP server for the current project.
A Nix flake lets macOS and Linux users install pi with nix profile add github:earendil-works/pi/stable.
Setting this to cimd identifies pi with its Client ID Metadata Document on pi.dev instead of using dynamic client registration.
A project entry without command or url can override enabled, exposure, and toolExposure for a user-level MCP server.
Registers how calls to a tool are drawn, including calls to tools that are not registered.
Extensions can generate images through the model registry.
The login menu offers Radius sign-in and can configure the Radius MCP server in the global
mcp.jsonafter sign-in.Anthropic login now offers a copy code method for headless setups where the browser runs on another machine.
After Radius sign-in,
/logincan configure the Radius MCP server in the globalmcp.jsonwith Radius authentication.Codemode scripts can call image models with session credentials; returned base64 image blocks can be attached to the result with
image()and count toward session cost.Configure an MCP server's OAuth metadata document when it advertises an incorrect authorization server or none; Pi uses the configured document instead of discovery.
Set
quietStartupto "header" to keep the startup header with version and key hints while hiding the model scope line and loaded-resource listing.Pass
--tui-mode regularto keep the terminal's normal scrollback instead of using the fullscreen default.
Performance 4
Joining output items is no longer quadratic, preventing long process-blocking delays for scripts with many
text()calls.Tools added or redefined mid-conversation are defined inline, so redefining a tool under the same name keeps the prompt cache instead of resending the full tool list.
Codemode uses fewer prompt tokens; with default tools active, the notes report a reduction from about 5,300 to 3,300 tokens for a GPT-5.6 request.
Rendered messages retain less memory; a long assistant message keeps about a fifth of the heap it kept before.
Behavior and default changes 16
K3, K3-256K, and Kimi For Coding accept tools added mid-conversation without invalidating the prompt cache.
Thinking blocks from earlier assistant messages produced by another model are dropped instead of being sent as plain text.
Changing the thinking level mid-session with an API key keeps the prompt cache.
Conversation serialization for compaction, branch summaries, and bug reports omits thinking blocks to avoid oversized summarization requests.
When enabled, the setting uses only the terminal cursor instead of also drawing Pi's reverse-video cursor.
Reusable theme colors should be defined under
varswhen updating themes for the published schema.The tool render context includes outputPad, which now also applies to ! command output, tool output, and summary blocks.
Accepts * patterns to exclude matching tools.
Accepts * patterns and keeps MCP tools unless an entry starts with mcp__; this lets you select tools without unintentionally removing MCP tools.
Codemode image() also writes each image to a temp file and names the path in the result, allowing later turns to copy or move generated images.
The default NVIDIA model now points to nvidia/nemotron-3-ultra-550b-a55b instead of the model NVIDIA no longer serves.
On global npm installations, the command now recommends migrating to the managed installation from the pi.dev installer, which pins all dependencies.
Codemode errors now provide recovery guidance, including close matches, expected argument shapes, a suggested API for unknown models, and guidance for oversized store values or undisplayed images.
Provider status labels now say "not configured" instead of "unconfigured" when credentials are absent.
OAuth credentials are stored per server name and URL, allowing servers with the same URL to use different accounts; URL-only credentials move to the first server that uses them.
The TUI now defaults to fullscreen; set tuiMode to "regular" to keep the terminal's normal scrollback.
Tooling 4
Tool declarations expose input constraints as
@tags on property comments, so scripts can see constraints without repeating them in descriptions.Codemode tool rows show elapsed time while a script runs and total time when it finishes.
Codemode declarations spell out MCP result fields instead of referring to an undefined
CallToolResult<T>type, and no longer include shared MCP types.A Nix flake lets macOS and Linux users run the latest release with nix run github:earendil-works/pi/stable.
Fixes and other changes 67
Requests with images in an error tool result no longer fail with a 400; images are sent after the turn's tool results.
Retries now trigger for gateway upstream-stream forwarding errors and temporary service-unavailable errors.
Stopping a script or reaching its deadline no longer waits for a non-interruptible built-in to return on Bun.
Live workers are limited to two across sessions, with cancelled workers counted until they exit.
Calling done() on a custom overlay closes that overlay rather than the topmost overlay.
Vertex requests no longer fail with an unsupported thinking-budget error, and the thinking level is honored on the Gemini API.
When several providers offer a model match, Pi prefers the provider with credentials and otherwise reports the ambiguity.
Adds a model for each provider that offers it and warns when the match is ambiguous.
Uses a 500K context window instead of 272K.
Thinking no longer appears after the answer when a proxy sends reasoning and content in the same stream chunk.
Uses the Anthropic Messages API for MiniMax M2.7, fixing the unsupported protocol error.
Empty quoted arguments are preserved, so later positional arguments are not shifted and positional defaults can apply.
Fixed labels for numeric-string or null arguments in the TUI, session tree, and HTML exports.
Resume restores the session's active tools, with --tools +name/-name entries applied on top unless tool selection is explicit.
Parsing no longer drops fields when a string contains an invalid Unicode escape.
A symlinked
AGENTS.mdin a git worktree nested inside its main repository no longer prevents project context from loading.When Anthropic rejects strict tools due to grammar size, tool count, or union limits, Pi retries once with preferred tools non-strict.
On Windows, Pi briefly retries reads or writes when a previous lock folder is still being deleted, rather than failing immediately with
EPERM.Codemode no longer fails with a broken bridge when Pi runs under
node --watchon Node 24 or 26.Tilde expansion now works in
!pattern,+path, and-pathentries for the extensions, skills, prompts, and themes settings.Pi no longer lists resources while connecting, so servers with resources can register tools without waiting for resource enumeration.
Cancelled or timed-out MCP calls waiting for an OAuth refresh are no longer sent to the server after the refresh finishes.
The request timeout now applies only while waiting for response headers, preventing streams from being aborted mid-generation.
Negative placeholder prices from OpenRouter are treated as zero, avoiding extreme negative cost displays for router models.
The timeout limits the entire sign-in, not only the wait for the browser.
Runs started with
pi.sendMessage(..., { triggerTurn: true })no longer remove sections added bybefore_agent_startafter the first tool call.A tool declaring an output schema resolves with its value on failure too, rather than rejecting every failed tool call.
“The upstream provider returned an error” is now retried as a transient provider error.
Login falls back to a free loopback port when port 53692 is reserved or in use.
Clipboard paste works in Termux, and failed copies include the Termux:API install hint.
Text outputs are separated with numbered markers, and console calls appear after other output in one block with one line per call.
Input is estimated at 3.5 characters per token instead of 4 when calculating output limits, reducing context-limit request failures.
Standalone binaries load .env, .env.local, and .env.development from the launch directory into Pi's environment.
Mistral responses ending with finish_reason: error are retried.
The manager opens without waiting for all servers to connect and remains usable while servers are enabled, reconnected, or disabled.
Sign-ins can be cancelled with Esc at every step, session shutdown aborts a running sign-in, and authorization-server requests time out after 15 seconds.
Model headers now override the originator and User-Agent headers of Codex requests.
Images are no longer dropped as “could not be resized” on Node 24.19+ and 26.x because of Node messages on the image resize worker channel.
Bedrock OpenAI models now honor the configured thinking level instead of always using Bedrock's default reasoning effort.
Managed installs now keep only the new release and the release it updated from.
The codemode description now marks searchTools(), describeTool(), and describeNamespace() as async, preventing models from serializing unawaited promises as {}.
Provider busy errors are retried rather than ending the turn.
Costs no longer undercount long prompts on models with prompt-length pricing tiers across the listed providers.
Bash and PowerShell results retain Took after session reloads, and live results show recorded execution time instead of wall-clock steps.
Automatically retries requests that fail with
The pending stream has been canceledafter a stalled HTTP/2 connection.Freezes built-ins before codemode scripts run, so attempts to patch them have no effect instead of crashing pi and leaving the tool call unsettled.
Registers pi as a native client, fixing
invalid_redirect_urisign-in failures on servers with OpenID Connect client registration.Waits for a connecting server during shutdown instead of returning while its transport remains open.
On an image file, resolves to an image block that
image()can show, allowing codemode scripts to receive and display images.Fixed codemode failing for the rest of a session after a pnpm global update removed the running install; errors after pi was updated or removed on disk now include a restart hint.
Fixed subscription logins such as Sign in with ChatGPT failing after a request was cancelled during an OAuth token refresh.
Fixed interactive sessions crashing with read EIO or setRawMode EIO when the terminal went away, such as after closing the window or resuming a suspended pi in a closed terminal.
Requests no longer fail with an invalid signature in the thinking block after the system prompt or tools change.
Pricing tiers listed on models.dev are now included, correcting the short-context rate for requests above 272k input tokens.
Claude model IDs use dashes rather than periods to avoid 404 errors.
Fullscreen Kitty images no longer collapse to a one-row strip after scrolling in WezTerm.
JPEG, GIF, and WebP images rendered by extensions through Image now appear in Kitty, Ghostty, WezTerm, and Warp.
Calls in resumed sessions and HTML exports no longer render fully expanded while waiting for the server to connect, or permanently when it never connects.
A trailing comma no longer adds an extra model to the model cycle.
Provider errors with this message are now retried instead of ending the turn.
Thinking level controls now work after Together renamed the model.
The sign-in URL remains clickable when it wraps across lines.
Empty or null optional OAuth fields, including an empty token response scope, no longer cause sign-in failures.
When an MCP server requests additional scope, sign-in requests only the missing scopes while preserving previously granted scopes.
Slash command autocompletion now triggers when the input starts with whitespace.
Palette colors retain their chroma when the system theme is applied, avoiding overly vivid pastel palettes.
Deferred MCP tools loaded by
tool_searchare no longer dropped on resume or/reloadwhen their server reconnects before the next prompt.
@earendil-works/pi-coding-agent 0.9958 changes
Breaking changes 4
MCP tool and namespace names replace hyphens with underscores; colliding tools from a server get hash suffixes, and server names differing only by hyphen and underscore are rejected.
Scripts use searchTools() to find tools from MCP servers with default codemode exposure; namespace arguments accept hyphens or underscores, including mcp-prefixed forms.
This option now also disables built-in extensions, including the llama.cpp provider; load one explicitly with -e builtin:<name>.
The build switched to TypeScript 7.0 with an ES2024 target and replaced tsx with Node's built-in type stripping for running from source.
Deprecations 1
The inherited provider was renamed OpenAI Codex (legacy); Sign in with ChatGPT on the OpenAI provider supersedes it.
New APIs and options 30
Anthropic workload identity federation can use the Anthropic SDK environment variables ANTHROPIC_FEDERATION_RULE_ID, ANTHROPIC_ORGANIZATION_ID, and ANTHROPIC_IDENTITY_TOKEN_FILE.
HTTP MCP servers can use a provider's current /login token as a bearer token instead of MCP OAuth. Allowed only in global mcp.json and extensions; HTTPS is required except on loopback hosts.
New codemode helper returns a namespace's instructions and tool names. It accepts namespace names with hyphens or underscores, including mcp-prefixed forms.
MCP servers can have a description, set with pi mcp add --description; it appears in the system prompt and helps rank tools in tool search.
Sets the client name sent during OAuth client registration for MCP servers that only accept known clients.
GPT-6.1 Sol is available on the OpenAI, Azure OpenAI Responses, and OpenAI Codex providers.
Extension tools can provide annotations.
Theme files can specify an optional appearance field.
A built-in extension runs model-written JavaScript in a QuickJS sandbox that can call pi tools; enable it with defaultTools or --tools and configure it with codemode.mode and codemode.inlineBudget.
Extensions can make nested tool calls; emitted events include parentToolCallId and calling-tool results record bounded nestedCalls.
Entries prefixed with + or - add or remove tools without repeating defaults; project entries apply on top of the user setting.
Extension tools can declare exposure as direct, model-only, codemode, deferred, or hidden.
Controls fullscreen mouse-wheel scrolling; the default auto accelerates fast wheel spins outside local macOS terminals.
Extension tool results can indicate errors with isError.
Configure MCP servers over stdio or streamable HTTP, with OAuth; server definitions can be global or project-local once trusted.
ModelRuntime adds classifier support, including classify(), classifier model accessors, runtime-resolved authentication, and the built-in TypeSafe jev-latest model.
ModelRuntime can generate images using runtime-resolved authentication, including stored credentials, OAuth, runtime API keys, and models.json headers.
ModelRuntime adds model accessors for supported model types.
Extension tools can specify a namespace.
Extension tools can provide an output schema with structuredContent.
Manage MCP servers with add, remove, list, login, and logout subcommands.
Extensions can register MCP servers programmatically.
Extensions can register virtual models that select a physical model and thinking level for each request.
Extensions gain prepareLoadout() for orchestrating tools.
Extensions can observe parsed provider events before normalization.
RpcClient.prompt() now accepts streamingBehavior.
Extensions can access theme appearance.
Extensions can access theme colors.
Extensions can access the theme style API.
A built-in tool finds tools not declared to the model and declares them.
Performance 2
Merging remote catalog models no longer takes quadratic time, improving model lookups for providers with a refreshed pi.dev catalog.
Prompt submission no longer looks up the model catalog once per assistant message, avoiding slowdown as sessions grow.
Behavior and default changes 10
codemode-deferred is now an alias for codemode. Use direct exposure for tools the model should see without searching.
The first prompt no longer waits for MCP servers without direct tools; they connect in the background and are awaited when scripts name them, search tools, or tool_search runs.
MCP servers are listed in an mcp_servers system prompt section with one-line summaries, updated at each prompt; changed sections are appended to the conversation.
Reload enables tools newly added to defaultTools. Removed tools remain enabled, session-disabled tools stay off unless newly added, and command-line tool flags still override the setting.
GPT-6.1 Sol (
gpt-6.1-sol) is now the default OpenAI Codex model.followUp() responses now provide per-input disposition.
steer() responses now provide per-input disposition.
Structured results received by codemode scripts now hold up to 1 MiB, include truncated and full_output_path, and retain the first and last 512 KiB of longer output; empty output is an empty string.
Built-in extensions and tools are now named builtin:<name> in errors, diagnostics, RPC source info, and bug reports.
The system theme is now the default and derives colors from the terminal palette, rebuilding them when the terminal switches between light and dark.
Fixes and other changes 11
Tools with schema keywords rejected by Anthropic strict tool use, such as minimum or maximum, are now sent non-strict.
In only mode, the system prompt tool list no longer includes read, bash, edit, and write when requests declare only codemode.
Context overflow detection now handles Z.AI CN endpoint “Prompt exceeds max length” errors.
Extension commands registered without a string name or handler now cause the extension to fail loading with an error instead of crashing pi when / is typed.
codemode image() rejects malformed base64 data and unsupported image types, preventing invalid image blocks from breaking later provider requests.
Provider retries use exponential backoff when a Retry-After header contains an unparseable date, rather than firing immediately.
New sessions no longer intermittently ignore the saved default model or warn that no models are available when the model belongs to an extension-registered native provider with a stored credential.
Fixed
/loginwith OpenAI failing in the bundled release because of a missingopenai-chatgpt.jsmodule.Usage from tools called through ctx.executeTool() is now added to the calling tool's result usage and session cost.
Event dispatch no longer skips the next listener when a listener unsubscribes during handling, avoiding waitForIdle() timeouts after collectEvents().
A session file is now created when the first user message is sent, preventing new sessions from being lost if pi exits before the first assistant response.
@earendil-works/pi-coding-agent 0.8737 changes
Breaking changes 10
Missing or invalid --mode values now report an error and exit with a nonzero status instead of being silently ignored.
Runs requested from settled handlers are deferred until all settled handlers finish; handlers no longer see a reentrant agent_start during the same dispatch.
Adds AgentBeforeSettleEvent to the exported ExtensionEvent union; exhaustive switches must handle the new event shape.
Offline mode now blocks uploads while preserving local zip exports.
Adds append-only model-context edits to the exported SessionEntry union; exhaustive TypeScript entry switches must handle context_edit.
No longer accepts turn_end; host integrations must dispatch actionable boundaries with emitBoundary.
Use finishTurn instead of shouldStopAfterTurn; it runs before turn_end, applies its decision afterward, and receives error and aborted responses.
Becomes canonical for AgentSession provider context; assigning session.agent.state.messages no longer replaces future request history.
Removes the inherited agent option; use finishTurn and return { action: "end" } instead.
Gains required boundary fields, so consumers constructing TurnEndEvent values must provide the new shape.
New APIs and options 11
Claude Opus 5.5 is available through supported providers, including GitHub Copilot; Anthropic support includes adaptive thinking and a 1M context window.
GPT-6 Luna is available through supported providers, including GitHub Copilot, OpenAI API keys, and OpenAI Codex subscriptions.
GPT-6 Sol is available through supported providers, including GitHub Copilot, OpenAI API keys, and OpenAI Codex subscriptions.
Adds an actionable extension boundary for persisting structural entries and ensuring one next provider request.
Adds context_edit entries for omitting or replacing messages in future provider context without changing raw history, usage, or UI history.
Adds a per-request extension event that runs after context handlers on the full transcript, including system messages, and sends its result verbatim.
Provides host integrations a way to dispatch actionable boundaries using a base event and context builder.
Adds per-model image resize profiles in models.json for attachments, image reads, and tool-result images.
Supports retain-none compaction input by storing the compaction's own ID as its kept boundary when the second argument is null.
Appends a model-context edit; passing null omits a message from future provider context without changing raw history, usage, or UI history.
Adds an actionable extension boundary that can persist structural entries in order and ensure one next provider request.
Behavior and default changes 3
New xAI sessions now default to Grok 4.7.
Is the documented navigation path for AgentSession history now that SessionManager is canonical for provider context.
Call after appending through session.sessionManager to refresh provider context.
Fixes and other changes 13
Anthropic OAuth requests no longer report an outdated Claude Code version.
Image-only user messages are no longer rejected by some OpenAI-compatible providers because of an empty text part.
Compaction summaries are no longer refused by Claude Fable 5.1; the conversation is clearly separated and instructions are continuation-oriented.
Context handlers no longer see system messages; Pi restores the prompt and tool state after handlers filter or slice messages.
String replacements now produce valid assistant and tool-result message content as text blocks.
Preserves valid assistant usage captured after the latest context edit and avoids reusing usage made stale by later compaction.
Selected error retries and final length/overflow recovery no longer retain abandoned model attempts in future provider context.
Text files beginning with GIF are no longer misclassified as images and omitted from CLI file input.
Inherited unknown endpoints no longer receive strict tool schemas unless they explicitly advertise support.
Idle prompt-cache warming no longer rebuilds expired caches when its timer or an extension decision is delayed.
Malformed frontmatter is now reported as a resource warning instead of being silently ignored.
Text files beginning with GIF are no longer misclassified as images and omitted from read input.
Provides the documented restore path for session history under the canonical SessionManager provider context.
@earendil-works/pi-coding-agent 0.8631 changes
Breaking changes 5
Its arrays are now readonly.
The inherited field is now restricted to JSON-compatible values.
The inherited type is now conditional.
Custom providers now receive normalized
TranscriptContextstream inputs and must read system prompts and tool declarations fromcontext.messagesusing the provided helpers.Errors or invalid defined results now abort the command without invoking later handlers or executing locally; return
undefinedto continue propagation.
New APIs and options 15
Adds META_API_KEY support to access Muse Spark models.
Report problems with redacted diagnostics and optionally include transcripts or a model-written summary; reports can be uploaded or exported as a zip archive.
Configure reserved and recent-token budgets per model, falling back to ordinary compaction settings.
Override or disable Anthropic server-side fallback models.
Extensions can set this to
falsewhen re-registering tool definitions to opt out of constrained sampling.Extensions can make model calls through configured providers with resolved authentication.
Custom providers use this helper to read system prompts from normalized transcript context messages.
Custom providers use this helper to read tool declarations from normalized transcript context messages.
Set a per-model recent-token budget through
compaction.modelOverrides.Returns an unsubscribe function so extensions can drop event handlers; handler changes during dispatch apply to later dispatches.
Cost-aware refreshes keep valuable prompt caches alive during long tool runs and optionally while idle, with configurable modes and cache-lifetime metadata.
Models can be selected immediately from an offline catalog, with cached and live gateway catalogs overlaid when available.
Set a per-model reserved-token budget through
compaction.modelOverrides.Use
tool_searchas the loader name for prompt-prefix deferred native tool loading on Fireworks Messages models.Use
ToolSearchas the loader name for prompt-prefix deferred native tool loading on Fireworks Messages models.
Performance 1
Enables Node's persistent compile cache before loading the bundled CLI runtime, reducing repeat launch time.
Behavior and default changes 3
System prompt and tool updates are recorded in the transcript so they survive resume and branch navigation while preserving cached prefixes on supported models.
Radius now defaults to
balanced, falling back to the first available Radius model when needed.Enabled by default for built-in tools without requiring
PI_EXPERIMENTAL; extensions can re-register definitions withconstrainedSampling: false.
Fixes and other changes 7
Preserves line breaks in pasted diagnostics in /bug descriptions.
Suppresses /bug hints for user cancellations and retryable provider failures such as service unavailability.
Restores the OSC 52 fallback when no display is available and adds a verified Windows clipboard backend for WSL.
Recognizes inherited z.ai
Prompt too longerrors as context overflow.Prevents inherited Cerebras models from advertising unsupported strict tool schemas that caused HTTP 400 errors when strict and non-strict tools were mixed.
Extension tools without parameter schemas are rejected during registration rather than breaking provider requests.
Caps agent-level retry backoff at 60 seconds by default so long retry runs stay responsive during prolonged transient outages.
@earendil-works/pi-coding-agent 0.8540 changes
Breaking changes 3
The experimental client subpath is source-only through pi-test.sh; the supported local SDK and stdio RPC API are unchanged.
The experimental plugin subpath is source-only through pi-test.sh; the supported local SDK and stdio RPC API are unchanged.
Removes the unavailable inherited Grok Build 0.1 model from the model picker.
New APIs and options 7
GPT-6 Astra is available through OpenAI API keys and OpenAI Codex subscriptions.
Adds Meta (Muse subscription) login with automatic Model API key refresh, enabling access to Muse Spark models.
Adds support for the Meta API key environment variable.
Adds support for restoring externally managed session entries through the SDK.
Adds an inherited OpenAI-compatible model setting for OpenAI Responses output-token limits.
Adds a shortcut for jumping to the latest message while the fullscreen transcript is scrolled up.
Adds an inherited OpenAI-compatible model setting for vLLM scheduler priority.
Performance 1
Reduces search latency on large transcripts by caching unchanged results, indexing ASCII runs, and limiting highlight work to visible matches.
Behavior and default changes 3
Mouse wheel scrolling is five times faster while holding Alt in fullscreen mode.
Adds inherited LaTeX rendering for relational algebra join symbols.
The default editor embeds the streaming working indicator in its border; custom editors retain the standalone indicator unless they opt in.
Fixes and other changes 26
Mouse hover no longer changes selection or recenters autocomplete and settings lists, preventing clicks from targeting a different item.
Long prompt-cache requests for GPT-5.6+ Responses models use ttl: "30m" instead of prompt_cache_retention: "24h".
Configurable save keybindings work in the model and thinking selectors.
Fixes models incorrectly advertising image input support.
Fixes branch summaries failing when reasoning consumes the previous 2048-token output cap.
Supported Anthropic transports preserve per-turn effort and recover safely from signed-thinking mismatches.
Fixes bash, edit, find, grep, ls, read, and write tools ignoring the context working directory.
Restores the package's client compatibility entry point.
Fixes inherited Fireworks GLM models using the wrong API adapter.
Prevents drag selection from continuing over the fullscreen editor.
Ensures selected reasoning levels are sent with requests.
Fixes EXIF detection after non-EXIF APP1 segments.
Prevents imported sessions from overwriting an existing session with the same filename.
Fixes managed fd and ripgrep downloads on Linux musl systems and removes the requirement for the GitHub Releases API.
Fixes inherited matching for root domains and subdomains.
Processes terminal events that are not followed by a blank line.
Fixes inherited provider streams emitting incompatible event sequences and custom tool-call deltas.
Fixes requests hanging after a tool call by tunneling them with CONNECT.
Fixes the inherited catalog to include Qwen3.8 Flash.
Ensures abort cancels an in-progress manual compaction instead of reporting success without cancelling it.
Preserves the compaction boundary when forking sessions and fixes in-memory forks before an active turn settles.
Prevents concurrent session shares from overwriting one another.
Fixes skills being unavailable when Bash is the only enabled tool.
Fixes inherited terminal startup under restricted seccomp policies that reject the SIGWINCH self-signal.
Removes a misleading count that reported UTF-16 code units as byte counts.
Fixes inherited image capability detection for the Zed terminal.
@earendil-works/pi-coding-agent 0.84143 changes
Breaking changes 19
Replaces the inherited GoogleThinkingLevel type.
The inherited type was renamed to GoogleApiThinkingLevel; update references to the old type.
Default values that do not match the declared flag type are no longer accepted.
A new type represents normalized adapter thinking levels.
Agent.reset() now rejects until the agent is idle, rather than clearing transcript and runtime state during active runs.
The inherited v2 session and AgentHarness API moved from the experimental entrypoint to the default export, and experimental subpaths were removed.
Publish provider refresh updates through a generation-checked transaction, optionally persisting or deleting a ModelsStoreEntry.
Provider refresh callbacks use the read-only stored snapshot instead of dynamic refresh context store access.
Custom harness file-system implementations must provide this operation with same-filesystem replacement semantics for atomic JSONL publication.
JSON and RPC events now emit only assistantMessageEvent deltas; clients needing partial messages must assemble them between message_start and message_end.
Returns ProviderHeaders with string or null values and preserves null header-deletion markers; extensions must handle or forward null values unchanged.
Now accepts ModelsRefreshOptions and returns ModelsRefreshResult instead of discarding cancellation and provider errors.
Now accepts auth cancellation options rather than catalog refresh options; call refresh separately when remote freshness is required.
Renames the inherited pi-ai interface because its header transformation now applies to all authenticated provider requests.
This inherited interface was renamed to ModelsRequestTransforms; update extensions that refer to the old name.
Config-form extension OAuth callbacks must accept and honor a concrete abort signal.
No longer exposes runtime phase, model, thinking, attachment, or lock state; acquire SessionSnapshot values for that runtime information.
The inherited harness session model is replaced by v4 lane-based Session, SessionStorage, and SessionRepo APIs.
The v4 session repository contract is implemented by JsonlSessionRepo and InMemorySessionRepo; legacy JSONL and in-memory repository APIs were removed.
Security 3
Writes no longer override administrator-managed file permissions and ACLs.
Grok 4.6 is now the default xAI model.
Built-in models now use the Responses API with encrypted reasoning replay.
New APIs and options 43
RPC method retrieves and removes queued steering and follow-up messages.
Adds inherited experimental support for the vision-capable DeepSeek V4 Flash model through the built-in DeepSeek provider.
This function is now available through the public library exports.
Disables automatic fullscreen selection copying; Ctrl+X copies the active selection before falling back to the last assistant message, while /tree still copies the selected message.
Fullscreen scrollbars support an optional thumb theme color with a text fallback, consistent across normal and expanded states.
Fullscreen scrollbars support an optional track theme color with a muted fallback.
Custom Anthropic Messages model compatibility settings can now specify supportsMidConvoEffort.
Override detected terminal hyperlink, image, and truecolor support using environment variables or advanced settings.
New extension event lets host integrations distinguish waiting on a user-facing ctx.ui prompt from active agent work.
Exported helpers accept optional routing session IDs so callers can preserve provider routing without enabling prompt cache writes.
Saves the selected model as the global default; model and thinking selections otherwise remain session-scoped.
The Qwen Token Plan Individual catalog now supports this model.
Configurable thinking-token budget fields are available for vLLM, Qwen/SGLang, and llama.cpp servers.
An optional native PowerShell command execution tool is available on Windows and can be configured through defaultTools and the SDK.
Extension handlers receive compaction failure and abort events with the reason, retry state, source, and error message.
A selector lets users choose thinking levels; model and thinking selectors also offer searchable defaults, and selections remain session-scoped unless saved.
Simple stream requests now support inherited provider-neutral tool choice.
The catalog adds China-specific models, including GLM-4.6V vision support and API-equivalent usage cost estimates.
The inherited field preserves OpenAI Codex's terminal end_turn signal for diagnostics.
Route Cloudflare AI Gateway requests through a Workers AI binding without an API token.
Choose the initial built-in tool selection globally or per project; extension and SDK custom tools are preserved when selecting built-in defaults.
Choose whether fullscreen exit prints the final transcript or only a session resume hint.
Fullscreen mode adds unbound single-line transcript scrolling actions.
Fullscreen mode can search and navigate transcript matches, with incremental highlighting and configurable match theme colors.
The options can explicitly dispatch commands and expand skills and prompt templates when sending a user message.
Experimental constrained sampling is available for the default read, bash, edit, and write tools when PI_EXPERIMENTAL=1.
Select an initial per-run interactive theme without changing saved settings.
Fullscreen mode adds inherited, unbound actions for half-page transcript scrolling.
Preflights provider or model credentials and can optionally emit the resolved credential.
Added the shared international API key environment variable for Qwen Token Plan Individual.
Added a built-in provider with its documented subscription model catalog.
Gracefully stop after a completed turn before processing queued messages or making another model call.
Use this per-directory context file to replace AGENTS.md or CLAUDE.md in the same directory while preserving context from other directories.
Use the built-in Baseten provider with BASETEN_API_KEY authentication and zai-org/GLM-5.2 as its default model.
Enable compatibility handling for OpenAI-compatible streams that omit finish_reason, inferring normal and tool-use stops when the stream ends.
Opt in to prompt history navigation; explicit history bindings take precedence over application shortcuts while the editor is focused.
Switch between regular and fullscreen modes at runtime; fullscreen mode provides a sticky editor and footer with an independently scrollable transcript.
Interactive messages can render supported Mermaid diagrams as themed Unicode, optionally while streaming.
Register chainable hooks for display-only transformation of user and assistant Markdown.
Experimental remote-session client APIs include a transport-neutral client, CBOR protocol, Unix-socket transport, and RemoteSession controller.
Configure arbitrary OpenAI-compatible model sampling parameters in models.json, model overrides, extension providers, and stream options.
Opt in to vLLM thinking-token budgeting for OpenAI-compatible models, reserving output tokens for the final answer.
Select fullscreen TUI mode when starting the application.
Performance 3
Full-width layout rows are painted directly instead of recomposited on every frame, reducing allocation churn.
Mistral requests use a native Chat Completions HTTP stream instead of the inherited SDK transport, eliminating generated client and schema runtime overhead.
Worst-case automatic detection delay was reduced from 200 ms to 100 ms by probing color-scheme and background support concurrently.
Behavior and default changes 19
Transcript notices report Anthropic thinking blocks dropped during provider recovery when cache miss notices are enabled.
Scrollbars reveal on pointer entry and support track-click jumping.
Search arrows underline on hover, and the search placeholder is capitalized.
The selector keeps active options marked while browsing.
The selector keeps active options marked, uses consistent per-item toggles, and strikes through unavailable models.
Supported first-party models can use an automatic server-side refusal fallback, with usage pricing based on the returned model.
Transcript usage notices are shown for compaction and branch summaries when cache miss notices are enabled.
For installer-managed installations, updates now stage and verify the selected release before activating it atomically in place.
Shared sessions render clickable terminal links, show only the canonical Radius artifact URL, and include the current system prompt and active tool definitions.
Anthropic, Azure OpenAI, Google, Mistral, and OpenAI adapters now send Pi's default User-Agent unless overridden.
Defaults avoid terminal-reserved shortcuts for image paste, model cycling, editor undo, fullscreen transcript navigation and search, and message queueing.
OpenAI Responses deferred tool loading prefers message-anchored additional_tools where supported, retaining tool-search and top-level fallbacks.
Thinking sections and tool results can be expanded per block with the mouse while preserving drag selection and link activation.
Kimi Coding requests now use pi's runtime User-Agent header.
Softened the guideline for PI_* environment variables in an attempt to reduce unnecessary inspection commands.
Fullscreen mode supports inherited double-click word and whitespace selection, granularity-aware drag selection, and triple-click paragraph selection.
Blocked extension tool_call events can terminate all-terminating batches, skipping the automatic follow-up model call.
CLI and RPC child processes now receive AI_AGENT=pi for generic agent attribution.
Markdown rendering now supports terminal-friendly Unicode rendering for LaTeX expressions.
Fixes and other changes 56
Large tool results crossing the threshold are compacted between tool execution and the next assistant response, with interactive progress restored when the run resumes.
Catalogs now include supported workers-ai/* passthrough models.
Compaction and branch summaries no longer force toolChoice to none.
Saving a default model from a non-empty model scope now keeps it available in that scope.
Autocomplete ranking now prefers direct and shallower matches over similarly ranked nested paths.
Word selection no longer splits paths and kebab-case tokens on / and -.
Requests no longer fail with HttpsProxyAgent is not a constructor when the bundled Node.js runtime uses an HTTP(S) proxy.
Rendering no longer crashes when image-heavy output exceeds V8's string length limit.
Fragmented tool calls no longer split when continuation chunks omit the tool-call ID.
Thinking signatures are no longer serialized repeatedly during streaming.
Reasoning-mandatory models no longer receive effort none.
OpenAI-compatible reasoning replay merges consecutive streamed text and summary deltas.
Appending to a resumed session whose JSONL file lacks a trailing newline no longer corrupts the next entry.
The selector keeps active options marked while browsing.
Toggling thinking visibility no longer clears partial output from running Bash tools.
OpenAI-compatible Chat Completions now honors an explicitly requested toolChoice when no tools are defined.
Extension messages sent with triggerTurn false while the agent is running are appended after the turn's tool results, preserving valid replayed message order.
Windows shell aborts no longer crash Pi when taskkill.exe is unavailable on PATH.
Opaque redacted reasoning from non-Anthropic models is no longer dropped and can be replayed.
Fallback response usage is now priced using the returned fallback model rather than the requested model.
An end-of-options delimiter lets prompts beginning with a dash be passed without being parsed as options.
Truncated summaries are no longer persisted when generation reaches its output token limit.
Built-in llama.cpp models remain selectable after a configured server refresh under PI_OFFLINE; sleeping router models and autoloadable unloaded presets are also included.
Typings now include the documented OpenAI-compatible compat.supportsFinishReason provider and model override.
Update checks no longer treat older registry versions as available updates, preventing downgrades of newer installed packages.
OpenAI-compatible Chat Completions reasoning replay now preserves and resends assistant-level reasoning_details verbatim and in order.
Interactive startup now renders warnings with the file path when settings files are invalid.
Google custom models now honor thinkingLevelMap, preserving extended thinking controls.
JSON and RPC events now include the tool call id and name.
Azure OpenAI Responses now honors toolChoice in provider-specific stream requests.
BOM markers no longer prevent frontmatter and user configuration files from loading.
Upstream request buffer failures now trigger automatic assistant retries.
The current working directory is no longer concatenated with later appended prompt content.
Built-in and custom DeepSeek API models no longer send output limits through an unsupported field.
Selecting built-in defaults no longer drops extension and SDK custom tools.
Coding-agent and harness edit tools now accept single-object inputs as one-edit arrays.
Selection copy uses the host clipboard and reports failure when OSC 52 is unsupported instead of claiming success.
Manual scrolling no longer snaps back to the current match, and fragmented mouse input no longer leaks into the search query.
Responses with tool calls no longer treat output-limit or provider-error stops as normal tool use.
JSON and RPC streaming events now retain cumulative usage.
Function and custom tool calls retain namespaces during streaming, proxying, and replay.
Configure the Escape timeout for high-latency terminals; the timeout applies only to lone Escape input.
With triggerTurn false, sending a message records the custom message without steering an active run.
Fixed startup crashes when the current working directory contains a bunfig.toml with preload.
Fixed wrappers recursing indefinitely when delegating to the original method.
Reduced fullscreen mouse event volume under tmux, Zellij, and GNU Screen by using button-motion tracking instead of all-motion tracking.
Fixed right-click clipboard pasting in fullscreen mode on Windows.
Fixed relation, multiplication, and named-operator spacing, plus matrix composition with stacked fractions, operator limits, and adjacent matrices.
Long-running sessions no longer keep using stale credentials after another process updates the file.
Path-containing globs now return results on Windows, and results from filesystem roots no longer lose path segments or gain duplicate trailing separators.
Oversized images returned by extension and built-in tools now go through automatic image resizing.
Model-name matching now checks cached models before waiting for catalog refresh.
Forced model availability refreshes no longer remain blocked behind a stalled earlier refresh.
Nested project-level provider retry settings no longer replace unmodified global provider retry settings.
The command now renders cached models without waiting for remote catalogs and cancels refresh when closed.
Calling setToolsExpanded(false) when tool output is already collapsed is now a no-op, avoiding redundant startup notices.
@earendil-works/pi-coding-agent 0.8329 changes
Breaking changes 2
Provider stop reasons are surfaced across supported streams; unmapped terminal reasons now produce provider errors instead of successful stops.
This deprecated TypeBox API was removed; extensions using it must migrate to supported TypeBox APIs.
New APIs and options 6
Claude Opus 5 is available through GitHub Copilot with adaptive thinking and a 1M context window.
Extensions can access the session's resolved model scope through the extension context.
Login can be completed in remote or headless environments by entering the redirect URL or authorization code when the loopback callback is unavailable.
Partial streaming messages can use the inherited
pendingstop reason.Exports configured API credentials for external clients, with automatic OAuth refresh and minimum-validity enforcement.
Exports configured bearer tokens for external clients, with automatic OAuth refresh and minimum-validity enforcement.
Behavior and default changes 2
Supported text and image provider transports inherit per-request fetch injection.
OAuth credentials are refreshed when less than five minutes of validity remain, rather than waiting until expiration.
Fixes and other changes 19
Explicitly configured Amazon Bedrock profiles are no longer overridden by ambient AWS access keys.
File-backed APPEND_SYSTEM.md prompts are now included in the interactive startup context listing.
Navigating the committed tree during an active response aborts and persists the outgoing turn instead of leaving dangling tool calls.
Context files no longer load twice when a linked Git worktree is nested under its main repository.
Failed Git package installs no longer leave partial directories that block clean retries.
Fallback paths no longer overflow narrow terminals; home paths are shortened and absolute paths are clickable when terminal hyperlinks are available.
Streamed responses now report token usage and populate session context accounting.
Filtering in the model selector now highlights the top match instead of retaining a stale selection.
Compiled validation of nullable array tool arguments is fixed.
Tool calls retain function arguments when malformed deltas also contain an empty custom object.
Skills, prompts, and themes retain package source metadata when extensions reload resources.
Reasoning models now send service-specific thinking controls and supported reasoning-effort levels.
Replacing a session during an active response aborts and persists the outgoing turn instead of leaving dangling tool calls.
Duplicate messages no longer appear when extensions switch sessions during interactive startup.
File-backed SYSTEM.md prompts are now included in the interactive startup context listing.
A status line now appears when tool output expansion is toggled.
Cancelling concurrently running user bash commands now aborts every active command.
Direct RPC bash commands now invoke extension user_bash handlers.
Output limits are no longer sent through an unsupported parameter.
@earendil-works/pi-coding-agent 0.8235 changes
Breaking changes 1
Generated model catalogs now expose only reasoning effort levels verified by providers in models.dev.
New APIs and options 15
This environment variable authenticates against Anthropic-compatible gateways using Bearer authorization, including for compaction and branch summaries.
Claude Opus 5 is available on Anthropic and Amazon Bedrock with adaptive thinking, inference profiles, and prompt caching.
Custom message renderers can now access the outputPad setting.
Direct RPC bash commands now stream output events correlated with request IDs.
Kimi Code subscription login supports device authorization and automatic token refresh.
The login flow now supports OpenRouter OAuth PKCE and mints a user-controlled API key.
Commands run by built-in and factory-created bash tools now receive the current model in this environment variable.
Commands run by built-in and factory-created bash tools now receive the current provider in this environment variable.
Commands run by built-in and factory-created bash tools now receive the current reasoning level in this environment variable.
Commands run by built-in and factory-created bash tools now receive the current session file in this environment variable.
Commands run by built-in and factory-created bash tools now receive the current session ID in this environment variable.
This inherited compatibility flag indicates whether a model supports grammar tools and helps gate constrained sampling.
Strict-mode compatibility coverage was expanded to gate constrained sampling for supported models.
This inherited compatibility flag indicates whether a model supports strict tools and helps gate constrained sampling.
Tools can prefer or require strict JSON Schema sampling, or use OpenAI Lark/regex grammars, across supported providers.
Performance 2
pi.dev catalog refreshes revalidate with If-None-Match, so unchanged provider catalogs return an empty 304 instead of a full download.
External-editor startup is no longer slow when the system temporary directory contains many entries.
Behavior and default changes 3
Model loading errors append the underlying cause, exposing provider responses such as OAuth refresh failures instead of only a wrapper message.
Device authorization, token exchange, and refresh requests use the configured gateway directly.
Generated model capability metadata gates constrained sampling so unsupported requests are prevented.
Fixes and other changes 14
The llama.cpp extension persists its model catalog so models stay listed before the first successful refresh and across restarts.
DNS lookup failures such as getaddrinfo, ENOTFOUND, and EAI_AGAIN now trigger automatic assistant retries.
These requests now use fresh routing session IDs and disable prompt caching where supported.
On Wayland, copying now falls back to X11 or OSC 52 when wl-copy fails.
llama.cpp models now use the loaded context window as their output token limit instead of capping it at 16K.
Fresh installs no longer prefer bundled model catalogs over newer remote catalogs because of newer package file mtimes.
Opening the model picker now reloads updated models.json configuration.
Retry waits now honor abort signals and configured delay limits.
Sessions retry once without a missing previous-response continuation after previous_response_not_found errors.
Cache breakpoints now advance through tool results, and cache control is enabled for ~anthropic/*-latest aliases.
Explicit self-updates now work when this environment variable is set.
IDs containing brackets now resolve as literal exact matches before glob matching.
Relative paths are preserved for sibling npm extensions loaded by a package.
Logs now respect custom agent directories instead of always writing under ~/.pi/agent.
@earendil-works/pi-coding-agent 0.8131 changes
Security 1
GitHub releases now include deterministic, checksummed source archives with instructions for rebuilding standalone binaries.
New APIs and options 12
A retry lifecycle event is available to interactive, JSON, RPC, and SDK consumers.
A retry lifecycle event is available to interactive, JSON, RPC, and SDK consumers.
A retry lifecycle event is available to interactive, JSON, RPC, and SDK consumers.
Extensions can register complete pi-ai providers, including native authentication, model refresh, filtering, and streaming behavior.
A new RPC command returns available thinking levels.
Use
/llamato search and download Hugging Face models and explicitly load or unload them with live progress.Connect to a llama.cpp router, search and download Hugging Face models, and explicitly load or unload models with live progress.
Use
/loginto set up a connection to a llama.cpp router.Message and tool execution lifecycle event types are now exported from the package root.
A built-in China subscription provider is available for provider setup and default model resolution, using regional endpoints and API-key authentication.
A built-in international subscription provider is available for provider setup and default model resolution, using regional endpoints and API-key authentication.
A new client method retrieves available thinking levels.
Performance 1
Sessions are no longer read and parsed twice when opened, reducing startup latency for large sessions.
Behavior and default changes 2
Automatic model catalog network refresh now runs in interactive and RPC modes instead of during startup initialization.
Tool, compaction, and branch-summary usage is persisted and included in session totals, footer totals, and session statistics.
Fixes and other changes 15
Transient provider failures now follow the configured retry policy during compaction and branch summarization.
Interactive startup no longer waits for background model catalog refresh while computing the footer provider count.
Inherited Kimi K3 models from Moonshot AI and Moonshot AI China use the OpenAI thinking format and expose reasoning effort support.
Extensions using the pre-0.81 agent-core API again receive the default stream fallback.
Prompt-template defaults now work for all arguments.
Inherited stored API-key credentials now apply their provider-scoped
envvalues, including Amazon Bedrock profiles.These models now default to the 272K context window, avoiding automatic long-context pricing.
The
k2p7alias is normalized tokimi-for-coding.Sessions now show API-equivalent implied costs with the subscription indicator.
Kimi K3 now exposes low, high, and max thinking levels.
Queued messages now preserve steering and follow-up delivery behavior during compaction.
Early stream endings now trigger automatic retry instead of ending the agent run.
OpenCode Go models routed through the OpenAI Responses API now work correctly.
Read tool errors are no longer syntax-highlighted as if they were file contents.
Persisted remote model catalogs no longer override newer bundled catalogs after an upgrade.
@earendil-works/pi-coding-agent 0.80108 changes
Breaking changes 18
Grok 3, Grok 3 Fast, Grok 4.20 variants, and Grok Code Fast 1 were removed from the built-in xAI model catalog.
AuthStorage and its storage backends are no longer exported; use ModelRuntime, a custom pi-ai CredentialStore, or readStoredCredential() for one-off auth.json reads.
The authStorage option was replaced by the async modelRuntime option; use ModelRuntime or a custom pi-ai CredentialStore.
The modelRegistry option was replaced by the async modelRuntime option.
A custom pi-ai CredentialStore can be used with ModelRuntime in place of the no-longer-exported AuthStorage backends.
SDK request-auth assembly through this method was replaced by ModelRuntime.getAuth().
This extension-facing method now returns Promise<void>; extensions must await it before synchronous registry reads because models.json loading is asynchronous.
An async option replaces authStorage and modelRegistry for SDK session model and authentication configuration.
This redundant projection was removed; use the pi-ai Models methods directly.
Assembles request auth; a provider ID returns provider-scoped auth, while a model also resolves built-in, models.json, and extension model headers.
Asynchronous ModelRuntime.refresh() is the canonical dynamic catalog refresh method.
Asynchronous pi-ai Models.refresh() provides canonical dynamic catalog refresh.
Use the pi-ai Models methods getModels(), getModel(), getProviders(), and checkAuth() in place of removed ModelRuntime projections.
Use readStoredCredential() for one-off reads of auth.json after AuthStorage is no longer exported.
The openai-responses flag was removed from models.json; replace sendSessionIdHeader: false with sessionAffinityFormat: "openai-nosession".
Session-affinity behavior is now controlled by this setting, with "openai", "openai-nosession", or "openrouter" values.
The inherited credential now uses the auth.json-compatible discriminator type: "api_key" and provider-scoped env values instead of type: "api-key" and metadata.
The inherited agent-core public harness shell execution options type was renamed from ExecutionEnvExecOptions.
Security 1
Rejects non-empty invalid session files without overwriting them.
New APIs and options 23
Extensions can progressively activate tools through Kimi’s native protocol using deferred tool loading.
Kimi K3 support is available across built-in providers, including Kimi Coding, Moonshot AI, Moonshot AI China, OpenRouter, and Vercel AI Gateway.
Grok 4.5 OpenAI Responses support is available with low, medium, and high thinking levels.
ModelRuntime.create() accepts any pi-ai CredentialStore through its credentials option.
ModelRuntime is the canonical async SDK and internal model/auth facade, composing model configuration, provider authentication, and dynamic catalogs.
Dynamic catalogs are now file-backed in models-store.json.
Forces an immediate model catalog refresh without updating pi or extensions.
The /login command discovers registered pi-ai providers directly, including ambient auth status and informational links.
Extensions can implement refreshModels(context) for dynamic model discovery, with optional provider-controlled persistence.
Users can sign in to xAI with a device code.
Copies the last assistant message in the transcript or the selected message in /tree.
Extensions can add tools during execution while supported Anthropic and OpenAI Responses models preserve prompt-cache prefixes.
Native xhigh and max thinking levels are available for Claude Fable 5 across generated provider catalogs.
Adds request-wide input-token pricing tiers to custom model costs in models.json, modelOverrides, and extension-registered providers for accurate long-context cost accounting.
Adds the opt-in max thinking level across CLI, SDK, RPC, model selection, and themes; themes fall back to thinkingXhigh when thinkingMax is undefined.
Claude Sonnet 5 is available through inherited Anthropic-compatible and Bedrock provider catalogs with adaptive thinking enabled.
Lets Ctrl+G use a configured editor before
$VISUALand$EDITORfallbacks; defaults to Notepad on Windows andnanoelsewhere.Adds an RPC command for reading session entries.
Adds an RPC command for reading session tree snapshots.
Controls horizontal padding for user messages, assistant messages, and thinking blocks.
Adds a package export for launching Pi directly in RPC mode.
Adds an extension event for observing session name changes.
Adds inherited reasoning token counts for providers that report reasoning or thinking token usage.
Behavior and default changes 8
The default xAI model is now Grok 4.5.
xAI login now uses a prefilled device-authorization link labeled “Sign in with SuperGrok or X Premium.”
The selector renders the current model snapshot immediately, refreshes configured providers in the background, and updates with partial results or timeout errors.
getAuth(model) includes configured model headers; stream methods resolve auth once, and before_provider_headers runs as a Models-only header transform before provider dispatch.
ModelRuntime composes built-in providers, immutable models.json configuration, and extension overlays through ad-hoc pi-ai provider methods.
OpenAI and Codex Responses now support inherited toolChoice, including required and named tool selection.
The shellPath setting now expands
~to the home directory.The default OpenAI model changes to
gpt-5.5.
Fixes and other changes 58
K3 and kimi-for-coding support replaying thinking blocks with empty signatures.
K3 exposes only its supported max thinking level.
Kimi Coding models now use adaptive thinking correctly; inherited requests use Anthropic adaptive thinking effort without token budgets.
Corrected inherited pricing metadata for Moonshot AI and Moonshot AI China.
Catalog generation no longer restores xAI models that were removed in 0.80.9.
Fixed inherited Kimi K3 output limits for Vercel AI Gateway and OpenRouter models.
Cloning or forking a session before its first assistant response now explains that the session must be saved first.
Adjacent assistant thinking blocks now render as one thinking section.
Bun standalone binaries now bundle OAuth adapters for interactive logins.
Refresh now parses pi.dev model-ID keyed responses, throttles checks to once per four hours, sends a versioned pi user agent, treats unimplemented routes as unavailable overlays, and shows concise /model status.
Inherited session IDs longer than 64 characters are fixed to meet the API limit.
Inherited terminal output now normalizes tab characters consistently.
Fixed the Windows terminal title after checking npm packages.
Legacy terminal decoding now handles Alt+symbol combinations such as Alt+, and Alt+.
Ambient AWS credentials keep using SigV4 authentication, including for custom model IDs.
Unhandled provider stop reasons are reported instead of only showing a generic unknown-error message.
Proxies that omit usage from message_delta events are now supported.
Reasoning replay now handles encrypted_content appearing only in the terminal response event.
Branch summaries now work with providers that use ambient authentication instead of API keys.
Authentication uses ambient account and gateway IDs when stored credentials contain only an API key.
Pastes clipboard text when the pasteboard does not contain an image.
Prompts for and saves a Bedrock API key instead of only displaying ambient AWS credential setup instructions.
The GitHub Copilot model now routes through the /responses endpoint.
Package removal now works when installed packages have conflicting peer dependencies.
Models omit the unsupported session-id header while preserving other cache-affinity data.
Inherited OpenRouter model context windows now use the top provider's actual context length.
Inherited OpenRouter OpenAI-compatible session IDs now use the x-session-id header instead of OpenAI-specific session-affinity fields.
The current date was removed from the default prompt to prevent cache invalidation across dates.
Preserves thinking blocks with empty thinking text but a valid signature instead of dropping them, avoiding thinking-block errors on newer Claude models.
Fixes inherited long-context cost accounting while retaining the intentional 272K default context limit for models that require an explicit override.
Removes the nonexistent bare gpt-5.6 alias.
Direct OpenAI requests use the 272K short-context tier, while the Codex backend exposes a 372K context window with long-context pricing.
Inherited post-compaction output-token budgeting now ignores stale assistant usage from before the compaction boundary.
Provider stream errors that explicitly tell callers to retry the request now trigger auto-retry.
Provider setup supports current Microsoft Foundry endpoint URLs.
Disk BMP files are detected, converted to PNG, and attached through
readand CLI@fileinputs.Inherited Claude Sonnet 5 metadata now uses adaptive thinking payloads for Anthropic-compatible and Bedrock requests.
Tool changes now apply before the next provider request in the same agent run without dropping
before_agent_startsystem-prompt overrides.Inherited OpenAI Codex Responses SSE response-header waits now use the configured HTTP timeout instead of a fixed 20 seconds, reducing false timeouts on slow connections.
Assistant messages stopped by output length now show a visible incomplete-response error.
Ending work, retry, compaction, or branch-summary indicators no longer shrink the TUI when clear-on-shrink is enabled.
Ephemeral CLI runs can use deterministic session IDs for provider cache affinity.
Streams now preserve reasoning replay state when output items finish out of order.
Compaction now stops after completing instead of continuing immediately.
Inherited provider HTTP errors now include response bodies instead of opaque SDK messages.
Notifications now stay before messages when resuming sessions.
Inherited max-token caps are fixed for providers that count input and output against one context window, preventing rejection of long requests.
Preserved-thinking requests send
falsewhen thinking is enabled, allowing replayedreasoning_contentto participate in provider caching.Markdown escape sequences such as
\"keep their visible backslashes in rendered transcripts.Inherited generated model pricing now matches current pay-as-you-go pricing from models.dev.
Request-scoped apiKey values now participate in provider auth resolution, allowing providers such as Cloudflare to derive request-specific base URLs from explicit call options.
Inherited Anthropic-compatible custom models now use explicit compatibility metadata rather than provider-name heuristics for session-affinity headers and unsupported tool-field omissions.
The inherited runtime detectCompat fallback in openai-completions was restored for models without explicit compat metadata.
Request-scoped env values now participate in provider auth resolution, allowing providers such as Cloudflare to derive request-specific base URLs from explicit call options.
The temporary legacy per-API stream alias was restored on the pi-ai compat entrypoint.
Inherited AWS_PROFILE now resolves built-in inference profile endpoints correctly.
Inherited Anthropic-compatible requests now apply session-affinity and unsupported tool-field defaults for custom Fireworks models.
Inherited metadata no longer enables unsupported Together reasoning toggles.
@earendil-works/pi-coding-agent 0.791 changes
Security 1
Pi Agent: Pi loads project-local extensions without approval
@earendil-works/pi-coding-agent 0.783 changes
Security 3
Pi Agent: Potential XSS in HTML session exports via Markdown URL sanitization bypass
Pi Agent: Predictable temporary extension install paths allow local privilege escalation on shared Linux hosts
Pi Agent: Race condition in Pi auth.json writes could expose stored credentials