News
Release notes, project updates, and announcements from the Pi team.
Pi 0.12.7
New version of pi. Download from npm or view release on GitHub.
Added
- Context Compaction: Long sessions can now be compacted to reduce context usage while preserving recent conversation history. (#92, docs)
/compact [instructions]: Manually compact context with optional custom instructions for the summary/autocompact: Toggle automatic compaction when context exceeds threshold- Compaction summarizes older messages while keeping recent messages (default 20k tokens) verbatim
- Auto-compaction triggers when context reaches
contextWindow - reserveTokens(default 16k reserve) - Compacted sessions show a collapsible summary in the TUI (toggle with
okey) - HTML exports include compaction summaries as collapsible sections
- RPC mode supports
{"type":"compact"}command and auto-compaction (emits compaction events)
- Branch Source Tracking: Branched sessions now store
branchedFromin the session header, containing the path to the original session file. Useful for tracing session lineage.
Pi 0.12.5
New version of pi. Download from npm or view release on GitHub.
Added
- Forking/Rebranding Support: All branding (app name, config directory, environment variable names) is now configurable via
piConfiginpackage.json. Forks can changepiConfig.nameandpiConfig.configDirto rebrand the CLI without code changes. Affects CLI banner, help text, config paths, and error messages. (#95)
Pi 0.12.4
New version of pi. Download from npm or view release on GitHub.
Added
- RPC Termination Safeguard: When running as an RPC worker (stdin pipe detected), the CLI now exits immediately if the parent process terminates unexpectedly. Prevents orphaned RPC workers from persisting indefinitely and consuming system resources.
Pi 0.12.3
New version of pi. Download from npm or view release on GitHub.
Fixed
- Rate limit handling: Anthropic rate limit errors now trigger automatic retry with exponential backoff (base 10s, max 5 retries). Previously these errors would abort the request immediately.
- Usage tracking during retries: Retried requests now correctly accumulate token usage from all attempts, not just the final successful one. Fixes artificially low token counts when requests were retried.
Pi 0.12.0
New version of pi. Download from npm or view release on GitHub.
Added
-p, --printFlag: Run in non-interactive batch mode. Processes input message or piped stdin without TUI, prints agent response directly to stdout. Ideal for scripting, piping, and CI/CD integration. Exits after first response.-P, --print-streamingFlag: Like-p, but streams response tokens as they arrive. Use--print-streaming --no-markdownfor raw unformatted output.--print-turnFlag: Continue processing tool calls and agent turns until the agent naturally finishes or requires user input. Combine with-pfor complete multi-turn conversations.--no-markdownFlag: Output raw text without Markdown formatting. Useful when piping output to tools that expect plain text.- Streaming Print Mode: Added internal
printStreamingoption for streaming output in non-TUI mode. - RPC Mode
printCommand: Send{"type":"print","content":"text"}to get formatted print output viaprint_outputevents. - Auto-Save in Print Mode: Print mode conversations are automatically saved to the session directory, allowing later resumption with
--continue. - Thinking level options: Added
--thinking-off,--thinking-minimal,--thinking-low,--thinking-medium,--thinking-highflags for directly specifying thinking level without the selector UI.
Changed
- Simplified RPC Protocol: Replaced the
promptwrapper command with direct message objects. Send{"role":"user","content":"text"}instead of{"type":"prompt","message":"text"}. Better aligns with message format throughout the codebase. - RPC Message Handling: Agent now processes raw message objects directly, with
timestampauto-populated if missing.
Pi 0.11.7
New version of pi. Download from npm or view release on GitHub.
Fixed
- Fix read path traversal vulnerability. Paths are now validated to prevent reading outside the working directory or its parents. The
readtool can read fromcwd, its ancestors (for config files), and all descendants. Symlinks are resolved before validation.
Pi 0.11.5
New version of pi. Download from npm or view release on GitHub.
Fixed
- Fixed fatal error "Cannot set properties of undefined (setting '0')" when editing empty files in the
edittool. - Simplified
edittool output: Shows only "Edited file.txt" for successful edits instead of verbose search/replace details. - Fixed fatal error in footer rendering when token counts contain NaN values due to missing usage data.
Pi 0.11.4
Pi 0.11.2
New version of pi. Download from npm or view release on GitHub.
Fixed
- Fixed TUI crash when pasting content containing tab characters. Tabs are now converted to 4 spaces before insertion.
- Fixed terminal corruption after exit when shell integration sequences (OSC 133) appeared in bash output. These sequences are now stripped along with other ANSI codes.
Pi 0.11.0
New version of pi. Download from npm or view release on GitHub.
Added
- File-based Slash Commands: Create custom reusable prompts as
.txtfiles in~/.pi/slash-commands/. Files become/filenamecommands with first-line descriptions. Supports{{selection}}placeholder for referencing selected/attached content. /branchCommand: Create conversation branches from any previous user message. Opens a selector to pick a message, then creates a new session file starting from that point. Original message text is placed in the editor for modification.- Unified Content References: Both
@pathin messages and--file pathCLI arguments now use the same attachment system with consistent MIME type detection. - Drag & Drop Files: Drop files onto the terminal to attach them to your message. Supports multiple files and both text and image content.
Changed
- Model Selector with Search: The
/modelcommand now opens a searchable list. Type to filter models by name, use arrows to navigate, Enter to select. - Improved File Autocomplete: File path completion after
@now supports fuzzy matching and shows file/directory indicators. - Session Selector with Search: The
--resumeand--sessionflags now open a searchable session list with fuzzy filtering. - Attachment Display: Files added via
@pathare now shown as "Attached: filename" in the user message, separate from the prompt text. - Tab Completion: Tab key now triggers file path autocompletion anywhere in the editor, not just after
@symbol.