Changelog

Release notes and changes from the Pi changelog.

Release notes

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 o key)
    • 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 branchedFrom in the session header, containing the path to the original session file. Useful for tracing session lineage.

Read more

Release notes

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 piConfig in package.json. Forks can change piConfig.name and piConfig.configDir to rebrand the CLI without code changes. Affects CLI banner, help text, config paths, and error messages. (#95)

Read more

Release notes

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.

Read more

Release notes

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.

Read more

Release notes

Pi 0.12.1

New version of pi. Download from npm or view release on GitHub.

Added

  • Models: Added support for OpenAI's new models:
    • gpt-4.1 (128K context)
    • gpt-4.1-mini (128K context)
    • gpt-4.1-nano (128K context)
    • o3 (200K context, reasoning model)
    • o4-mini (200K context, reasoning model)

Read more

Release notes

Pi 0.12.0

New version of pi. Download from npm or view release on GitHub.

Added

  • -p, --print Flag: 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-streaming Flag: Like -p, but streams response tokens as they arrive. Use --print-streaming --no-markdown for raw unformatted output.
  • --print-turn Flag: Continue processing tool calls and agent turns until the agent naturally finishes or requires user input. Combine with -p for complete multi-turn conversations.
  • --no-markdown Flag: Output raw text without Markdown formatting. Useful when piping output to tools that expect plain text.
  • Streaming Print Mode: Added internal printStreaming option for streaming output in non-TUI mode.
  • RPC Mode print Command: Send {"type":"print","content":"text"} to get formatted print output via print_output events.
  • 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-high flags for directly specifying thinking level without the selector UI.

Changed

  • Simplified RPC Protocol: Replaced the prompt wrapper 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 timestamp auto-populated if missing.

Read more

Release notes

Pi 0.11.8

New version of pi. Download from npm or view release on GitHub.

Fixed

  • Absolute glob patterns (e.g., /Users/foo/**/*.ts) are now handled correctly. Previously the leading / was being stripped, causing the pattern to be interpreted relative to the current directory.

Read more

Release notes

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 read tool can read from cwd, its ancestors (for config files), and all descendants. Symlinks are resolved before validation.

Read more

Release notes

Pi 0.11.6

New version of pi. Download from npm or view release on GitHub.

Fixed

  • Fix --system-prompt <path> allowing the path argument to be captured by the message collection, causing "file not found" errors.

Read more

Release notes

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 edit tool.
  • Simplified edit tool 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.

Read more

Release notes

Pi 0.11.4

New version of pi. Download from npm or view release on GitHub.

Fixed

  • Fixed chat rendering crash when messages contain preformatted/styled text (e.g., thinking traces with gray italic styling). The markdown renderer now preserves existing ANSI escape codes when they appear before inline elements.

Read more

Release notes

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.

Read more

Release notes

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 .txt files in ~/.pi/slash-commands/. Files become /filename commands with first-line descriptions. Supports {{selection}} placeholder for referencing selected/attached content.
  • /branch Command: 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 @path in messages and --file path CLI 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 /model command 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 --resume and --session flags now open a searchable session list with fuzzy filtering.
  • Attachment Display: Files added via @path are 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.

Read more