Changelog
Release notes, project updates, and announcements from the Pi team.
Pi 0.27.0
New version of pi. Download from npm or view release on GitHub.
Breaking
- Session hooks API redesign: Merged
branchevent intosessionevent.BranchEvent,BranchEventResulttypes andpi.on("branch", ...)removed. Usepi.on("session", ...)withreason: "before_branch" | "branch"instead.AgentSession.branch()returns{ cancelled }instead of{ skipped }.AgentSession.reset()andswitchSession()now returnboolean(false if cancelled by hook). RPC commandsreset,switch_session, andbranchnow includecancelledin response data. (#278)
Added
- Session lifecycle hooks: Added
before_*variants (before_switch,before_clear,before_branch) that fire before actions and can be cancelled with{ cancel: true }. Addedshutdownreason for graceful exit handling. (#278)
Pi 0.26.1
New version of pi. Download from npm or view release on GitHub.
Fixed
- SDK tools respect cwd: Core tools (bash, read, edit, write, grep, find, ls) now properly use the
cwdoption fromcreateAgentSession(). Added tool factory functions (createBashTool,createReadTool, etc.) for SDK users who specify customcwdwith explicit tools. (#279)
Pi 0.26.0
New version of pi. Download from npm or view release on GitHub.
Added
SDK for programmatic usage: New
createAgentSession()factory with full control over model, tools, hooks, skills, session persistence, and settings. Philosophy: "omit to discover, provide to override". Includes 12 examples and comprehensive documentation. (#272)Project-specific settings: Settings now load from both
~/.pi/agent/settings.json(global) and<cwd>/.pi/settings.json(project). Project settings override global with deep merge for nested objects. Project settings are read-only (for version control). (#276)SettingsManager static factories:
SettingsManager.create(cwd?, agentDir?)for file-based settings,SettingsManager.inMemory(settings?)for testing. AddedapplyOverrides()for programmatic overrides.SessionManager static factories:
SessionManager.create(),SessionManager.open(),SessionManager.continueRecent(),SessionManager.inMemory(),SessionManager.list()for flexible session management.
Pi 0.25.4
New version of pi. Download from npm or view release on GitHub.
Fixed
- Syntax highlighting stderr spam: Fixed cli-highlight logging errors to stderr when markdown contains malformed code fences (e.g., missing newlines around closing backticks). Now validates language identifiers before highlighting and falls back silently to plain text. (#274)
Pi 0.25.3
New version of pi. Download from npm or view release on GitHub.
Added
Gemini 3 preview models: Added
gemini-3-pro-previewandgemini-3-flash-previewto the google-gemini-cli provider. (#264 by @LukeFost)External editor support: Press
Ctrl+Gto edit your message in an external editor. Uses$VISUALor$EDITORenvironment variable. On successful save, the message is replaced; on cancel, the original is kept. (#266 by @aliou)Process suspension: Press
Ctrl+Zto suspend pi and return to the shell. Resume withfgas usual. (#267 by @aliou)Configurable skills directories: Added granular control over skill sources with
enableCodexUser,enableClaudeUser,enableClaudeProject,enablePiUser,enablePiProjecttoggles, pluscustomDirectoriesandignoredSkillssettings. (#269 by @nicobailon)Skills CLI filtering: Added
--skills <patterns>flag for filtering skills with glob patterns. Also addedincludeSkillssetting and glob pattern support forignoredSkills. (#268)
Pi 0.25.1
New version of pi. Download from npm or view release on GitHub.
Fixed
Gemini image reading broken: Fixed the
readtool returning images causing flaky/broken responses with Gemini models. Images in tool results are now properly formatted per the Gemini API spec.Tab completion for absolute paths: Fixed tab completion producing
//tmpinstead of/tmp/. Also fixed symlinks to directories (like/tmp) not getting a trailing slash, which prevented continuing to tab through subdirectories.
Pi 0.25.0
New version of pi. Download from npm or view release on GitHub.
Added
Interruptible tool execution: Queuing a message while tools are executing now interrupts the current tool batch. Remaining tools are skipped with an error result, and your queued message is processed immediately. Useful for redirecting the agent mid-task. (#259 by @steipete)
Google Gemini CLI OAuth provider: Access Gemini 2.0/2.5 models for free via Google Cloud Code Assist. Login with
/loginand select "Google Gemini CLI". Uses your Google account with rate limits.Google Antigravity OAuth provider: Access Gemini 3, Claude (sonnet/opus thinking models), and GPT-OSS models for free via Google's Antigravity sandbox. Login with
/loginand select "Antigravity". Uses your Google account with rate limits.
Changed
- Model selector respects --models scope: The
/modelcommand now only shows models specified via--modelsflag when that flag is used, instead of showing all available models. This prevents accidentally selecting models from unintended providers. (#255)
Pi 0.24.2
New version of pi. Download from npm or view release on GitHub.
Fixed
- More Kitty keyboard protocol fixes: Fixed Backspace, Enter, Home, End, and Delete keys not working with Caps Lock enabled. The initial fix in 0.24.1 missed several key handlers that were still using raw byte detection. Now all key handlers use the helper functions that properly mask out lock key bits. (#243)
Pi 0.24.1
New version of pi. Download from npm or view release on GitHub.
Added
OAuth and model config exports: Scripts using
AgentSessiondirectly can now importgetAvailableModels,getApiKeyForModel,findModel,login,logout, andgetOAuthProvidersfrom@mariozechner/pi-coding-agentto reuse OAuth token storage and model resolution. (#245)xhigh thinking level for gpt-5.2 models: The thinking level selector and shift+tab cycling now show xhigh option for gpt-5.2 and gpt-5.2-codex models (in addition to gpt-5.1-codex-max). (#236 by @theBucky)
Pi 0.24.0
New version of pi. Download from npm or view release on GitHub.
Added
Subagent orchestration example: Added comprehensive custom tool example for spawning and orchestrating sub-agents with isolated context windows. Includes scout/planner/reviewer/worker agents and workflow commands for multi-agent pipelines. (#215 by @nicobailon)
getMarkdownTheme()export: Custom tools can now importgetMarkdownTheme()from@mariozechner/pi-coding-agentto use the same markdown styling as the main UI.pi.exec()signal and timeout support: Custom tools and hooks can now pass{ signal, timeout }options topi.exec()for cancellation and timeout handling. The result includes akilledflag when the process was terminated.Kitty keyboard protocol support: Shift+Enter, Alt+Enter, Shift+Tab, Ctrl+D, and all Ctrl+key combinations now work in Ghostty, Kitty, WezTerm, and other modern terminals. (#225 by @kim0)
Dynamic API key refresh: OAuth tokens (GitHub Copilot, Anthropic OAuth) are now refreshed before each LLM call, preventing failures in long-running agent loops where tokens expire mid-session. (#223 by @kim0)
/hotkeyscommand: Shows all keyboard shortcuts in a formatted table.Markdown table borders: Tables now render with proper top and bottom borders.
Changed
Subagent example improvements: Parallel mode now streams updates from all tasks. Chain mode shows all completed steps during streaming. Expanded view uses proper markdown rendering with syntax highlighting. Usage footer shows turn count.
Skills standard compliance: Skills now adhere to the Agent Skills standard. Validates name (must match parent directory, lowercase, max 64 chars), description (required, max 1024 chars), and frontmatter fields. Warns on violations but remains lenient. Prompt format changed to XML structure. Removed
{baseDir}placeholder in favor of relative paths. (#231)
Breaking Changes
Custom tools now require
index.tsentry point: Auto-discovered custom tools must be in a subdirectory with anindex.tsfile. The old pattern~/.pi/agent/tools/mytool.tsmust become~/.pi/agent/tools/mytool/index.ts. This allows multi-file tools to import helper modules. Explicit paths via--toolorsettings.jsonstill work with any.tsfile.Hook
tool_resultevent restructured: TheToolResultEventnow exposes full tool result data instead of just text. (#233)- Removed:
result: stringfield - Added:
content: (TextContent | ImageContent)[]- full content array - Added:
details: unknown- tool-specific details (typed per tool via discriminated union ontoolName) ToolResultEventResult.resultrenamed toToolResultEventResult.text(removed), usecontentinstead- Hook handlers returning
{ result: "..." }must change to{ content: [{ type: "text", text: "..." }] } - Built-in tool details types exported:
BashToolDetails,ReadToolDetails,GrepToolDetails,FindToolDetails,LsToolDetails,TruncationResult - Type guards exported for narrowing:
isBashToolResult,isReadToolResult,isEditToolResult,isWriteToolResult,isGrepToolResult,isFindToolResult,isLsToolResult
- Removed:
Pi 0.23.4
New version of pi. Download from npm or view release on GitHub.
Added
Syntax highlighting: Added syntax highlighting for markdown code blocks, read tool output, and write tool content. Uses cli-highlight with theme-aware color mapping and VS Code-style syntax colors. (#214 by @svkozak)
Intra-line diff highlighting: Edit tool now shows word-level changes with inverse highlighting when a single line is modified. Multi-line changes show all removed lines first, then all added lines.
Pi 0.23.3
New version of pi. Download from npm or view release on GitHub.
Changed
Improved system prompt documentation section with clearer pointers to specific doc files for custom models, themes, skills, hooks, custom tools, and RPC.
Cleaned up documentation:
theme.md: Added missing color tokens (thinkingXhigh,bashMode)skills.md: Rewrote with better framing and exampleshooks.md: Fixed timeout/error handling docs, added import aliases sectioncustom-tools.md: Added intro with use cases and comparison tablerpc.md: Added missinghook_errorevent documentationREADME.md: Complete settings table, condensed philosophy section, standardized OAuth docs
Hooks loader now supports same import aliases as custom tools (
@sinclair/typebox,@mariozechner/pi-ai,@mariozechner/pi-tui,@mariozechner/pi-coding-agent).
Breaking Changes
- Hooks:
turn_endevent'stoolResultstype changed fromAppMessage[]toToolResultMessage[]. If you have hooks that handleturn_endevents and explicitly type the results, update your type annotations.
Pi 0.23.2
New version of pi. Download from npm or view release on GitHub.
Fixed
Fixed Claude models via GitHub Copilot re-answering all previous prompts in multi-turn conversations. The issue was that assistant message content was sent as an array instead of a string, which Copilot's Claude adapter misinterpreted. Also added missing
Openai-Intent: conversation-editsheader and fixedX-Initiatorlogic to check for any assistant/tool message in history. (#209)Detect image MIME type via file magic (read tool and
@fileattachments), not filename extension.Fixed markdown tables overflowing terminal width. Tables now wrap cell contents to fit available width instead of breaking borders mid-row. (#206 by @kim0)
Pi 0.23.1
New version of pi. Download from npm or view release on GitHub.
Fixed
Fixed TUI performance regression caused by Box component lacking render caching. Built-in tools now use Text directly (like v0.22.5), and Box has proper caching for custom tool rendering.
Fixed custom tools failing to load from
~/.pi/agent/tools/when pi is installed globally. Module imports (@sinclair/typebox,@mariozechner/pi-tui,@mariozechner/pi-ai) are now resolved via aliases.
Pi 0.23.0
New version of pi. Download from npm or view release on GitHub.
Added
Custom tools: Extend pi with custom tools written in TypeScript. Tools can provide custom TUI rendering, interact with users via
pi.ui(select, confirm, input, notify), and maintain state across sessions viaonSessioncallback. See docs/custom-tools.md and examples/custom-tools/. (#190)Hook and tool examples: Added
examples/hooks/andexamples/custom-tools/with working examples. Examples are now bundled in npm and binary releases.
Breaking Changes
- Hooks: Replaced
session_startandsession_switchevents with unifiedsessionevent. Useevent.reason("start" | "switch" | "clear") to distinguish. Event now includesentriesarray for state reconstruction.