New Features
- Configurable streaming working indicator for extensions via
ctx.ui.setWorkingIndicator(), including animated, static, and hidden indicators. See docs/tui.md#working-indicator, docs/extensions.md, and examples/extensions/working-indicator.ts. before_agent_startnow exposessystemPromptOptions(BuildSystemPromptOptions) so extensions can inspect the structured system-prompt inputs without re-discovering resources. See docs/extensions.md#before_agent_start and examples/extensions/prompt-customizer.ts.- Configurable keybindings for scoped model selector actions and session-tree filter actions. See docs/keybindings.md.
/cloneduplicates the current active branch into a new session, while extensions can choose whether to forkbeforeoratan entry viactx.fork(..., { position }). See README.md, docs/extensions.md, and docs/session.md.
Breaking Changes
- Changed SDK and CLI tool selection from cwd-bound built-in tool instances to tool-name allowlists.
createAgentSession({ tools })now expectsstring[]names such as"read"and"bash"instead ofTool[],--toolsnow allowlists built-in, extension, and custom tools by name, and--no-toolsnow disables all tools by default rather than only built-ins. Migrate SDK code fromtools: [readTool, bashTool]totools: ["read", "bash"](#2835, #3452) - Removed prebuilt cwd-bound tool and tool-definition exports from
@mariozechner/pi-coding-agent, includingreadTool,bashTool,editTool,writeTool,grepTool,findTool,lsTool,readOnlyTools,codingTools, and the corresponding*ToolDefinitionvalues. Use the explicit factory exports instead, for examplecreateReadTool(cwd),createBashTool(cwd),createCodingTools(cwd), andcreateReadToolDefinition(cwd)(#3452) - Removed ambient
process.cwd()/ default agent-dir fallback behavior from public resource helpers.DefaultResourceLoader,loadProjectContextFiles(), andloadSkills()now require explicit cwd/agent-dir style inputs, and exported system-prompt option types now require an explicitcwd. Pass the session or project cwd explicitly instead of relying on process-global defaults (#3452)
Added
- Added extension support for customizing the interactive streaming working indicator via
ctx.ui.setWorkingIndicator(), including custom animated frames, static indicators, hidden indicators, a newworking-indicator.tsexample extension, and updated extension/TUI/RPC docs (#3413) - Added
systemPromptOptions(BuildSystemPromptOptions) tobefore_agent_startextension events, so extensions can inspect the structured inputs used to build the current system prompt (#3473 by @dljsjr) - Added
/cloneto duplicate the current active branch into a new session, while keeping/forkfocused on forking from a previous user message (#2962) - Added
ctx.fork()support forposition: "before" | "at"so extensions and integrations can branch before a user message or duplicate the current point in the conversation; the interactive clone/fork UX builds on that runtime support (#3431 by @mitsuhiko) - Added configurable keybinding ids for scoped model selector actions and tree filter actions, so those interactive shortcuts can be remapped in
keybindings.json(#3343 by @mpazik) - Added
PI_OAUTH_CALLBACK_HOSTsupport for built-in OAuth login flows, allowing local callback servers used bypi authto bind to a custom interface instead of hardcoded127.0.0.1(#3409 by @Michaelliv) - Added
reasonandtargetSessionFilemetadata tosession_shutdownextension events, so extensions can distinguish quit, reload, new-session, resume, and fork teardown paths (#2863)
Changed
- Changed
pi updateto batch npm package updates per scope and run git package updates with bounded parallelism, reducing multi-package update time while preserving skip behavior for pinned and already-current packages (#2980) - Changed Bedrock session requests to omit
maxTokenswhen model token limits are unknown and to omittemperaturewhen unset, letting Bedrock use provider defaults and avoid unnecessary TPM quota reservation (#3400 by @wirjo)
Fixed
- Fixed
AgentSessionsystem-prompt option initialization to avoid constructing an invalid emptyBuildSystemPromptOptions, sonpm run checkpasses aftercwdbecame mandatory. - Fixed shell-path resolution to stop consulting ambient
process.cwd()state during bash execution, so session/project-specificshellPathsettings now follow the active coding-agent session cwd instead of the launcher cwd (#3452) - Fixed
ctx.ui.setWorkingIndicator()custom frames to render verbatim instead of forcing the theme accent color, so extensions now own working-indicator coloring when they customize it (#3467) - Fixed
pi updatereinstalling npm packages that are already at the latest published version by checking the installed package version before runningnpm install <pkg>@latest(#3000) - Fixed
@autocomplete plain queries to stop matching against the full cwd/base path, so path fragments in worktree names no longer crowd out intended results such as@plan(#2778) - Fixed built-in tool wrapping to use the same extension-runner context path as extension tools, so built-in tools receive execution context and
readcan warn when the current model does not support images (#3429) - Fixed
openai-completionsassistant replay to preservecompat.requiresThinkingAsTexttext-part serialization, avoiding same-model follow-up crashes when previous assistant messages mix thinking and text (#3387) - Fixed direct OpenAI Chat Completions sessions to map
sessionIdandcacheRetentionto prompt caching fields, sendingprompt_cache_keywhen caching is enabled andprompt_cache_retention: "24h"for directapi.openai.comrequests with long retention (#3426) - Fixed OpenAI-compatible Chat Completions sessions to optionally send aligned
session_id,x-client-request-id, andx-session-affinityheaders fromsessionIdviacompat.sendSessionAffinityHeaders, improving cache-affinity routing for backends such as Fireworks (#3430) - Fixed threaded
/resumesession relationships and current-session detection to canonicalize symlinked session paths during selector comparisons, so shared session directories no longer break parent-child matching or active-session delete protection (#3364) - Fixed
/session, Sessions docs, and CLI help to consistently document that session reuse supports both file paths and session IDs, and that/sessionshows the current session ID (#3390) - Fixed Windows pnpm global install detection to recognize
\\.pnpm\\store paths, so update notices now suggestpnpm install -g @mariozechner/pi-coding-agentinstead of falling back to npm (#3378) - Fixed missing
@sinclair/typeboxruntime dependency in@mariozechner/pi-coding-agent, so strict pnpm installs no longer fail withERR_MODULE_NOT_FOUNDwhen startingpi(#3434) - Fixed xterm uppercase typing in the interactive editor by decoding printable
modifyOtherKeysinput and normalizing shifted letter matching, soShift+letterno longer disappears inpi(#3436) - Fixed
/compactto reuse the session thinking level for compaction summaries instead of forcinghigh, avoiding invalid reasoning-effort errors ongithub-copilot/claude-opus-4.7sessions configured formediumthinking (#3438) - Fixed shared/exported plain-text tool output to preserve indentation instead of collapsing leading whitespace in the web share page (#3440)
- Fixed exported share pages to use browser-safe
TandOshortcuts with clickable header toggles for thinking and tool visibility instead of browser-reservedCtrl+T/Ctrl+Obindings (#3374 by @vekexasia) - Fixed skill resolution to dedupe symlinked aliases by canonical path, so
pi configno longer shows duplicate skill entries when~/.pi/agent/skillspoints to~/.agents/skills(#3417 by @rwachtler) - Fixed OpenRouter request attribution to include Pi app headers (
HTTP-Referer: https://pi.dev,X-OpenRouter-Title: pi,X-OpenRouter-Categories: cli-agent) when sessions are created through the coding-agent SDK and install telemetry is enabled (#3414) - Fixed custom-model
compatschema/docs to supportcacheControlFormat: "anthropic"for OpenAI-compatible providers that expose Anthropic-style prompt caching viacache_controlmarkers (#3392) - Fixed Cloud Code Assist tool schemas to strip JSON Schema meta-declaration keys before provider translation, avoiding validation failures for tool-enabled sessions that use
$schema,$defs, and related metadata (#3412 by @vladlearns) - Fixed direct Bedrock sessions to honor
model.baseUrlas the runtime client endpoint, restoring support for custom Bedrock VPC or proxy routes (#3402 by @wirjo) - Fixed the
edittool to coerce stringifiededitsJSON before validation, so models that send the array payload as a JSON string no longer fall back to ad-hoc shell edits (#3370 by @dannote) - Fixed package manifest positive glob entries to expand before loading packaged resources, restoring manifest patterns such as
skills/**/*.md(#3350 by @neonspectra)