Breaking Changes
- Extensions using
Editordirectly must now passTUIas the first constructor argument:new Editor(tui, theme). Thetuiparameter is available in extension factory functions. (#732)
Added
- OpenAI Codex official support: Full compatibility with OpenAI's Codex CLI models (
gpt-5.1,gpt-5.2,gpt-5.1-codex-mini,gpt-5.2-codex). Features include static system prompt for OpenAI allowlisting, prompt caching via session ID, and reasoning signature retention across turns. SetOPENAI_API_KEYand use--provider openai-codexor select a Codex model. (#737) pi-internal://URL scheme in read tool for accessing internal documentation. The model can read files from the coding-agent package (README, docs, examples) to learn about extending pi.- New
inputevent in extension system for intercepting, transforming, or handling user input before the agent processes it. Supports three result types:continue(pass through),transform(modify text/images),handled(respond without LLM). Handlers chain transforms and short-circuit on handled. (#761 by @nicobailon) - Extension example:
input-transform.tsdemonstrating input interception patterns (quick mode, instant commands, source routing) (#761 by @nicobailon) - Custom tool HTML export: extensions with
renderCall/renderResultnow render in/shareand/exportoutput with ANSI-to-HTML color conversion (#702 by @aliou) - Direct filter shortcuts in Tree mode: Ctrl+D (default), Ctrl+T (no-tools), Ctrl+U (user-only), Ctrl+L (labeled-only), Ctrl+A (all) (#747 by @kaofelix)
Changed
- Skill commands (
/skill:name) are now expanded in AgentSession instead of interactive mode. This enables skill commands in RPC and print modes, and allows theinputevent to intercept/skill:namebefore expansion.
Fixed
- Editor no longer corrupts terminal display when loading large prompts via
setEditorText. Content now scrolls vertically with indicators showing lines above/below the viewport. (#732) - Piped stdin now works correctly:
echo foo | piis equivalent topi -p foo. When stdin is piped, print mode is automatically enabled since interactive mode requires a TTY (#708) - Session tree now preserves branch connectors and indentation when filters hide intermediate entries so descendants attach to the nearest visible ancestor and sibling branches align. Fixed in both TUI and HTML export (#739 by @w-winter)
- Added
upstream connect,connection refused, andreset before headerspatterns to auto-retry error detection (#733) - Multi-line YAML frontmatter in skills and prompt templates now parses correctly. Centralized frontmatter parsing using the
yamllibrary. (#728 by @richardgill) ctx.shutdown()now waits for pending UI renders to complete before exiting, ensuring notifications and final output are visible (#756)- OpenAI Codex provider now retries on transient errors (429, 5xx, connection failures) with exponential backoff (#733)