New Features
- Built-in tools as extensible ToolDefinitions. Extension authors can now override rendering of built-in read/write/edit/bash/grep/find/ls tools with custom
renderCall/renderResultcomponents. See docs/extensions.md. - Unified source provenance via
sourceInfo. All resources, commands, tools, skills, and prompt templates now carry structuredsourceInfowith path, scope, and source metadata. Visible in autocomplete, RPC discovery, and SDK introspection. See docs/extensions.md. - AWS Bedrock cost allocation tagging. New
requestMetadataoption onBedrockOptionsforwards key-value pairs to the Bedrock Converse API for AWS Cost Explorer split cost allocation.
Breaking Changes
- Changed
ToolDefinition.renderCallandrenderResultsemantics. Fallback rendering now happens only when a renderer is not defined for that slot. IfrenderCallorrenderResultis defined, it must return aComponent. - Changed slash command provenance to use
sourceInfoconsistently. RPCget_commands,RpcSlashCommand, and SDKSlashCommandInfono longer exposelocationorpath. UsesourceInfoinstead (#1734) - Removed legacy
sourcefields fromSkillandPromptTemplate. UsesourceInfo.sourcefor provenance instead (#1734) - Removed
ResourceLoader.getPathMetadata(). Resource provenance is now attached directly to loaded resources viasourceInfo(#1734) - Removed
extensionPathfromRegisteredCommandandRegisteredTool. UsesourceInfo.pathfor provenance instead (#1734)
Migration Notes
Resource, command, and tool provenance now use sourceInfo consistently.
Common updates:
- RPC
get_commands: replacepathandlocationwithsourceInfo.path,sourceInfo.scope, andsourceInfo.source SlashCommandInfo: replacecommand.pathandcommand.locationwithcommand.sourceInfoSkillandPromptTemplate: replace.sourcewith.sourceInfo.sourceRegisteredCommandandRegisteredTool: replace.extensionPathwith.sourceInfo.path- Custom
ResourceLoaderimplementations: removegetPathMetadata()and read provenance from loaded resources directly
Examples:
command.path->command.sourceInfo.pathcommand.location === "user"->command.sourceInfo.scope === "user"skill.source->skill.sourceInfo.sourcetool.extensionPath->tool.sourceInfo.path
Changed
- Built-in tools now work like custom tools in extensions. To get built-in tool definitions, import
readToolDefinition/createReadToolDefinition()and the equivalentbash,edit,write,grep,find, andlsexports from@mariozechner/pi-coding-agent. - Cleaned up
buildSystemPrompt()so built-in tool snippets and tool-local guidelines come from built-inToolDefinitionmetadata, while cross-tool and global prompt rules stay in system prompt construction. - Added structured
sourceInfotopi.getAllTools()results for built-in, SDK, and extension tools (#1734)
Fixed
- Fixed extension command name conflicts so extensions with duplicate command names can load together. Conflicting extension commands now get numeric invocation suffixes in load order, for example
/review:1and/review:2(#1061) - Fixed slash command source attribution for extension commands, prompt templates, and skills in autocomplete and command discovery (#1734)
- Fixed auto-resized image handling to enforce the inline image size limit on the final base64 payload, return text-only fallbacks when resizing cannot produce a safe image, and avoid falling back to the original image in
readand@fileauto-resize paths (#2055) - Fixed
pi updatefor git packages to skip destructive reset, clean, and reinstall steps when the fetched target already matches the local checkout (#2503) - Fixed print and JSON mode to take over stdout during non-interactive startup, keeping package-manager and other incidental chatter off protocol/output stdout (#2482)
- Fixed cli-highlight auto-detection for languageless code blocks that misidentified prose as programming languages and colored random English words as keywords
- Fixed Anthropic thinking disable handling to send
thinking: { type: "disabled" }for reasoning-capable models when thinking is explicitly off (#2022) - Fixed explicit thinking disable handling across Google, Google Vertex, Gemini CLI, OpenAI Responses, Azure OpenAI Responses, and OpenRouter-backed OpenAI-compatible completions (#2490)
- Fixed OpenAI Responses replay for foreign tool-call item IDs by hashing foreign IDs into bounded
fc_<hash>IDs - Fixed OpenAI-compatible completions streams to ignore null chunks instead of crashing (#2466 by @Cheng-Zi-Qing)
- Fixed
truncateToWidth()performance for very large strings by streaming truncation (#2447) - Fixed markdown heading styling being lost after inline code spans within headings