Pi
v0.84.4 open-sourceAI agent toolkit: unified LLM API, agent loop, TUI, coding agent CLI
PI_IMAGE_PROTOCOL=kitty pi
{
"terminal": {
"hyperlinks": false,
"trueColor": true
}
}
{"type": "clear_queue"}
{
"modelThinkingLevels": {
"anthropic/claude-sonnet-4-20250514": "high"
}
}
{
"terminal.images": "kitty"
}
{ "fullscreenCopyOnSelect": false }
{
"app.message.followUp": "alt+enter"
}
"defaultTools": ["read", "powershell", "edit", "write"]
"defaultTools": ["read", "bash", "powershell", "edit", "write"]
pi -- -analyze this codebase for hardcoded secrets
pi --use-theme dracula
PI_EXPERIMENTAL=1 pi
{ "defaultTools": ["read", "bash", "edit"] }
pi --use-theme dracula
PI_EXPERIMENTAL=1 pi
await pi.sendUserMessage('/refactor', { expandPromptTemplates: true });
pi auth check
pi auth check
pi --tui-mode fullscreen
# Place directory-specific instructions in AGENTS.override.md
cat > src/api/AGENTS.override.md << 'EOF'
# API module context
Always validate inputs with Zod. Do not modify generated files.
EOF
pi --tui-mode fullscreen
{
"samplingParams": {
"temperature": 0.2,
"top_p": 0.9
},
"thinking_token_budget": 2048
}
pi auth print-bearer-token | xargs -I{} curl -H 'Authorization: Bearer {}' https://api.example.com/endpoint
pi auth print-api-key
ANTHROPIC_AUTH_TOKEN=my-gateway-token pi
export ANTHROPIC_AUTH_TOKEN=your-token-here
pi
echo "Session: $PI_SESSION_ID | Provider: $PI_PROVIDER | Model: $PI_MODEL | Reasoning: $PI_REASONING_LEVEL"
/login
#!/usr/bin/env bash
echo "Session: $PI_SESSION_ID"
echo "Provider: $PI_PROVIDER Model: $PI_MODEL Reasoning: $PI_REASONING_LEVEL"
echo "Session file: $PI_SESSION_FILE"
VERSION="0.81.1"
tar -xzf "pi-${VERSION}-source.tar.gz"
cd "pi-${VERSION}"
./scripts/build-binaries.sh --offline-model-data --platform linux-x64 --out "$PWD/out"
/login
/llama search llama-3
/llama load <model-id>
const levels = await rpcClient.getAvailableThinkingLevels();
/login
/llama <model-search-query>
const levels = await rpcClient.getAvailableThinkingLevels();
pi update --models
# In the Pi TUI, navigate to /tree, select the desired message, then press Ctrl+X
pi --thinking max 'Audit all authentication flows in src/ for privilege escalation paths'
{ "externalEditor": "code --wait" }
{ "outputPad": 2 }
// In your extension handler:
on('session_before_compact', ({ reason, willRetry }) => {
if (reason === 'overflow' && willRetry) {
console.log('Overflow compaction — another attempt will follow');
} else if (reason === 'manual') {
console.log('User triggered /compact manually');
}
});
pi update
pi update --all
# In Pi global settings (e.g. ~/.config/pi/settings.json)
{
"httpProxy": "http://proxy.corp.example.com:8080"
}
# In auth.json
{
"apiKeys": [
{
"provider": "amazon-bedrock",
"env": {
"AWS_ACCESS_KEY_ID": "AKIA...",
"AWS_SECRET_ACCESS_KEY": "secret",
"AWS_REGION": "us-east-1"
}
}
]
}
PI_EXPERIMENTAL=1 pi
pi run my-template.md 'custom-value' # passes arg 1; omit it to get the ${1:-7} default
pi --approve
pi --no-approve
// Inside an extension command handler
if (ctx.mode === 'json') {
// emit structured output only
} else {
// render rich TUI output
}
// Inside an extension command handler
const promptOptions = ctx.getSystemPromptOptions();
console.log(promptOptions);
pi --name incident-triage-2025
pi -n vuln-scan-run --print 'Scan the repo for hardcoded secrets'
pi --exclude-tools bash
pi --session-id ci-build-session-42 'Check for new lint errors in the diff'
# In your Pi settings file:
retry:
provider:
maxRetries: 2
# In your custom provider model config:
compat:
forceAdaptiveThinking: true
pi update
pi /login
pi update --self
PI_CODING_AGENT_SESSION_DIR=/var/pi/sessions pi
pi update
retry.provider.timeoutMs = 120000
retry.provider.maxRetries = 5
retry.provider.maxRetryDelayMs = 10000
pi --no-builtin-tools
ctx.ui.addAutocompleteProvider(myGithubIssueProvider);
return { result: myOutput, terminate: true };
/clone
PI_OAUTH_CALLBACK_HOST=0.0.0.0 pi auth
---
name: summarize
argument-hint: <file> [max-words]
description: Summarize a file
---
Summarize the contents of {{file}} in at most {{max-words}} words.
pi --no-context-files "Explain what this repo does"
import { loadProjectContextFiles } from 'pi';
const files = await loadProjectContextFiles(process.cwd());
console.log('Context files found:', files);
renderShell: "self"
pi --append-system-prompt "You are a security analyst. Follow OWASP guidelines." --append-system-prompt "Scope: only assess endpoints under /api/v2."
# In models.json, add an openRouterRouting block to your model entry:
{
"id": "my-model",
"openRouterRouting": {
"fallbacks": ["openai/gpt-4o", "anthropic/claude-3-5-sonnet"],
"dataCollection": false,
"zdr": true,
"maxPrice": { "prompt": 0.01, "completion": 0.03 },
"order": ["Fireworks", "Together"]
}
}
if [ "$PI_CODING_AGENT" = "true" ]; then
echo "Running inside Pi coding agent — skipping interactive prompts"
fi
if [ "$PI_CODING_AGENT" = "true" ]; then
echo "Running inside Pi coding agent — skipping interactive prompts"
fi
# Inside the /tree view, press Shift+T to show or hide timestamps on each entry.
import {
type CreateAgentSessionRuntimeFactory,
createAgentSessionFromServices,
createAgentSessionRuntime,
createAgentSessionServices,
getAgentDir,
SessionManager,
} from "@mariozechner/pi-coding-agent";
const createRuntime: CreateAgentSessionRuntimeFactory = async ({ cwd, sessionManager, sessionStartEvent }) => {
const services = await createAgentSessionServices({ cwd });
return {
...(await createAgentSessionFromServices({ services, sessionManager, sessionStartEvent })),
services,
diagnostics: services.diagnostics,
};
};
const runtime = await createAgentSessionRuntime(createRuntime, {
cwd: process.cwd(),
agentDir: getAgentDir(),
sessionManager: SessionManager.create(process.cwd()),
});
await runtime.newSession();
await runtime.fork("entry-id");
export default function myExtension(ctx) {
ctx.ui.setHiddenThinkingLabel("[Reasoning hidden — click to expand]");
}
// Inside your extension handler
async function myHandler(ctx) {
const response = await fetch('https://api.example.com/data', {
signal: ctx.signal
});
return response.json();
}
# In your project's settings.json
{
"sessionDir": "/path/to/project/.pi-sessions"
}
PI_TUI_WRITE_LOG=/var/log/pi pi
/export ~/sessions/pentest-2025-07-14.jsonl
/import ~/sessions/pentest-2025-07-14.jsonl
pi update
pi uninstall <package>
pi.registerTool({
name: "lookup",
description: "Look up a value",
promptSnippet: "lookup: fetches live data by key",
promptGuidelines: "Use lookup when the user asks for real-time data.",
execute: async (args) => { /* … */ }
});
pi.unregisterProvider("my-custom-provider")
pi --offline
# In settings.json
{
"transport": "sse"
}
pi --model sonnet:high
pi --model openai/gpt-4o
ctx.reload();
pi -ne -ns -np
const tools = pi.getAllTools();
for (const tool of tools) {
console.log(tool.name, tool.description, tool.parameters);
}
pi <package> --help
# In models.json
{
"providers": [...],
"modelOverrides": {
"claude-opus-4-5": {
"maxTokens": 8192
}
}
}
# In auth.json:
{
"openai": "!op read op://vault/openai/credential",
"anthropic": "$ANTHROPIC_API_KEY"
}
# In your keybindings config (see docs/keybindings.md)
{ "key": "ctrl+r", "action": "resume" }
pi install ./my-extension
pkg install nodejs termux-api git && npm install -g @mariozechner/pi-coding-agent && mkdir -p ~/.pi/agent && echo 'You are running on Android in Termux.' > ~/.pi/agent/AGENTS.md && pi
const prompt = ctx.getSystemPrompt();
/copy
HF_TOKEN=hf_xxxxxxxxxxxx pi
PI_CACHE_RETENTION=long pi
/files
/reload
pi --verbose
# In a Pi prompt, type:
Summarize this file: !{cat README.md}
"apiKey": "!security find-generic-password -ws 'anthropic'"
Ctrl+P # toggle path display
Ctrl+D # delete selected session (with inline confirmation)
pi.setLabel(entryId, "high-priority")
const usage = ctx.getContextUsage();
if (usage.used / usage.total > 0.8) {
await ctx.compact();
}
# In your Pi config:
"quietStartup": true
pi.registerCommand({
name: "scan",
getArgumentCompletions: async (args) => ["--target", "--profile", "--output"],
execute: async (args) => { /* ... */ }
});
OPENAI_API_KEY=<your-key> pi --provider openai-codex 'Review this file for hardcoded credentials' src/config.ts
# In the session picker, type: re:CVE-2024-\d+ to filter sessions by regex, or Ctrl+R to toggle sort mode
AI_GATEWAY_API_KEY=<your-key> pi --provider vercel-ai-gateway
/name threat-hunting-2024-q2
/scoped-models
/skill:brave-search what CVEs were published this week?
ctx.ui.setWorkingMessage("Fetching threat intel...");
/model openai/gpt-4
pi --no-tools
pi --no-extensions -e ./extensions/my-tool.ts
PI_SKIP_VERSION_CHECK=1 pi 'summarize the latest alerts'
{
"thinkingBudgets": {
"low": 1024,
"medium": 8192,
"high": 32768
}
}
const ac = new AbortController();
setTimeout(() => ac.abort(), 5000);
const confirmed = await ctx.ui.confirm("Proceed?", { signal: ac.signal });
import { truncateTail, DEFAULT_MAX_BYTES } from "pi/tools";
const raw = await runShellCommand(cmd);
return truncateTail(raw, { maxBytes: DEFAULT_MAX_BYTES });
/login openai-codex
pi --extension ./safety.ts -e ./todo.ts
{
"name": "my-extension-package",
"dependencies": { "zod": "^3.0.0" },
"pi": {
"extensions": ["./src/main.ts", "./src/tools.ts"]
}
}
ctx.ui.setTitle("My Custom Title")
pi --tools read,grep,find,ls
# Inside a hook, after user confirms:
# pi.setActiveTools(['read', 'grep', 'find', 'ls', 'bash'])
/quit
# In your slash command file:
echo 'Summarise the following: $ARGUMENTS' > ~/.pi/commands/summarise.txt
!!cat ~/.aws/credentials
{
"providers": {
"openai": {
"baseUrl": "https://my-internal-gateway.example.com/openai"
}
}
}
{
"images": {
"autoResize": true
}
}
import { discoverAuthStorage, discoverModels } from "@mariozechner/pi-coding-agent";
const authStorage = discoverAuthStorage(); // ~/.pi/agent/auth.json
const modelRegistry = discoverModels(authStorage); // + ~/.pi/agent/models.json
const model = modelRegistry.find("anthropic", "claude-sonnet-4-20250514");
const apiKey = await modelRegistry.getApiKey(model);
const available = await modelRegistry.getAvailable();
pi.registerCommand("branch-here", {
description: "Branch session from a specific entry",
async handler(ctx) {
await ctx.waitForIdle();
const entries = ctx.sessionManager.getBranch();
const target = entries[entries.length - 2]; // second-to-last entry
await ctx.branch(target.id);
}
});
pi --session-dir ./my-project-sessions -r
pi --session-dir /shared/sessions -c
mkdir -p .pi && echo 'You are a security-focused assistant. Always recommend least-privilege principles.' > .pi/SYSTEM.md
pi --system-prompt ~/prompts/pentest.md
~/.pi/agent/settings.json:
{ "apiKeys": { "anthropic": "sk-..." } }
PI_TIMING=1 pi
pi.on("session", (event) => {
if (event.reason === "before_branch") {
const allow = confirmBranch(); // your pre-check
if (!allow) return { cancel: true };
}
});
pi.on("session", async (event) => {
if (event.reason === "shutdown") {
await flushLogs();
}
});
const session = await SessionManager.continueRecent();
pi --skills 'recon*'
# While in the pi prompt, press Ctrl+G to open $EDITOR, write your message, save and quit to send it.
# Inside pi, run:
/login
# Then select: Antigravity
import { getAvailableModels, getApiKeyForModel, findModel, login, logout, getOAuthProviders } from '@mariozechner/pi-coding-agent';
const result = await pi.exec("npm test", { timeout: 30000 });
if (result.killed) console.error("Process timed out and was terminated");
/hotkeys
# See examples/custom-tools/ for a working starter
# Tool skeleton (TypeScript):
export default {
onSession({ reason, entries }) {
if (reason === "start") { /* initialise state */ }
},
async run(pi) {
const choice = await pi.ui.select("Pick an option", ["A", "B"]);
await pi.ui.notify(`You picked ${choice}`);
}
};
pi --list-models image
/show-images
pi --no-skills
pi --version
# In settings.json
{
"retry": {
"enabled": true,
"maxRetries": 5,
"baseDelayMs": 2000
}
}
export MISTRAL_API_KEY=<your-key>
pi <your-prompt>
echo '{"shellPath": "C:\\cygwin64\\bin\\bash.exe"}' > ~/.pi/agent/settings.json
/resume
{
"name": "my-provider",
"apiKey": "sk-...",
"authHeader": true,
"baseUrl": "https://my-provider.example.com/v1"
}
/copy
/compact focus on the authentication module decisions and discard unrelated tangents
/autocompact
{
"piConfig": {
"name": "mytool",
"configDir": ".mytool"
}
}
/debug Summary
Pi is an open-source coding agent harness that developers run as an interactive CLI, or embed via its extensible packages, to work with LLMs across providers like OpenAI, Anthropic, and Google through a single unified API. It targets developers and teams building or customizing their own coding agents rather than those wanting a packaged assistant, since it ships as a terminal UI plus separable runtime, telemetry, and AI-provider libraries that extensions can hook into. By default it runs with the permissions of the user who launched it, with no built-in sandboxing, though its documentation describes patterns for containerizing it when stronger isolation is needed. Chat and Slack automation are split into a companion project rather than bundled in. Development is active, with 261 contributors and a release roughly every ten days over the past year.
AI agent toolkit: unified LLM API, agent loop, TUI, coding agent CLI
What Pi answers
Which LLM providers can I switch between without changing how I work?
OpenAI, Anthropic, Google, and providers like NVIDIA NIM, Ant Ling, Mistral, and Bedrock all run through the same unified API, so switching is a config change, not a rewrite
Do I need to trust every project I open it in?
it prompts before loading project-local settings, instructions, and packages, with a global setting to always trust, never trust, or decide per project, and non-interactive flags for CI
What stops it from touching my filesystem or credentials if a prompt goes wrong?
nothing by default — it runs with the launching user's full permissions, and isolation only comes from containerizing it yourself per the documented patterns
Can I build my own assistant on top of it instead of using the CLI as-is?
yes, the runtime, telemetry, and AI-provider pieces ship as separate packages that extensions hook into, independent of the terminal UI
Does it fit into a script or CI pipeline, or is it interactive-only?
extensions can detect whether they're running in terminal, RPC, JSON, or print mode and suppress interactive prompts accordingly
Will updating pi also update my extensions?
no, a bare update now touches only pi itself; updating extensions alongside it requires explicitly asking for both
Examples
Command line
No option matches that search.
| option | found in | since | description |
|---|
No option matches that search.
Values are placeholders taken from each option’s declared default. Nothing is executed here — the output shown is a recording of a run that already happened.
Release history
- docs update
Pi adds manual overrides for terminal capability detection via environment variables and JSON config keys.
└──▷ TRY ITForce kitty inline image protocol when Pi's auto-detection fails inside a tmux session.$ PI_IMAGE_PROTOCOL=kitty piPermanently disable OSC 8 hyperlinks and set truecolor for a terminal path that corrupts those sequences.{ "terminal": { "hyperlinks": false, "trueColor": true } }- ›Adds
PI_HYPERLINKS=1|0|autoenvironment variable andterminal.hyperlinks: true|false|'auto'JSON setting to override OSC 8 hyperlink auto-detection when running behind a terminal proxy or multiplexer. - ›Adds
PI_IMAGE_PROTOCOL=kitty|iterm2|none|autoenvironment variable andterminal.images: 'kitty'|'iterm2'|false|'auto'JSON setting to override inline image protocol detection. - ›Adds
PI_TRUE_COLOR=1|0|autoenvironment variable andterminal.trueColor: true|false|'auto'JSON setting to override truecolor detection.
- ›Adds
- docs update
Pi RPC gains
clear_queuecommand to remove and recover queued steering and follow-up messages at runtime.└──▷ TRY ITCancel in-flight queued guidance (Esc behavior) and recover the text so the user can edit and resend it.$ {"type": "clear_queue"}- ›Adds
clear_queueRPC command ({"type": "clear_queue"}) that removes queued steering and follow-up messages and returns their text insteeringandfollowUpfields, enabling interactive Esc-style cancel-and-restore workflows.
- ›Adds
- docs update
Pi adds
ui_prompt_start/ui_prompt_endlifecycle events so integrations can detect when an extension is waiting on user input.- ›Adds
ui_prompt_startandui_prompt_endnotification-only lifecycle events that fire around ctx.ui.select(), ctx.ui.confirm(), ctx.ui.input(), and ctx.ui.editor() calls, letting host/status integrations surface a 'waiting for user' state instead of just 'running'. - ›Each event carries
event.reason('ui_prompt'),event.kind('select' | 'confirm' | 'input' | 'editor' | 'custom'), andevent.title(prompt title when available), giving handlers full context about which prompt type triggered the span. - ›Nested or overlapping prompts are coalesced into a single outer waiting span, so integrations receive one clean start/end pair regardless of prompt nesting depth.
- ›Adds
- docs update
Pi adds per-model thinking levels, fullscreen copy-on-select, and terminal capability overrides to its settings.
└──▷ USE ITPin a specific model to high thinking level at startup so every new session uses extended reasoning without manual selection.{ "modelThinkingLevels": { "anthropic/claude-sonnet-4-20250514": "high" } }Force kitty image protocol when auto-detection picks the wrong backend in your terminal emulator.{ "terminal.images": "kitty" }- ›Adds
modelThinkingLevelsconfig key to store per-model startup thinking levels, keyed by"provider/modelId"(e.g."anthropic/claude-sonnet-4-20250514": "high"). - ›Adds
fullscreenCopyOnSelectconfig key to automatically copy selected text in fullscreen mode; when disabled, Ctrl+X copies the active selection. - ›Adds
terminal.hyperlinks(boolean) JSON-only config key to override OSC 8 hyperlink support. - ›Adds
terminal.images(string or boolean) JSON-only config key to override image protocol support with"kitty"or"iterm2". - ›Adds
terminal.trueColor(boolean) JSON-only config key to override truecolor support.
+2 moreshow less
- ›Supports saving startup thinking level interactively via
/thinkingand pressing Ctrl+S. - ›Supports saving startup model defaults interactively via
/modeland pressing Ctrl+S.
- ›Adds
- docs update
Pi adds
/thinkingcommand to switch thinking level, plusfullscreenCopyOnSelectconfig and model-picker keyboard shortcuts.- ›Adds
/thinkingcommand to switch the thinking level interactively, with Ctrl+S in the picker saving it as the startup default. - ›Adds
fullscreenCopyOnSelectconfig key to control whether Ctrl+X copies the active fullscreen text selection or falls back to the last assistant message. - ›Adds Ctrl+S in the model picker to save the selected model as the startup default.
- ›Adds Ctrl+X shortcut to copy the selected message, the last assistant message, or the active fullscreen text selection depending on context.
- ›Adds
- docs update
Pi CLI adds model-picker shortcuts, thinking-level controls, and scoped-model cycling via keyboard.
- ›Adds Ctrl+L shortcut to open the model picker and choose a model for the current session.
- ›Adds
/thinkingcommand to choose a thinking level for the current session. - ›Adds Ctrl+S inside the thinking-level picker to save the startup default thinking level.
- ›Adds Shift+Tab to cycle through thinking levels.
- ›Adds Ctrl+P / Shift+Ctrl+P to cycle forward and backward through scoped models.
- v0.84.4
Pi v0.84.4 adds terminal capability overrides, RPC
clear_queue,fullscreenCopyOnSelect, extension UI prompt events, and DeepSeek vision model support.└──▷ GET THIS VERSION$ git clone --branch v0.84.4 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.84.4
└──▷ USE ITDisable automatic selection copying in fullscreen so Ctrl+X controls exactly what gets copied.{ "fullscreenCopyOnSelect": false }- ›Adds
fullscreenCopyOnSelectsetting to disable automatic selection copying in fullscreen mode; when disabled, Ctrl+X copies the active text selection before falling back to the last assistant message. - ›Adds RPC
clear_queuecommand to retrieve and remove queued steering and follow-up messages from the RPC queue. - ›Adds environment variables and advanced settings for overriding auto-detected terminal hyperlink, image, and truecolor capabilities.
- ›Adds
ui_prompt_startandui_prompt_endextension events so host integrations can distinguish active agent work from time spent waiting on user-facingctx.uiprompts. - ›Adds detectSupportedImageMimeTypeFromFile() to the public library exports.
+2 moreshow less
- ›Adds experimental
deepseek-v4-flash-vision-expvision-capable model through the built-in DeepSeek provider. - ›Adds transcript usage notices for compaction and branch summaries when cache miss notices are enabled.
- ›Adds
- docs update
Pi gains Windows/WSLWSLWindows Subsystem for Linux, a Microsoft-built compatibility layer that lets a Linux environment run directly on Windows without a virtual machine, giving cyber tools access to Linux binaries, filesystems, and syscalls on a Windows host. keybinding support with shortcuts for paste, search, model cycling, undo, and message queuing
└──▷ USE ITBind Alt+Enter to follow-up message queueing instead of the default Ctrl+Q, after configuring Windows Terminal to forward the key.{ "app.message.followUp": "alt+enter" }- ›Adds Alt+V to paste an image or clipboard text on Windows/WSL.
- ›Adds Ctrl+F to search the transcript in fullscreen mode on Windows/WSL.
- ›Adds Ctrl+Up / Ctrl+Down to jump between marked messages on Windows/WSL.
- ›Adds Alt+P to cycle to the previous model on Windows/WSL.
- ›Adds Ctrl+Z for undo on native Windows; WSL uses Alt+Z so Ctrl+Z can suspend pi.
+2 moreshow less
- ›Adds Ctrl+Q to queue a follow-up message and Alt+Q to restore queued messages on Windows/WSL.
- ›Supports binding
app.message.followUptoalt+enterin pi config to use Alt+Enter for follow-up queueing instead of Ctrl+Q.
- docs update
Pi adds an optional
powershelltool on Windows, running commands throughpwsh.exeor Windows PowerShell.└──▷ USE ITReplace the default bash tool with PowerShell so all model-issued commands run through pwsh.exe on a Windows host."defaultTools": ["read", "powershell", "edit", "write"]
Run both bash and PowerShell tools simultaneously to compare command behaviour across shells during testing."defaultTools": ["read", "bash", "powershell", "edit", "write"]
- ›Adds a
powershelltool that runs commands throughpwsh.exe(falling back to Windows PowerShell) with-NoProfile -NonInteractive -ExecutionPolicy Bypass; administrator-enforced execution policies still take precedence. - ›Supports configuring
defaultToolsto replace or supplement the defaultbashtool withpowershellon Windows — e.g."defaultTools": ["read", "powershell", "edit", "write"]to replace, or"defaultTools": ["read", "bash", "powershell", "edit", "write"]to run both side by side.
- ›Adds a
- docs update
Pi 0.84.3 adds a native PowerShell tool for Windows, safer atomic managed updates, and a
/thinkingselector with persistent model defaults.- ›Adds a
powershelltool for optional native PowerShell command execution on Windows, configurable through the SDK. - ›Adds
/thinkingselector with searchable default choices to the model and thinking selectors; Ctrl+S saves the selected model as the global default, persisting it session-wide. - ›Changes installer-managed updates to stage, verify, and atomically activate the selected release in place.
└──▷ BREAKING ON UPGRADE- !The inherited
GoogleThinkingLeveltype is renamed toGoogleApiThinkingLevel; any code referencingGoogleThinkingLevelby name will break.
- ›Adds a
- v0.84.3
Pi v0.84.3 adds a native PowerShell tool for Windows, a
/thinkingselector with Ctrl+S persistence, and atomic staged updates viapi update.└──▷ GET THIS VERSION$ git clone --branch v0.84.3 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.84.3
└──▷ TRY ITPass a dash-prefixed prompt directly on the CLI without it being misinterpreted as a flag.$ pi -- -analyze this codebase for hardcoded secrets
- ›Adds an optional
powershelltool for Windows, configurable throughdefaultToolsand the SDK, enabling native PowerShell command execution from the agent. - ›Adds a
/thinkingselector for choosing thinking levels interactively, with searchable default choices; Ctrl+S persists the selected model as the global default instead of only session-scoping it. - ›Changes
pi updateto stage, verify, and atomically activate the selected release for installer-managed installations, replacing the previous in-place swap. - ›Adds
session_compact_failedextension events that expose compaction failure reason, retry state, source, and error message to handlers. - ›Adds optional routing session IDs to compaction summary helpers so callers can preserve provider routing without enabling prompt cache writes.
+8 moreshow less
- ›Adds transcript usage notices for compaction and branch summaries when cache miss notices are enabled.
- ›Adds configurable OpenAI-compatible thinking-token budget fields for vLLM, Qwen/SGLang, and llama.cpp servers.
- ›Adds provider-neutral
toolChoicesupport to simple stream requests. - ›Adds automatic Anthropic server-side refusal fallback for supported first-party models, including returned-model usage pricing.
- ›Adds China-specific ZAI Coding Plan models including GLM-4.6V vision support and API-equivalent usage cost estimates.
- ›Adds
deepseek-v4-pro-0813support to the Qwen Token Plan Individual catalog. - ›Changes built-in xAI models to use the Responses API with encrypted reasoning replay and makes Grok 4.6 the default xAI model.
- ›Supports
--as an end-of-options delimiter so dash-prefixed prompts are not parsed as flags.
└──▷ BREAKING ON UPGRADE- !The
GoogleThinkingLeveltype is renamed toGoogleApiThinkingLevel; any code referencingGoogleThinkingLevelwill break on upgrade.
- ›Adds an optional
- v0.84.2
Pi v0.84.2 adds fullscreen transcript search, configurable default tools, a per-run theme flag, and new extension/gateway APIs.
└──▷ GET THIS VERSION$ git clone --branch v0.84.2 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.84.2
└──▷ TRY ITApply a specific TUI theme for a single run without overwriting your saved theme preference.$ pi --use-theme dracula
Enable experimental strict JSON-schema constrained sampling for built-in tools to tighten model output conformance.$ PI_EXPERIMENTAL=1 piSet the default tools available at startup for every project, then override for a specific project.{ "defaultTools": ["read", "bash", "edit"] }- ›Adds
--use-theme <name[/name]>flag to choose a per-run interactive theme without changing saved settings. - ›Adds
defaultToolssetting for configuring the initial built-in tool selection globally or per project. - ›Adds
expandPromptTemplatesoption to the extension pi.sendUserMessage() API for explicitly dispatching commands and expanding skills and prompt templates. - ›Adds createGatewayBindingFetch() for routing Cloudflare AI Gateway requests through a Workers AI binding without an API token.
- ›Adds
AssistantMessage.endTurnfield to preserve OpenAI Codex's terminalend_turnsignal for diagnostics.
+6 moreshow less
- ›Adds
PI_EXPERIMENTAL=1environment variable to enable experimental strict JSON-schema constrained sampling for the defaultread,bash,edit, andwritetools. - ›Adds
PI_TUI_ESC_TIMEOUTenvironment variable to tune Escape-input timeout for high-latency terminals (e.g. over SSH). - ›Adds fullscreen transcript search with Ctrl+Shift+F, incremental match highlighting, configurable search match theme colors, and next/previous navigation via Enter/Ctrl+G and Shift+Enter/Ctrl+Shift+G.
- ›Adds a fullscreen exit output setting to choose between printing the final transcript and printing only a session resume hint.
- ›Adds unbound single-line transcript scrolling actions for fullscreen mode.
- ›Documents the
AI_AGENT=piprocess marker and how it differs fromPI_CODING_AGENT=true.
- ›Adds
- v0.84.2
Pi v0.84.2 adds fullscreen transcript search, configurable default tools, a new
--use-themeflag, and Cloudflare AI Gateway binding support.└──▷ GET THIS VERSION$ git clone --branch v0.84.2 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.84.2
└──▷ TRY ITApply a one-off theme for a single session without overwriting your saved theme preference.$ pi --use-theme dracula
Enable strict JSON-schema constrained sampling for built-in tools to tighten model output validation during a run.$ PI_EXPERIMENTAL=1 piExpand prompt templates and skills when programmatically sending a message from a Pi extension.await pi.sendUserMessage('/refactor', { expandPromptTemplates: true });- ›Adds
--use-theme <name[/name]>CLI flag to select a per-run interactive theme without changing saved settings. - ›Adds
defaultToolssetting for configuring the initial built-in tool selection globally or per project. - ›Adds
expandPromptTemplatesoption to extension pi.sendUserMessage() for explicitly dispatching commands and expanding skills and prompt templates. - ›Adds createGatewayBindingFetch() for routing Cloudflare AI Gateway requests through a Workers AI binding without an API token.
- ›Adds
AssistantMessage.endTurnto preserve OpenAI Codex's terminalend_turnsignal for diagnostics.
+5 moreshow less
- ›Adds
PI_EXPERIMENTAL=1to enable experimental strict JSON-schema constrained sampling for the defaultread,bash,edit, andwritetools. - ›Adds
PI_TUI_ESC_TIMEOUTenvironment variable to tune Escape input timeout for high-latency terminals (e.g. over SSH). - ›Adds fullscreen transcript search triggered by Ctrl+Shift+F, with incremental match highlighting, configurable search match theme colors, and next/previous navigation via Enter/Ctrl+G and Shift+Enter/Ctrl+Shift+G.
- ›Adds a fullscreen exit output setting to choose between printing the final transcript and showing only a session resume hint.
- ›Adds unbound single-line transcript scrolling actions for fullscreen mode.
- ›Adds
- v0.84.1
Pi v0.84.1 adds
pi auth checkfor credential preflight, Qwen Token Plan Individual provider, and extensionterminatesupport for tool call batches.└──▷ GET THIS VERSION$ git clone --branch v0.84.1 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.84.1
└──▷ TRY ITRun a credential preflight check before kicking off a long agent session to confirm your provider keys are valid.$ pi auth check- ›Adds
pi auth checksubcommand to verify provider or model credentials before a run, with optional output of the resolved credential. - ›Adds Qwen Token Plan Individual as a built-in provider, using the shared international
QWEN_TOKEN_PLAN_API_KEYenvironment variable and its documented subscription model catalog. - ›Adds
terminatesupport to blocked extensiontool_callevent handlers, allowing all-terminating batches to skip the automatic follow-up model call. - ›Adds half-page transcript scrolling actions (unbound keybindings) for the TUI fullscreen viewport.
- ›Adds word/whitespace double-click selection, granularity-aware drag selection, and triple-click paragraph selection in fullscreen mode.
- ›Adds
- v0.84.1
Pi v0.84.1 adds
pi auth checkfor credential preflight, Qwen Token Plan Individual provider, andterminatesupport for blocked tool call events.└──▷ GET THIS VERSION$ git clone --branch v0.84.1 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.84.1
└──▷ TRY ITVerify that your configured provider credentials are valid before starting a long agent run.$ pi auth check- ›Adds
pi auth checksubcommand to verify provider or model credentials before a run, with optional output of the resolved credential. - ›Adds Qwen Token Plan Individual as a built-in provider, using the shared international
QWEN_TOKEN_PLAN_API_KEYenvironment variable and its documented subscription model catalog. - ›Adds
terminatesupport to blocked extensiontool_callevent handlers, allowing all-terminating batches to skip the automatic follow-up model call. - ›Adds double-click word selection, granularity-aware drag selection, and triple-click paragraph selection in fullscreen TUI mode.
- ›Adds unbound half-page transcript scrolling actions for fullscreen TUI mode, configurable via keybindings.
- ›Adds
- v0.84.0
Pi v0.84.0 adds fullscreen TUI, Mermaid/LaTeX rendering, per-directory context overrides, Baseten provider, and custom sampling params.
└──▷ GET THIS VERSION$ git clone --branch v0.84.0 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.84.0
└──▷ TRY ITLaunch Pi in fullscreen TUI mode for a distraction-free session with an independently scrollable transcript.$ pi --tui-mode fullscreen
Override context for a specific subdirectory without affecting parent-directory context files.$ # Place directory-specific instructions in AGENTS.override.md cat > src/api/AGENTS.override.md << 'EOF' # API module context Always validate inputs with Zod. Do not modify generated files. EOF- ›Adds
--tui-mode fullscreenCLI flag and/settingstoggle for fullscreen TUI mode with a sticky editor, independently scrollable transcript, and draggable scrollbar configurable viaauto,always, orhiddenmodes. - ›Adds
AGENTS.override.mdper-directory context file that replacesAGENTS.mdorCLAUDE.mdin the same directory while preserving context from parent directories. - ›Adds arbitrary OpenAI-compatible model sampling parameters via
samplingParamsinmodels.json, model overrides, extension providers, and stream options. - ›Adds opt-in vLLM
thinking_token_budgetsupport for OpenAI-compatible models, reserving output tokens for the final answer. - ›Adds built-in Baseten provider support authenticated via
BASETEN_API_KEYenvironment variable, withzai-org/GLM-5.2as the default model.
+10 moreshow less
- ›Adds
AI_AGENT=pito CLI and RPC child-process environments for generic agent attribution. - ›Adds support for OpenAI-compatible streams that omit
finish_reason, usingcompat.supportsFinishReasonto infer normal and tool-use stops. - ›Adds chainable pi.registerMarkdownTransformer() hooks for display-only transformation of user and assistant Markdown.
- ›Adds configurable Mermaid diagram rendering as themed Unicode in interactive transcripts, including optional rendering while streaming.
- ›Adds terminal-friendly Unicode rendering for LaTeX expressions in Markdown transcripts.
- ›Adds opt-in Ctrl+P/Ctrl+N prompt history navigation in the TUI editor.
- ›Adds experimental remote-session client APIs: the transport-neutral
PiClient, CBOR protocol, Unix-socket transport, and@earendil-works/pi-coding-agent/clientRemoteSessioncontroller with transcript reducers. - ›Adds vendor-neutral telemetry contracts with agent-owned typed AI-request and harness schemas, composed span starters, and callback helpers.
- ›Adds structured Amazon Bedrock failure diagnostics including HTTP status, modeled error code, and AWS request ID.
- ›Adds
CredentialSynchronizationErrorfor credential changes that commit successfully but fail to synchronize local model state.
└──▷ BREAKING ON UPGRADE- !The
ModelsStreamTransformsinterface is renamed toModelsRequestTransforms; extensions referencing the old name will break. - !JSON and RPC
message_updateevents now emit onlyassistantMessageEventdeltas; the cumulativemessageandassistantMessageEvent.partialfields are removed. Clients must assemble deltas betweenmessage_startandmessage_end. - !ModelRegistry.getApiKeyAndHeaders() now returns
ProviderHeaderswithstring | nullvalues; extensions that inspect returned headers must handlenull. - !ModelRegistry.refresh() now accepts
ModelsRefreshOptionsand returnsModelsRefreshResultinstead of discarding cancellation and provider errors. - !ModelRuntime.setRuntimeApiKey() now accepts auth cancellation options instead of catalog refresh options; call refresh({ providers: [providerId], signal }) separately when remote freshness is required.
- !Config-form extension OAuth refreshToken(credentials, signal) callbacks are now required to accept and honor a concrete abort signal.
- !Dynamic provider refresh context store access is replaced with the read-only
context.storedsnapshot and generation-checked context.publish() transaction; handwritten Provider.refreshModels() implementations must be migrated. - !The legacy JSONL and in-memory repository APIs are removed; use pi-agent-core's v4
JsonlSessionRepoorInMemorySessionRepoimplementing the newSessionRepocontract. - !Custom harness file-system implementations must now provide FileSystem.renameFile() with same-filesystem replacement semantics.
- !
RemoteSession.sessionsno longer exposes runtime phase, model, thinking, attachment, or lock state; this information is now only available from acquiredSessionSnapshotvalues. - !The v2 session and
AgentHarnessAPI experimental subpaths are removed; use pi-agent-core's default export instead. - !The Session,
SessionStorage, andSessionRepoAPIs are replaced with v4 lane-based versions including durable operation records, global facts, shared sequence numbers, and tree-scoped lane views.
- ›Adds
- v0.84.0
Pi v0.84.0 adds fullscreen TUI, Mermaid/LaTeX rendering, per-directory context overrides, custom sampling params, and a Baseten provider.
└──▷ GET THIS VERSION$ git clone --branch v0.84.0 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.84.0
└──▷ TRY ITLaunch the agent in fullscreen TUI mode for a distraction-free session with an independently scrollable transcript.$ pi --tui-mode fullscreen
Configure custom sampling parameters and a vLLM thinking token budget for a self-hosted OpenAI-compatible model.{ "samplingParams": { "temperature": 0.2, "top_p": 0.9 }, "thinking_token_budget": 2048 }- ›Adds
--tui-mode fullscreenCLI flag and/settingstoggle to switch between regular and fullscreen TUI modes at runtime, with a sticky editor/footer dock and independently scrollable transcript. - ›Adds configurable transcript scrollbar in fullscreen mode with
auto,always, andhiddenmodes via/settings;alwaysreserves the rightmost column. - ›Adds per-directory
AGENTS.override.mdcontext files that replaceAGENTS.mdorCLAUDE.mdin the same directory while preserving context from other directories. - ›Adds arbitrary OpenAI-compatible sampling parameters through
samplingParamsinmodels.json, model overrides, extension providers, and stream options. - ›Adds opt-in vLLM
thinking_token_budgetsupport for OpenAI-compatible models, reserving output tokens for the final answer.
+14 moreshow less
- ›Adds built-in Baseten provider with
BASETEN_API_KEYauthentication andzai-org/GLM-5.2as the default model. - ›Adds
AI_AGENT=pito CLI and RPC child-process environments for generic agent attribution. - ›Adds
compat.supportsFinishReasonsetting for OpenAI-compatible streams that omitfinish_reason, inferring normal and tool-use stops when the stream ends. - ›Adds optional
scrollbarThumbtheme color for fullscreen scrollbar thumbs, falling back toselectedBg. - ›Adds opt-in Ctrl+P/Ctrl+N prompt history navigation with explicit history bindings that take precedence over application shortcuts while the editor is focused.
- ›Adds chainable pi.registerMarkdownTransformer() extension hooks for display-only transformation of user and assistant Markdown.
- ›Adds experimental remote-session client APIs: transport-neutral
PiClient, CBOR protocol, Unix-socket transport, and@earendil-works/pi-coding-agent/clientRemoteSessioncontroller with transcript reducers. - ›Adds configurable themed Unicode rendering for Mermaid diagrams in interactive messages, including optional rendering while streaming.
- ›Adds terminal-friendly Unicode rendering for LaTeX expressions in Markdown.
- ›Adds structured Amazon Bedrock failure diagnostics including HTTP status, modeled error code, and AWS request ID.
- ›Adds vendor-neutral telemetry contracts with agent-owned typed AI-request and harness schemas, composed span starters, and callback helpers.
- ›Adds
CredentialSynchronizationErrorfor credential changes that commit successfully but fail to synchronize local model state. - ›Adds page scrolling and marked-message navigation shortcuts to fullscreen mode.
- ›Adds stacked transient notifications in fullscreen mode.
└──▷ BREAKING ON UPGRADE- !The
ModelsStreamTransformsinterface is renamed toModelsRequestTransforms; extensions referencingModelsStreamTransformsmust update toModelsRequestTransforms. - !JSON and RPC
message_updateevents now emit onlyassistantMessageEventdeltas; the cumulativemessageandassistantMessageEvent.partialfields are removed. Clients must assemble deltas betweenmessage_startandmessage_end. - !ModelRegistry.getApiKeyAndHeaders() now returns
ProviderHeaderswithstring | nullvalues; extensions that inspect returned headers must handlenull, and those forwarding headers to pi-ai streams should passnullthrough unchanged. - !ModelRegistry.refresh() now accepts
ModelsRefreshOptionsand returnsModelsRefreshResultinstead of discarding cancellation and provider errors. - !ModelRuntime.setRuntimeApiKey() now accepts auth cancellation options instead of catalog refresh options; call refresh({ providers: [providerId], signal }) separately when remote freshness is required.
- !Config-form extension OAuth refreshToken(credentials, signal) callbacks must now accept and honor a concrete abort signal.
- !Dynamic provider refresh context store access is replaced with the read-only
context.storedsnapshot and generation-checked context.publish() transaction. Handwritten Provider.refreshModels() implementations must migrate from context.store.read()/context.store.write() tocontext.storedand context.publish({ persist: ... }). - !The pi-agent-core harness session model is replaced with the v4 lane-based Session,
SessionStorage, andSessionRepoAPIs; legacy JSONL and in-memory repository APIs are removed. UseJsonlSessionRepoorInMemorySessionRepoimplementing the newSessionRepocontract. - !The v2 session and
AgentHarnessAPI experimental subpaths are removed; they are now promoted to pi-agent-core's default export. - !Custom harness file-system implementations must now provide FileSystem.renameFile() with same-filesystem replacement semantics.
- !
RemoteSession.sessionsno longer exposes runtime phase, model, thinking, attachment, or lock state (previously available as list summaries); that data is now available only from acquiredSessionSnapshotvalues via the durableSessionMetadataAPI.
- ›Adds
- v0.83.0
Pi v0.83.0 adds credential export commands, headless OpenRouter sign-in, and Claude Opus 5 on GitHub Copilot.
└──▷ GET THIS VERSION$ git clone --branch v0.83.0 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.83.0
└──▷ TRY ITPipe a short-lived bearer token into an external HTTP client without manually managing OAuth refresh.$ pi auth print-bearer-token | xargs -I{} curl -H 'Authorization: Bearer {}' https://api.example.com/endpoint
- ›Adds
pi auth print-api-keyandpi auth print-bearer-tokencommands to export configured credentials to external clients, with automatic OAuth refresh and minimum-validity enforcement. - ›Adds support for manual redirect URL and authorization-code entry during
pi authlogin on OpenRouter, enabling headless and SSH-remote sign-in when the loopback callback is unavailable. - ›Adds the
'pending'stop reason for partial streaming messages in the custom provider stream pattern. - ›Adds per-request
fetchinjection for supported text and image provider transports. - ›Adds Claude Opus 5 support via GitHub Copilot with adaptive thinking and a 1M context window.
└──▷ BREAKING ON UPGRADE- !TypeBox aliases upgraded to 1.3.7, removing
Type.Base,Type.Awaited,Type.Promise,Type.AsyncIterator,Type.Iterator,Type.Options, andValue.Mutate; extensions using these APIs must migrate to supported TypeBox APIs.
- ›Adds
- v0.83.0
Pi v0.83.0 adds credential export commands, headless OpenRouter login, and Claude Opus 5 on GitHub Copilot.
└──▷ GET THIS VERSION$ git clone --branch v0.83.0 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.83.0
└──▷ TRY ITPipe a live-refreshed API key into another tool without manually copying credentials from your config.$ pi auth print-api-key- ›Adds
pi auth print-api-keyandpi auth print-bearer-tokencommands to export configured credentials to external clients, with automatic OAuth refresh and minimum-validity enforcement. - ›Adds manual redirect URL and authorization-code entry to OpenRouter login via
/loginfor remote and headless (SSH) environments where the loopback callback is unavailable. - ›Adds Claude Opus 5 support through GitHub Copilot with adaptive thinking and a 1M context window.
- ›Adds inherited per-request
fetchinjection for supported text and image provider transports. - ›Adds the
"pending"stop reason for partial streaming messages in the custom provider stream pattern.
└──▷ BREAKING ON UPGRADE- !TypeBox aliases upgraded to 1.3.7 removes deprecated APIs
Type.Base,Type.Awaited,Type.Promise,Type.AsyncIterator,Type.Iterator,Type.Options, andValue.Mutate— extensions using any of these must migrate to supported TypeBox APIs.
- ›Adds
- v0.82.1
Pi v0.82.1 adds Claude Opus 5 on Anthropic and Bedrock, bearer auth via
ANTHROPIC_AUTH_TOKEN, and faster model catalog refreshes.└──▷ GET THIS VERSION$ git clone --branch v0.82.1 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.82.1
└──▷ TRY ITAuthenticate against an Anthropic-compatible gateway that requires bearer auth, without modifying your settings file.$ ANTHROPIC_AUTH_TOKEN=my-gateway-token pi- ›Adds
ANTHROPIC_AUTH_TOKENenvironment variable for bearer auth (Authorization: Bearer) against Anthropic-compatible gateways, covering compaction and branch summaries. - ›Exposes the
outputPadsetting to custom message renderers in extensions. - ›Adds Claude Opus 5 support on Anthropic and Amazon Bedrock with adaptive thinking (including
xhighlevel), inference profiles, and prompt caching. - ›pi.dev model catalogs now revalidate using If-None-Match, so unchanged providers return a
304instead of a full download.
- ›Adds
- v0.82.1
Pi v0.82.1 adds Claude Opus 5 on Anthropic and Bedrock,
ANTHROPIC_AUTH_TOKENbearer auth for compatible gateways, and faster model catalog revalidation.└──▷ GET THIS VERSION$ git clone --branch v0.82.1 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.82.1
└──▷ TRY ITAuthenticate against an Anthropic-compatible gateway (e.g. a corporate proxy) that requires bearer token auth, so compaction and branch summaries also route through it.$ export ANTHROPIC_AUTH_TOKEN=your-token-here pi- ›Adds
ANTHROPIC_AUTH_TOKENenvironment variable to authenticate against Anthropic-compatible gateways usingAuthorization: Bearer, including compaction and branch summaries. - ›Adds Claude Opus 5 support on Anthropic and Amazon Bedrock with adaptive thinking (including
xhighlevel), inference profiles, and prompt caching. - ›Exposes the
outputPadsetting to custom message renderers in extensions. - ›Pi.dev model catalogs now revalidate using If-None-Match, so unchanged provider catalogs return an empty
304response instead of a full download. - ›llama.cpp models now persist across restarts, staying listed in the catalog before the first successful refresh.
- ›Adds
- v0.82.0
Pi v0.82.0 adds constrained tool sampling, OAuth login for OpenRouter and Kimi Code, and session-aware streaming bash integrations.
└──▷ GET THIS VERSION$ git clone --branch v0.82.0 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.82.0
└──▷ TRY ITInspect session context inside a bash tool script — useful for logging or branching logic based on which model and provider Pi is using.$ echo "Session: $PI_SESSION_ID | Provider: $PI_PROVIDER | Model: $PI_MODEL | Reasoning: $PI_REASONING_LEVEL"Authorize Pi to use OpenRouter without touching API key config files — useful for shared or ephemeral environments.$ /login- ›Adds
Tool.constrainedSamplingwithprefer/requiremodes for strict JSON Schema sampling and OpenAI Lark/regex grammar variants, gated bysupportsStrictToolsandsupportsGrammarToolscapability flags, across OpenAI, Anthropic, Amazon Bedrock, Google Gemini, and Mistral. - ›Exposes
PI_SESSION_ID,PI_SESSION_FILE,PI_PROVIDER,PI_MODEL, andPI_REASONING_LEVELas environment variables to commands run by built-in and factory-created bash tools. - ›Adds streaming
bash_execution_updateRPC events for direct RPC bash commands, correlated with request IDs. - ›Adds OpenRouter OAuth PKCE login via
/login, minting a user-controlled API key without manual configuration. - ›Adds Kimi Code subscription OAuth login for the Kimi For Coding provider via
/login, including device authorization and automatic token refresh.
- ›Adds
- v0.82.0
Pi v0.82.0 adds constrained tool sampling, OAuth login for OpenRouter and Kimi Code, and session-aware streaming bash integrations.
└──▷ GET THIS VERSION$ git clone --branch v0.82.0 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.82.0
└──▷ TRY ITRead session and model context inside a bash tool script to tag output or conditionally branch on the active provider.$ #!/usr/bin/env bash echo "Session: $PI_SESSION_ID" echo "Provider: $PI_PROVIDER Model: $PI_MODEL Reasoning: $PI_REASONING_LEVEL" echo "Session file: $PI_SESSION_FILE"- ›Exposes
PI_SESSION_ID,PI_SESSION_FILE,PI_PROVIDER,PI_MODEL, andPI_REASONING_LEVELenvironment variables to commands run by built-in and factory-created bash tools, enabling scripts to introspect the active session and model. - ›Adds streaming
bash_execution_updateRPC events for direct RPC bash commands, correlated with request IDs, so callers can consume incremental output as it arrives. - ›Adds
Tool.constrainedSamplingwithprefer/requirestrict JSON Schema modes and OpenAI Lark/regex grammar variants, supported across OpenAI, Anthropic, Amazon Bedrock, Google Gemini, and Mistral. - ›Adds
supportsGrammarToolsandsupportsStrictToolsmodel capability flags to gate constrained sampling and prevent unsupported requests. - ›Adds OAuth PKCE login for OpenRouter via
/login, minting a user-controlled API key without manual key configuration.
+1 moreshow less
- ›Adds Kimi Code subscription OAuth login for the Kimi For Coding provider via
/login, including device authorization and automatic token refresh.
- ›Exposes
- v0.81.1
Pi v0.81.1 adds verifiable release source archives and exposes retry lifecycle events for compaction across all consumer types.
└──▷ GET THIS VERSION$ git clone --branch v0.81.1 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.81.1
- ›Exposes retry lifecycle events —
summarization_retry_scheduled,summarization_retry_attempt_start, andsummarization_retry_finished— to interactive, JSON, RPC, and SDK consumers when compaction or branch summarization retries transient provider failures. - ›Adds deterministic, checksummed source archives to GitHub releases with documented instructions for rebuilding standalone binaries.
- ›Exposes retry lifecycle events —
- v0.81.1
Pi v0.81.1 adds checksummed source archives for reproducible binary builds and retry lifecycle events for compaction and branch summarization.
└──▷ GET THIS VERSION$ git clone --branch v0.81.1 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.81.1
└──▷ TRY ITReproduce the official Pi binary from a release source archive to verify supply-chain integrity before deploying in a sensitive environment.$ VERSION="0.81.1" tar -xzf "pi-${VERSION}-source.tar.gz" cd "pi-${VERSION}" ./scripts/build-binaries.sh --offline-model-data --platform linux-x64 --out "$PWD/out"
- ›Adds
./scripts/build-binaries.shwith--offline-model-data,--platform,--out,--skip-install, and--skip-depsflags for rebuilding standalone binaries from release source archives. - ›GitHub releases now include versioned source archives (
pi-<release-version>-source.tar.gz) covered by aSHA256SUMSfile, enabling deterministic, checksummed reproduction of official binaries. - ›Exposes retry lifecycle events (
summarization_retry_scheduled,summarization_retry_attempt_start,summarization_retry_finished) for compaction and branch summarization to interactive, JSON, RPC, and SDK consumers.
- ›Adds
- v0.81.0
Pi v0.81.0 adds local llama.cpp model management, full provider extensions, Qwen Token Plan support, and expanded usage accounting.
└──▷ GET THIS VERSION$ git clone --branch v0.81.0 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.81.0
└──▷ TRY ITConnect to a local llama.cpp router, search for a model on Hugging Face, and load it — all without leaving the Pi session.$ /login /llama search llama-3 /llama load <model-id>Query available thinking levels for the active model via RPC to dynamically adjust reasoning depth in automated workflows.const levels = await rpcClient.getAvailableThinkingLevels();
- ›Adds
/logincommand for llama.cpp router connection setup and/llamasubcommand for Hugging Face model search, download, explicit load, unload, and live progress tracking. - ›Adds
get_available_thinking_levelsRPC command and RpcClient.getAvailableThinkingLevels() method for querying model thinking-level options. - ›Adds full provider extension registration, allowing extensions to supply complete pi-ai providers with native authentication, model refresh, filtering, and custom streaming behavior.
- ›Adds Qwen Token Plan and Qwen Token Plan China as built-in providers with regional endpoints and API-key authentication.
- ›Exports message and tool execution lifecycle event types from the package root for downstream consumers.
+1 moreshow less
- ›Expands usage accounting to persist and include tool, compaction, and branch-summary usage in session totals, footer totals, and session statistics.
- ›Adds
- v0.81.0
Pi v0.81.0 adds local llama.cpp model management, full provider extensions, Qwen Token Plan providers, and expanded usage accounting.
└──▷ GET THIS VERSION$ git clone --branch v0.81.0 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.81.0
└──▷ TRY ITSearch for and download a Hugging Face model via the built-in llama.cpp router after connecting to it.$ /login /llama <model-search-query>Query which thinking levels are available for the current model via the RPC client in an extension or script.const levels = await rpcClient.getAvailableThinkingLevels();
- ›Adds built-in llama.cpp router support with
/loginfor connection setup and/llamafor Hugging Face model search, download, explicit load/unload, and live progress. - ›Adds
get_available_thinking_levelsRPC command and RpcClient.getAvailableThinkingLevels() method for querying supported thinking levels at runtime. - ›Adds extension registration for complete pi-ai providers, including native authentication, model refresh, filtering, and custom streaming behavior.
- ›Adds Qwen Token Plan and Qwen Token Plan China as built-in providers with regional endpoints and API-key authentication.
- ›Exports message and tool execution lifecycle event types from the package root.
+1 moreshow less
- ›Persists and includes tool, compaction, and branch-summary usage in session totals, footer, and session statistics.
- ›Adds built-in llama.cpp router support with
- v0.80.10
Pi v0.80.10 adds Kimi Coding adaptive thinking support with
maxlevel and empty-signature thinking block replay for K3.└──▷ GET THIS VERSION$ git clone --branch v0.80.10 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.80.10
- ›Kimi Coding models now use adaptive thinking correctly; K3 exposes its supported
maxthinking level and supports replaying empty-signature thinking blocks.
- ›Kimi Coding models now use adaptive thinking correctly; K3 exposes its supported
- v0.80.9
Pi v0.80.9 adds Kimi K3 support across built-in providers with deferred tool loading via Kimi's native protocol.
└──▷ GET THIS VERSION$ git clone --branch v0.80.9 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.80.9
- ›Adds
kimi-deferred-tools.tsexample demonstrating extension-driven deferred tool activation through Kimi's native protocol for progressive tool loading. - ›Adds Kimi K3 model support across Kimi Coding, Moonshot AI, Moonshot AI China, OpenRouter, and Vercel AI Gateway providers.
- ›Changes default xAI model to Grok 4.5 with a prefilled device-authorization link labeled 'Sign in with SuperGrok or X Premium'.
└──▷ BREAKING ON UPGRADE- !Grok 3, Grok 3 Fast, Grok 4.20 variants, and Grok Code Fast 1 are removed from the built-in xAI model catalog — any configuration referencing these models will break on upgrade.
- ›Adds
- v0.80.8
Pi v0.80.8 adds unified model auth via ModelRuntime,
pi update --models, and xAI Grok 4.5 with device-code OAuth.└──▷ GET THIS VERSION$ git clone --branch v0.80.8 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.80.8
└──▷ TRY ITForce a fresh pull of the model catalog across all configured providers without upgrading pi itself.$ pi update --models
- ›Adds
pi update --modelsCLI flag to force an immediate model catalog refresh without updating pi or extensions. - ›Adds
ModelRuntimeas the canonical async SDK facade; ModelRuntime.create() accepts any pi-aiCredentialStorevia itscredentialsoption, and ModelRuntime.getAuth() handles provider-scoped and model-scoped request auth assembly. - ›Adds
/logindiscovery directly from registered pi-ai providers, exposing ambient auth status and informational links per provider. - ›Adds file-backed dynamic model catalogs stored in
models-store.json, with per-provider pi.dev catalog overlays and Radius gateway support. - ›Adds refreshModels(context) hook for extensions to perform dynamic model discovery with optional provider-controlled persistence.
+2 moreshow less
- ›Adds xAI device-code OAuth login and Grok 4.5 OpenAI Responses support, with
low,medium, andhighthinking levels. - ›Updates
/modelto render the current model snapshot immediately and refresh configured providers in the background, surfacing partial results or timeout errors in the open selector.
└──▷ BREAKING ON UPGRADE- !
CreateAgentSessionOptions.authStorageandmodelRegistryoptions are replaced by the asyncmodelRuntimeoption;AuthStorageand its storage backends are no longer exported — useModelRuntime, a custom pi-aiCredentialStore, or readStoredCredential() for one-off reads ofauth.json. - !ModelRuntime.getAll(), find(), getSnapshot(), and getAuthOptions() are removed; use the pi-ai Models methods getModels(), getModel(), getProviders(), and checkAuth() directly.
- !Request-auth assembly via ModelRegistry.getApiKeyAndHeaders() is replaced by ModelRuntime.getAuth(); passing a provider ID returns provider-scoped auth, passing a model also resolves built-in,
models.json, and extension model headers. - !ModelRegistry.refresh() changed from synchronous
voidtoPromise<void>; extensions mustawaitit before making synchronous registry reads.
- ›Adds
- v0.80.7
Pi v0.80.7 adds cache-friendly dynamic tool loading, Fable 5 xhigh/max thinking, Ctrl+X message copy, and toolChoice for OpenAI/Codex Responses.
└──▷ GET THIS VERSION$ git clone --branch v0.80.7 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.80.7
└──▷ TRY ITCopy a branched or older assistant message to clipboard without leaving the transcript tree.$ # In the Pi TUI, navigate to /tree, select the desired message, then press Ctrl+X- ›Adds cache-friendly dynamic tool loading: extensions can inject tools during execution while Anthropic and OpenAI Responses models preserve prompt-cache prefixes.
- ›Adds Ctrl+X shortcut to copy the last assistant message or the selected message in
/tree, enabling direct copying of branched and historical messages. - ›Adds native
xhighandmaxthinking levels for Claude Fable 5 across all generated provider catalogs. - ›Adds
toolChoicesupport (including required and named tool selection) for OpenAI and Codex Responses providers.
└──▷ BREAKING ON UPGRADE- !The
compat.sendSessionIdHeaderflag has been removed frommodels.jsonforopenai-responses. ReplacesendSessionIdHeader: falsewithsessionAffinityFormat: "openai-nosession"(other values:"openai","openrouter").
- v0.80.6
Pi v0.80.6 adds a
maxthinking level abovexhighand input-based pricing tiers for accurate long-context cost accounting.└──▷ GET THIS VERSION$ git clone --branch v0.80.6 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.80.6
└──▷ TRY ITRun the agent at maximum reasoning depth on a complex codebase task where thoroughness matters more than speed.$ pi --thinking max 'Audit all authentication flows in src/ for privilege escalation paths'
- ›Adds
maxthinking level (abovexhigh) for GPT-5.6 and adaptive Claude models, available via--thinking maxin the CLI, SDK, RPC, and model selection; custom themes can definethinkingMax. - ›Adds request-wide input-token pricing tiers for accurate long-context cost accounting (e.g. GPT-5.4/5.5/5.6 rates), configurable for custom models via
models.jsonandmodelOverrides. - ›Supports
~(home directory) expansion for theshellPathsetting.
- ›Adds
- v0.80.3
Pi v0.80.3 adds Claude Sonnet 5, Azure Foundry endpoints, RPC session inspection, and new UI/editor settings.
└──▷ GET THIS VERSION$ git clone --branch v0.80.3 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.80.3
└──▷ USE ITOverride the Ctrl+G editor to use VS Code instead of the system$VISUAL/$EDITORwhen composing long prompts.{ "externalEditor": "code --wait" }Reduce visual clutter or increase readability by tightening horizontal padding on all message types.{ "outputPad": 2 }- ›Adds Claude Sonnet 5 support via Anthropic-compatible and Bedrock provider catalogs with adaptive thinking enabled.
- ›Adds
get_entriesandget_treeRPC commands for inspecting session entries and tree snapshots over RPC. - ›Adds a
./rpc-entrypackage export for launching Pi directly in RPC mode. - ›Adds
session_info_changedextension event so extensions can observe session name changes. - ›Adds Azure OpenAI Responses provider support for modern Microsoft Foundry endpoint URLs.
+4 moreshow less
- ›Adds
Usage.reasoningtoken counts for providers that report reasoning/thinking token usage. - ›Adds
externalEditorsetting to configure the editor invoked by Ctrl+G before$VISUAL/$EDITORfallbacks. - ›Adds
outputPadsetting to control horizontal padding for user messages, assistant messages, and thinking blocks. - ›Changes the default OpenAI model to
gpt-5.5.
- v0.80.0
Pi v0.80.0 adds Ctrl+J as a newline shortcut and restructures the pi-ai extension API around a new provider-factory model.
└──▷ GET THIS VERSION$ git clone --branch v0.80.0 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.80.0
- ›Adds Ctrl+J as a default newline keybinding alongside Shift+Enter.
- ›Renames the
zaiprovider label to 'ZAI Coding Plan (Global)' for clarity in the provider list.
└──▷ BREAKING ON UPGRADE- !The
@earendil-works/pi-ai/baseand@earendil-works/pi-agent-core/baseentrypoints have been removed; use the root packages with explicit Models provider factories instead. - !The pi-ai global API (
stream/complete/completeSimple,getModel/getModels/getProviders,registerApiProvider,getEnvApiKey, …) has moved off the@earendil-works/pi-airoot entrypoint to@earendil-works/pi-ai/compat; extension sources that typecheck against pi-ai's published types must switch those imports to@earendil-works/pi-ai/compator migrate to the new createModels()/provider-factoryAPI (the compat entrypoint and loader alias will be removed in a future release).
- v0.79.10
Pi v0.79.10 adds compaction event context for extensions and a more predictable
pi updateflow.└──▷ GET THIS VERSION$ git clone --branch v0.79.10 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.79.10
└──▷ USE ITReact differently in an extension based on whether compaction was triggered manually or by an overflow retry.// In your extension handler: on('session_before_compact', ({ reason, willRetry }) => { if (reason === 'overflow' && willRetry) { console.log('Overflow compaction — another attempt will follow'); } else if (reason === 'manual') { console.log('User triggered /compact manually'); } });Upgrade Pi to the exact version the update check resolves, with the changelog URL shown in the notice.$ pi update- ›Adds
reasonandwillRetryfields tosession_before_compactandsession_compactextension events, letting extensions distinguish manual/compact, threshold auto-compaction, and overflow retry flows. - ›Enhances
pi updateto install the exact checked Pi version and display the changelog URL in update notices for more predictable upgrades.
- ›Adds
- v0.79.9
Pi v0.79.9 adds chat-template thinking support for vLLM/Hugging Face models like DeepSeek via OpenAI-compatible providers.
└──▷ GET THIS VERSION$ git clone --branch v0.79.9 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.79.9
- ›Supports
chat_template_kwargs-basedthinking controls for OpenAI-compatible custom providers, enabling vLLM/Hugging Face chat-template models (e.g. DeepSeek) to use provider-native thinking levels.
- ›Supports
- v0.79.8
Pi v0.79.8 adds Mistral prompt caching, OpenRouter Fusion alias, post-compaction token estimates, and selective provider bundling.
└──▷ GET THIS VERSION$ git clone --branch v0.79.8 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.79.8
- ›Supports Mistral provider-side prompt caching using the Pi session ID as
prompt_cache_key, with cached-token usage and cost accounting. - ›Adds
openrouter/fusionas a built-in OpenRouter model alias. - ›Adds estimated post-compaction token counts to compact results and compaction events so clients can display approximate context reduction.
- ›Adds
@earendil-works/pi-ai/baseand@earendil-works/pi-agent-core/baseentry points enabling SDK users to register only the provider transports they need, reducing bundle size.
- ›Supports Mistral provider-side prompt caching using the Pi session ID as
- v0.79.7
Pi v0.79.7 adds automatic light/dark theme switching, Warp inline images, and new extension API helpers.
└──▷ GET THIS VERSION$ git clone --branch v0.79.7 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.79.7
└──▷ TRY ITUpdate pi and all extensions together in one step, equivalent to the old barepi updatebehavior.$ pi update --all
- ›Adds automatic theme mode in
/settings— choose separate light and dark themes that follow terminal color-scheme changes in real time. - ›Adds
pi update --allflag; barepi updatenow updates pi only, separating pi updates from extension updates. - ›Adds inline image rendering for Warp terminal users via Kitty graphics detection.
- ›Exports edit diff helpers (
generateDiffString,generateUnifiedPatch,EditDiffResult) from the public API for extensions that need edit-style diffs.
└──▷ BREAKING ON UPGRADE- !Bare
pi updatenow updates pi only; previously it updated pi and extensions together. Scripts or workflows expectingpi updateto also update extensions must switch topi update --all. - !
/is now reserved in theme names for automatic light/dark theme settings; any existing theme name containing/may conflict with the new automatic mode.
- ›Adds automatic theme mode in
- v0.79.5
Pi v0.79.5 adds provider-scoped API key env overrides, a global HTTP proxy setting, and Vercel AI Gateway attribution headers.
└──▷ GET THIS VERSION$ git clone --branch v0.79.5 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.79.5
└──▷ USE ITRoute all Pi AI provider traffic through a corporate proxy without setting shell environment variables.# In Pi global settings (e.g. ~/.config/pi/settings.json) { "httpProxy": "http://proxy.corp.example.com:8080" }Scope Bedrock credentials and a custom endpoint to Pi only, keeping your shell environment clean.# In auth.json { "apiKeys": [ { "provider": "amazon-bedrock", "env": { "AWS_ACCESS_KEY_ID": "AKIA...", "AWS_SECRET_ACCESS_KEY": "secret", "AWS_REGION": "us-east-1" } } ] }- ›Adds provider-scoped
envoverrides inauth.jsonAPI key entries for Cloudflare, Azure OpenAI, Google Vertex, Amazon Bedrock, cache retention, and proxy settings — scoped to Pi without touching the project shell. - ›Adds a global
httpProxysetting that propagatesHTTP_PROXYandHTTPS_PROXYto all Pi-managed HTTP clients. - ›Adds
http-refererandx-titleattribution headers to Vercel AI Gateway requests by default. - ›Adds an
xpfooter marker in the UI when experimental features are enabled.
- ›Adds provider-scoped
- v0.79.4
Pi v0.79.4 adds automatic dark/light theme detection on first run and SHA256 checksums for standalone binary verification.
└──▷ GET THIS VERSION$ git clone --branch v0.79.4 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.79.4
- ›Adds automatic first-run theme selection: pi detects the terminal background and defaults to the
darkorlighttheme. - ›Adds
SHA256SUMSintegrity files to GitHub release assets for verifying standalone binary downloads.
- ›Adds automatic first-run theme selection: pi detects the terminal background and defaults to the
- v0.79.2
Pi v0.79.2 adds an experimental first-time setup flow with theme selection and opt-in analytics behind
PI_EXPERIMENTAL=1.└──▷ GET THIS VERSION$ git clone --branch v0.79.2 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.79.2
└──▷ TRY ITTrigger the first-time setup flow to configure theme and analytics on a fresh install or new agent directory.$ PI_EXPERIMENTAL=1 pi- ›Adds experimental first-time setup flow (enabled via
PI_EXPERIMENTAL=1) that prompts for dark/light theme choice and opt-in analytics, storing atrackingIdinsettings.json.
- ›Adds experimental first-time setup flow (enabled via
- v0.79.1
Pi v0.79.1 adds Claude Fable 5 support, prompt template defaults, configurable project trust, and extension autocomplete triggers.
└──▷ GET THIS VERSION$ git clone --branch v0.79.1 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.79.1
└──▷ TRY ITUse a prompt template with an optional positional argument that falls back to a default when not supplied.$ pi run my-template.md 'custom-value' # passes arg 1; omit it to get the ${1:-7} default- ›Adds Claude Fable 5 model support on Anthropic and Amazon Bedrock providers, including adaptive thinking and
xhigheffort. - ›Supports default positional arguments in prompt templates, e.g.
${1:-7}for optional values. - ›New global
defaultProjectTrustsetting controls whether unresolved project trust asks, always trusts, or never trusts by default. - ›Extensions can now inspect effective trust decisions via ctx.isProjectTrusted(), including temporary trust.
- ›Extension autocomplete providers can declare trigger characters (e.g.
#or$) to surface suggestions without slash-command prefixes.
+1 moreshow less
- ›Adds
areExperimentalFeaturesEnabledfeature guard for users to opt in to early features.
- ›Adds Claude Fable 5 model support on Anthropic and Amazon Bedrock providers, including adaptive thinking and
- v0.79.0
Pi v0.79.0 adds project trust gating with
--approvecontrols, extension-driven trust decisions, and cache-hit visibility in the footer.└──▷ GET THIS VERSION$ git clone --branch v0.79.0 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.79.0
└──▷ TRY ITRun Pi in CI or a script without interactive trust prompts, auto-approving all project-local resources.$ pi --approve
Run Pi in an environment where you want to block all project-local resources without any prompt.$ pi --no-approve
- ›Adds project trust gating: Pi now prompts before loading project-local settings, resources, instructions, and packages, with
--approve/--no-approveflags for non-interactive automation. - ›Adds
project_trustextension event so global and CLI extensions can decide, remember, or defer trust decisions before project-local resources load. - ›Adds prompt cache hit rate (
CH) display to the interactive footer for real-time cache visibility. - ›Exports RPC extension UI request/response types and coding-agent package asset path helpers from the public SDK API.
- ›Adds project trust gating: Pi now prompts before loading project-local settings, resources, instructions, and packages, with
- v0.78.1
Pi v0.78.1 adds Ant Ling, NVIDIA NIM, and MiniMax-M3 provider support plus richer extension context APIs.
└──▷ GET THIS VERSION$ git clone --branch v0.78.1 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.78.1
└──▷ USE ITAdapt an extension's behavior based on whether Pi is running in TUI, RPC, JSON, or print mode — for example, suppressing interactive prompts in JSON mode.// Inside an extension command handler if (ctx.mode === 'json') { // emit structured output only } else { // render rich TUI output }Inspect the current base system prompt inputs from within an extension command to tailor or augment the prompt context.// Inside an extension command handler const promptOptions = ctx.getSystemPromptOptions(); console.log(promptOptions);
- ›Adds Ant Ling provider selection and setup support.
- ›Adds NVIDIA NIM provider selection, setup, and direct NIM request attribution headers.
- ›Adds MiniMax-M3 model support for the
minimaxandminimax-cndirect providers. - ›Adds
ctx.modeto extension contexts so extensions can distinguish TUI, RPC, JSON, and print modes. - ›Adds ctx.getSystemPromptOptions() for extension commands to inspect current base system prompt inputs.
+1 moreshow less
- ›Adds containerization documentation and a Gondolin extension example for routing built-in tools into a local micro-VM.
- v0.78.0
Pi v0.78.0 adds named sessions, clickable file paths, custom Bedrock headers, and new extension APIs.
└──▷ GET THIS VERSION$ git clone --branch v0.78.0 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.78.0
└──▷ TRY ITLabel a session so it's identifiable by name in session listings or logs from the moment it starts.$ pi --name incident-triage-2025
Start a non-interactive print-mode session with a meaningful name for audit trail purposes.$ pi -n vuln-scan-run --print 'Scan the repo for hardcoded secrets'
- ›Adds
--name/-nflag to set a session display name at startup across interactive, print, JSON, and RPC modes. - ›Adds OSC 8
file://hyperlinks to file paths in built-in file tool titles, including tmux clients that support them. - ›Adds custom Amazon Bedrock request header support.
- ›Exports
convertToPngfor extension authors. - ›Exports
parseArgsand type Args for extension authors.
+1 moreshow less
- ›Shows a resume command hint when exiting interactive sessions.
- ›Adds
- v0.77.0
Pi v0.77.0 adds selective tool disablement, headless Codex device-code login, streaming-aware extension input, and Claude Opus 4.8 support.
└──▷ GET THIS VERSION$ git clone --branch v0.77.0 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.77.0
└──▷ TRY ITDisable a noisy or risky built-in tool (e.g., bash execution) for a scoped review session without touching your config.$ pi --exclude-tools bash
- ›Adds
--exclude-tools/-xtflag to disable specific built-in, extension, or custom tools while keeping all others active. - ›Adds device-code auth for headless ChatGPT Plus/Pro Codex subscription login via
/login. - ›Adds
InputEvent.streamingBehaviorso extensions can distinguish idle prompts, mid-stream steers, and queued follow-ups. - ›Adds Claude Opus 4.8 model metadata and updated adaptive-thinking coverage for Anthropic.
- ›Adds
- v0.76.0
Pi v0.76.0 adds explicit session IDs for automation, RPC bash context exclusion, and configurable provider retry limits.
└──▷ GET THIS VERSION$ git clone --branch v0.76.0 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.76.0
└──▷ TRY ITResume a named session in a CI script so every run appends to the same conversation history rather than starting fresh.$ pi --session-id ci-build-session-42 'Check for new lint errors in the diff'
Cap provider retries to avoid long waits on quota errors in automated pipelines.# In your Pi settings file: retry: provider: maxRetries: 2- ›Adds
--session-id <id>flag to create or resume an exact project-local session, enabling deterministic session management in scripts and automation. - ›Adds
excludeFromContextflag to the RPCbashcommand so shell output can be kept out of the model's next prompt context. - ›Introduces
retry.provider.maxRetriessetting to give explicit control over provider-level retries instead of relying on hidden SDK defaults.
- ›Adds
- v0.75.5
Pi v0.75.5 adds adaptive thinking for custom Anthropic-compatible providers and cleaner read tool UI.
└──▷ GET THIS VERSION$ git clone --branch v0.75.5 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.75.5
└──▷ USE ITEnable adaptive thinking on a custom Anthropic-compatible provider so Claude reasons more deeply on complex tasks.# In your custom provider model config: compat: forceAdaptiveThinking: true
- ›Adds
compat.forceAdaptiveThinkingoption to custom Anthropic-compatible model configs to enable adaptive-thinking Claude behavior on third-party providers. - ›Collapsed
readtool cards now show only the read line by default; press Ctrl+O to expand full file content. - ›Adds a standard unified patch to edit tool result details for SDK consumers.
- ›Adds
- v0.75.4
Pi v0.75.4 adds supply-chain hardening with shrinkwrap/lifecycle-script controls and interactive post-update changelogs.
└──▷ GET THIS VERSION$ git clone --branch v0.75.4 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.75.4
└──▷ TRY ITAfter upgrading, view the new version's changelog inline before resuming work.$ pi update- ›Supply-chain hardening: ships
npm-shrinkwrap.jsonfor transitive dependency locking, enforces dependency pinning and lifecycle-script allowlists, and disables lifecycle scripts during self-update and local release installs. - ›Shows interactive update notes after
pi updateso users can review the installed version's changelog before continuing. - ›Exports image resize utilities from the package root for SDK consumers.
- ›Supply-chain hardening: ships
- v0.74.1
Pi v0.74.1 adds image generation, Together AI provider, and Windows ARM64 binaries
└──▷ GET THIS VERSION$ git clone --branch v0.74.1 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.74.1
└──▷ TRY ITAuthenticate with Together AI to start using its models without manual config.$ pi /login- ›Adds image generation support via OpenRouter, including image generation APIs and image model metadata.
- ›Adds Together AI as a built-in provider with
/loginAPI-key authentication and default model resolution. - ›Adds standalone release binaries for Windows ARM64.
- ›Improves terminal markdown rendering with list indentation and task-list checkbox display.
- v0.73.1
Pi v0.73.1 adds self-update npm scope migration support, interactive OAuth login selection, and JSONC-style models.json parsing.
└──▷ GET THIS VERSION$ git clone --branch v0.73.1 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.73.1
└──▷ TRY ITMigrate an existing global install to the new npm scope without manual uninstall/reinstall steps.$ pi update --self
- ›Adds npm scope migration support to
pi update --self: uninstalls the old@mariozechner/pi-coding-agentpackage and installs the renamed@earendil-works/pi-coding-agentpackage automatically. - ›Enables interactive OAuth login selection so providers can present multiple login choices in
/loginfor provider-specific authentication flows. - ›Supports JSONC-style
models.jsonparsing — comments and trailing commas are now allowed, making custom provider and model configuration easier to maintain.
- ›Adds npm scope migration support to
- v0.73.0
Pi v0.73.0 adds incremental bash streaming, compact read rendering, and Xiaomi MiMo API billing with regional Token Plan providers.
└──▷ GET THIS VERSION$ git clone --branch v0.73.0 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.73.0
- ›Adds Xiaomi MiMo API billing provider (
xiaomi) alongside three regional Token Plan providers:xiaomi-token-plan-cn,xiaomi-token-plan-ams, andxiaomi-token-plan-sgp, each defaulting tomimo-v2.5-pro. - ›Streams bash tool output incrementally as commands run, rather than buffering until completion.
- ›Collapses Pi docs, AGENTS/CLAUDE context files, and
SKILL.mdcontents by default in interactivereadoutput, showing only selected line ranges.
└──▷ BREAKING ON UPGRADE- !The built-in
xiaomiprovider now uses Xiaomi's API billing endpoint instead of Token Plan AMS;XIAOMI_API_KEYmust now be an API billing key fromplatform.xiaomimimo.com. Users on Token Plan must switch toxiaomi-token-plan-cn,xiaomi-token-plan-ams, orxiaomi-token-plan-sgpand set the corresponding env var (XIAOMI_TOKEN_PLAN_CN_API_KEY,XIAOMI_TOKEN_PLAN_AMS_API_KEY, orXIAOMI_TOKEN_PLAN_SGP_API_KEY). - !The
/logindisplay name for the built-in Xiaomi provider is renamed from "Xiaomi MiMo Token Plan" to "Xiaomi MiMo".
- ›Adds Xiaomi MiMo API billing provider (
- v0.72.0
Pi v0.72.0 adds Xiaomi MiMo provider, per-model base URL overrides, and a post-turn agent stop callback.
└──▷ GET THIS VERSION$ git clone --branch v0.72.0 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.72.0
- ›Adds Xiaomi MiMo Token Plan as an Anthropic-compatible provider, authenticated via
XIAOMI_API_KEY, with default modelmimo-v2.5-proand/logindisplay support. - ›Introduces
thinkingLevelMapfor model definitions, letting models declare exactly which thinking levels they support (replacingreasoningEffortMap). - ›Enables per-model
baseUrloverrides in pi.registerProvider() model definitions. - ›Adds
shouldStopAfterTurncallback to the agent loop, allowing graceful exit after a completed turn.
└──▷ BREAKING ON UPGRADE- !
compat.reasoningEffortMapinmodels.jsonand pi.registerProvider() model definitions is replaced by model-levelthinkingLevelMap; existing mappings must be migrated fromcompat.reasoningEffortMaptothinkingLevelMap.
- ›Adds Xiaomi MiMo Token Plan as an Anthropic-compatible provider, authenticated via
- v0.71.1
Pi v0.71.1 adds
websocket-cachedtransport for OpenAI Codex, reusing connections and sending only new conversation items.└──▷ GET THIS VERSION$ git clone --branch v0.71.1 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.71.1
- ›Adds
websocket-cachedtransport option for the OpenAI Codex provider, keeping a single WebSocket open per session and sending only new conversation items instead of the full chat history on each request.
- ›Adds
- v0.71.0
Pi v0.71.0 adds Cloudflare AI Gateway and Moonshot AI providers, Mistral Medium 3.5, and new extension APIs.
└──▷ GET THIS VERSION$ git clone --branch v0.71.0 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.71.0
└──▷ TRY ITPin session storage to a specific directory without passing a flag every invocation, useful in CI or containerised workflows.$ PI_CODING_AGENT_SESSION_DIR=/var/pi/sessions pi- ›Adds Cloudflare AI Gateway as a built-in provider, configured via
CLOUDFLARE_API_KEY,CLOUDFLARE_ACCOUNT_ID, andCLOUDFLARE_GATEWAY_ID. - ›Adds Moonshot AI as a built-in provider, configured via
MOONSHOT_API_KEY. - ›Adds built-in support for the Mistral Medium 3.5 model.
- ›Adds
PI_CODING_AGENT_SESSION_DIRenvironment variable as an equivalent to--session-dirfor configuring session storage. - ›Extension APIs can now replace finalized
message_endmessages, enabling overrides of assistant usage cost reporting.
+4 moreshow less
- ›Adds ctx.ui.getEditorComponent() so extensions can wrap the currently configured custom editor factory.
- ›Adds a
thinking_level_selectextension event for observing thinking level changes. - ›Adds top-level
namesupport to pi.registerProvider() so extension-registered providers display a friendly name in/login. - ›Exposes routed OpenAI-compatible response model metadata in assistant messages so providers like OpenRouter can surface the concrete model used.
└──▷ BREAKING ON UPGRADE- !Built-in Google Gemini CLI and Google Antigravity providers have been removed; existing configurations using those providers must switch to another supported provider.
- ›Adds Cloudflare AI Gateway as a built-in provider, configured via
- v0.70.6
Pi v0.70.6 adds Cloudflare Workers AI as a built-in provider with API key, default model, and
/loginsupport.└──▷ GET THIS VERSION$ git clone --branch v0.70.6 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.70.6
- ›Adds Cloudflare Workers AI as a built-in provider, configured via
CLOUDFLARE_API_KEYandCLOUDFLARE_ACCOUNT_ID, with default model resolution and/loginsupport.
- ›Adds Cloudflare Workers AI as a built-in provider, configured via
- v0.70.3
Pi v0.70.3 adds self-update via
pi update, Azure Cognitive Services endpoint support, and new extension APIs for custom working-state UI.└──▷ GET THIS VERSION$ git clone --branch v0.70.3 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.70.3
└──▷ TRY ITKeep Pi itself current without separately managing the binary — run one command to update both Pi and all installed packages.$ pi update- ›Adds self-update capability to
pi updateso Pi itself can be upgraded alongside installed packages. - ›Adds Azure Cognitive Services endpoint support for Azure OpenAI Responses deployments.
- ›Adds
warnings.anthropicExtraUsagesetting in/settingsto suppress the Anthropic extra-usage billing warning. - ›Adds ctx.ui.setWorkingVisible() extension API, enabling extensions to hide the built-in loader row and render a custom working state.
- ›Adds self-update capability to
- v0.70.1
Pi v0.70.1 adds DeepSeek provider support and configurable provider timeout/retry controls.
└──▷ GET THIS VERSION$ git clone --branch v0.70.1 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.70.1
└──▷ USE ITTune timeout and retries for a slow local inference endpoint so long-running requests don't bail out prematurely.retry.provider.timeoutMs = 120000 retry.provider.maxRetries = 5 retry.provider.maxRetryDelayMs = 10000
- ›Adds DeepSeek provider with V4 Flash/Pro models, authenticated via
DEEPSEEK_API_KEY. - ›New
retry.provider.{timeoutMs,maxRetries,maxRetryDelayMs}settings expose per-provider timeout and retry controls, useful for long-running local inference.
- ›Adds DeepSeek provider with V4 Flash/Pro models, authenticated via
- v0.70.0
Pi v0.70.0 adds GPT-5.5 Codex support, fuzzy auth-provider search, auth source labels, and granular built-in tool disabling.
└──▷ GET THIS VERSION$ git clone --branch v0.70.0 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.70.0
└──▷ TRY ITLaunch a session that suppresses all built-in tools but still allows your custom extensions to run.$ pi --no-builtin-tools
Re-enable OSC 9;4 progress bars in terminals that support them after the default changed to off.📍In the Pi TUI, open/settingsand setterminal.showTerminalProgressto true- ›Adds
openai-codex/gpt-5.5as a model option withxhighreasoning support and priority-tier pricing. - ›Adds fuzzy search/filtering to the
/loginprovider selector, making it faster to find providers when many are configured. - ›Adds auth source labels in
/loginshowing whether credentials come from--api-key, an environment variable, or a custom provider fallback — without exposing secrets. - ›Adds
--no-builtin-toolsCLI flag and createAgentSession({ noTools: "builtin" }) SDK option to disable only built-in tools while keeping extension tools active. - ›Adds opt-in OSC 9;4 terminal progress indicators, toggled via
terminal.showTerminalProgressin/settings.
└──▷ BREAKING ON UPGRADE- !OSC 9;4 terminal progress indicators are now disabled by default; set
terminal.showTerminalProgresstotruein/settingsto re-enable.
- ›Adds
- v0.69.0
Pi v0.69.0 adds stacked autocomplete providers, terminating tool results, and OSC 9;4 progress indicators.
└──▷ GET THIS VERSION$ git clone --branch v0.69.0 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.69.0
└──▷ USE ITLayer a custom GitHub issue autocomplete provider on top of built-in slash/path completion in an extension.ctx.ui.addAutocompleteProvider(myGithubIssueProvider);
Return a final structured result from a tool without paying for an extra LLM turn.return { result: myOutput, terminate: true };- ›Adds ctx.ui.addAutocompleteProvider(...) so extensions can stack custom completion logic on top of built-in slash and path completion.
- ›Supports
terminate: trueon tool results, letting custom tools end a tool batch without triggering an automatic follow-up LLM call. - ›Adds OSC 9;4 terminal progress indicators during agent streaming and compaction for terminals that support tab-bar activity display (iTerm2, WezTerm, Windows Terminal, Kitty).
- ›Migrates extension SDK to TypeBox 1.x with native tool argument validation that works in eval-restricted runtimes such as Cloudflare Workers.
└──▷ BREAKING ON UPGRADE- !Extensions and SDK integrations must now depend on and import from
typebox1.x instead of@sinclair/typebox0.34.x;@sinclair/typebox/compileris no longer shimmed. - !After ctx.newSession(), ctx.fork(), or ctx.switchSession(), pre-replacement session-bound extension objects (including captured
piand commandctxreferences) are invalidated and now throw instead of silently targeting the replaced session; post-switch work must be moved into thewithSessioncallback using the providedReplacedSessionContext.
- v0.68.1
Pi v0.68.1 adds Fireworks AI provider support and configurable inline tool image width.
└──▷ GET THIS VERSION$ git clone --branch v0.68.1 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.68.1
└──▷ HOW TO FIND ITWiden tool-output images in the terminal to avoid them being clipped at the default size.📍In Pi, run/settingsand setterminal.imageWidthCellsto your desired cell width (e.g. 120).- ›Adds built-in Fireworks provider with
FIREWORKS_API_KEYauth and default modelaccounts/fireworks/models/kimi-k2p6. - ›Adds configurable inline tool image width via
terminal.imageWidthCellsin/settings.
- ›Adds built-in Fireworks provider with
- v0.68.0
Pi v0.68.0 adds
/clone, configurable keybindings, extension working-indicator control, and richer session_shutdown metadata.└──▷ GET THIS VERSION$ git clone --branch v0.68.0 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.68.0
└──▷ TRY ITDuplicate your current session branch into a new session to experiment without losing the original conversation state.$ /cloneBind the OAuth callback server to a non-loopback interface whenpi authruns inside a container or remote dev environment.$ PI_OAUTH_CALLBACK_HOST=0.0.0.0 pi auth- ›New
/clonecommand duplicates the current active branch into a fresh session, complementing/forkwhich targets a previous user message. - ›Extensions can now control the streaming working indicator (animated frames, static, or hidden) via ctx.ui.setWorkingIndicator().
- ›
before_agent_startextension events now exposesystemPromptOptions(BuildSystemPromptOptions) so extensions can inspect structured system-prompt inputs directly. - ›ctx.fork() gains a
position: "before" | "at"option so extensions can branch before a user message or duplicate the current conversation point. - ›Keybindings for scoped model-selector actions and session-tree filter actions are now remappable via
keybindings.json.
+3 moreshow less
- ›New
PI_OAUTH_CALLBACK_HOSTenvironment variable lets the built-in OAuth login flow (pi auth) bind its local callback server to a custom interface instead of hardcoded127.0.0.1. - ›
session_shutdownextension events now carryreasonandtargetSessionFilemetadata, enabling extensions to distinguish quit, reload, new-session, resume, and fork teardown paths. - ›
pi updatenow batches npm package updates per scope and runs git package updates with bounded parallelism, significantly reducing multi-package update time.
└──▷ BREAKING ON UPGRADE- !createAgentSession({ tools }) now expects
string[]names such as"read"and"bash"instead ofTool[]instances; migrate SDK code fromtools: [readTool, bashTool]totools: ["read", "bash"]. - !
--toolsnow allowlists built-in, extension, and custom tools by name, and--no-toolsnow disables all tools by default rather than only built-ins. - !Prebuilt cwd-bound tool exports (
readTool,bashTool,editTool,writeTool,grepTool,findTool,lsTool,readOnlyTools,codingTools) and their corresponding*ToolDefinitionvalues have been removed from@mariozechner/pi-coding-agent; use explicit factory exports such as createReadTool(cwd), createBashTool(cwd), createCodingTools(cwd), and createReadToolDefinition(cwd) instead. - !
DefaultResourceLoader, loadProjectContextFiles(), and loadSkills() no longer fall back to process.cwd() / a default agent-dir; an explicitcwdis now required and exported system-prompt option types enforce it.
- ›New
- v0.67.67
Pi v0.67.67 adds AWS bearer-token auth for Bedrock Converse API, removing the SigV4 credential requirement.
└──▷ GET THIS VERSION$ git clone --branch v0.67.67 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.67.67
- ›Supports
AWS_BEARER_TOKEN_BEDROCKenvironment variable to authenticate Bedrock sessions via the Converse API without local SigV4 credentials.
- ›Supports
- v0.67.6
Pi v0.67.6 adds prompt template argument hints, a new extension hook for HTTP response inspection, and OSC 8 hyperlink rendering.
└──▷ GET THIS VERSION$ git clone --branch v0.67.6 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.67.6
└──▷ USE ITDocument required and optional arguments on a prompt template so users see hints in the/autocomplete dropdown.--- name: summarize argument-hint: <file> [max-words] description: Summarize a file --- Summarize the contents of {{file}} in at most {{max-words}} words.- ›Adds
argument-hintfrontmatter field for prompt templates, displayed before the description in the/autocomplete dropdown using<angle>for required and[square]for optional arguments. - ›New
after_provider_responseextension hook lets extensions inspect provider HTTP status codes and headers after each response is received and before stream consumption begins. - ›Compact interactive startup header now shows loaded AGENTS.md files, prompt templates, skills, and extensions as a comma-separated list; press Ctrl+O to toggle the expanded view.
- ›Markdown links in assistant output render as OSC 8 hyperlinks on supporting terminals, with safe fallback to plain text on unknown terminals and tmux/screen.
- ›Adds
- v0.67.4
Pi v0.67.4 adds
--no-context-filesflag, exportable context-file utility, new extension hook, and claude-opus-4-7 model support.└──▷ GET THIS VERSION$ git clone --branch v0.67.4 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.67.4
└──▷ TRY ITRun Pi without injecting any AGENTS.md or CLAUDE.md context files — useful in CI or when testing a prompt in isolation.$ pi --no-context-files "Explain what this repo does"
Use the exported utility inside an extension to discover project context files using the same resolution order as the CLI.import { loadProjectContextFiles } from 'pi'; const files = await loadProjectContextFiles(process.cwd()); console.log('Context files found:', files);- ›New
--no-context-files(-nc) flag disables automaticAGENTS.md/CLAUDE.mddiscovery for clean runs without project context injection. - ›Exports loadProjectContextFiles() as a standalone utility for extensions and SDK-style integrations to inspect context-file resolution order.
- ›New
after_provider_responseextension hook enables extensions to inspect provider HTTP status codes and headers after each response and before stream consumption. - ›Adds
claude-opus-4-7model for Anthropic provider. - ›Anthropic prompt caching now adds a
cache_controlbreakpoint on the last tool definition, enabling tool schemas to be cached independently from transcript updates.
- ›New
- v0.67.3
Pi v0.67.3 adds
renderShell: "self"for tool renderers to own their outer shell and live backoff countdowns on auto-retry.└──▷ GET THIS VERSION$ git clone --branch v0.67.3 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.67.3
└──▷ USE ITUserenderShell: "self"in an extension renderer so your tool's diff preview fills its own shell without the default box wrapper.renderShell: "self"
- ›New
renderShell: "self"option for custom and built-in tool renderers lets tools own their outer shell instead of the default boxed shell, enabling stable large previews such as edit diffs. - ›Interactive auto-retry status now displays a live countdown during backoff periods instead of a static retry delay message.
- ›New
- v0.67.2
Pi v0.67.2 adds multi-flag system prompt appending, Kitty super-key bindings, and inline extension factories for custom entrypoints.
└──▷ GET THIS VERSION$ git clone --branch v0.67.2 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.67.2
└──▷ TRY ITLayer multiple system prompt fragments at launch — useful when composing role instructions with dynamic context (e.g., rules file + live asset list) without modifying a base config.$ pi --append-system-prompt "You are a security analyst. Follow OWASP guidelines." --append-system-prompt "Scope: only assess endpoints under /api/v2."
- ›Supports multiple
--append-system-promptflags in a single invocation, with each value appended to the system prompt separated by double newlines. - ›Adds interactive keybinding support for Kitty
super-modifiedshortcuts such assuper+k,super+enter, andctrl+super+k. - ›Supports passing inline extension factories to main() for embedded integrations and custom entrypoints.
- ›Supports multiple
- v0.67.1
Pi v0.67.1 adds full OpenRouter routing config in models.json and a new env var for subprocess detection.
└──▷ GET THIS VERSION$ git clone --branch v0.67.1 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.67.1
└──▷ USE ITRoute a model through OpenRouter with fallback providers, ZDR, and a max price cap — useful when you need data-residency guarantees or cost control in a shared team setup.# In models.json, add an openRouterRouting block to your model entry: { "id": "my-model", "openRouterRouting": { "fallbacks": ["openai/gpt-4o", "anthropic/claude-3-5-sonnet"], "dataCollection": false, "zdr": true, "maxPrice": { "prompt": 0.01, "completion": 0.03 }, "order": ["Fireworks", "Together"] } }Detect inside a shell script or tool invoked by Pi that the process is running under the Pi coding agent.$ if [ "$PI_CODING_AGENT" = "true" ]; then echo "Running inside Pi coding agent — skipping interactive prompts" fi- ›Adds full
openRouterRoutingfield support inmodels.json, enabling fallbacks, parameter requirements, data collection, ZDR, ignore lists, quantizations, provider sorting, max price, and preferred throughput/latency constraints. - ›Sets
PI_CODING_AGENT=trueat startup so subprocesses and scripts can detect they are running inside the Pi coding agent. - ›Adds anonymous install/update telemetry ping (only in interactive mode) to count per-version adoption; disable via
/settings→ Install telemetry,enableInstallTelemetry: falseinsettings.json,PI_OFFLINE=1, orPI_TELEMETRY=0.
- ›Adds full
- v0.67.0
Pi v0.67.0 adds full OpenRouter routing control in models.json and a
PI_CODING_AGENTenv flag for subprocess detection.└──▷ GET THIS VERSION$ git clone --branch v0.67.0 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.67.0
└──▷ TRY ITDetect from a shell script or subprocess that Pi is orchestrating the run, so you can branch logic accordingly.$ if [ "$PI_CODING_AGENT" = "true" ]; then echo "Running inside Pi coding agent — skipping interactive prompts" fi- ›Adds full
openRouterRoutingfield support inmodels.json, enabling fallbacks, parameter requirements, data collection, ZDR, ignore lists, quantizations, provider sorting, max price, and preferred throughput/latency constraints. - ›Sets
PI_CODING_AGENT=trueenvironment variable at startup so subprocesses and scripts can detect they are running inside the coding agent. - ›Adds lightweight anonymous install/update telemetry ping to track per-version adoption; controllable via
/settings,enableInstallTelemetryinsettings.json,PI_OFFLINE=1, orPI_TELEMETRY=0.
- ›Adds full
- v0.66.0
Pi v0.66.0 adds an Earendil startup announcement with inline image rendering and an Anthropic subscription billing warning.
└──▷ GET THIS VERSION$ git clone --branch v0.66.0 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.66.0
- ›Displays an Earendil startup announcement with bundled inline image rendering and a linked blog post during interactive mode on April 8 and 9, 2026.
- ›Shows an interactive warning when Anthropic subscription auth is active, clarifying that third-party Anthropic usage draws from extra usage and is billed per token.
- v0.65.0
Pi v0.65.0 adds a session runtime API, defineTool() helper, tree timestamps, and unified structured diagnostics.
└──▷ GET THIS VERSION$ git clone --branch v0.65.0 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.65.0
└──▷ TRY ITToggle timestamps on session tree entries to audit when branches were created without leaving the TUI.$ # Inside the /tree view, press Shift+T to show or hide timestamps on each entry.Use createAgentSessionRuntime() to manage session lifecycle (new, switch, fork) with cwd-bound service recreation in an SDK integration.import { type CreateAgentSessionRuntimeFactory, createAgentSessionFromServices, createAgentSessionRuntime, createAgentSessionServices, getAgentDir, SessionManager, } from "@mariozechner/pi-coding-agent"; const createRuntime: CreateAgentSessionRuntimeFactory = async ({ cwd, sessionManager, sessionStartEvent }) => { const services = await createAgentSessionServices({ cwd }); return { ...(await createAgentSessionFromServices({ services, sessionManager, sessionStartEvent })), services, diagnostics: services.diagnostics, }; }; const runtime = await createAgentSessionRuntime(createRuntime, { cwd: process.cwd(), agentDir: getAgentDir(), sessionManager: SessionManager.create(process.cwd()), }); await runtime.newSession(); await runtime.fork("entry-id");- ›New createAgentSessionRuntime() and
AgentSessionRuntimeSDK API: closure-based runtime that recreates cwd-bound services and session config on every session switch, used consistently across startup,/new,/resume,/fork, and import. - ›New defineTool() helper: create standalone custom tool definitions with full TypeScript parameter type inference, eliminating manual casts.
- ›Label timestamps in
/tree: toggle timestamps on session tree entries with Shift+T, with smart date formatting and preservation through branching. - ›Unified structured diagnostics: arg parsing, service creation, session option resolution, and resource loading now return
info/warning/errordiagnostics instead of logging or exiting, letting the app layer control presentation and exit behavior. - ›Error diagnostics now reported for missing explicit CLI resource paths (
-e,--skill,--prompt-template,--theme).
└──▷ BREAKING ON UPGRADE- !Extension post-transition events
session_switchandsession_forkare removed; usesession_startwithevent.reason("startup" | "reload" | "new" | "resume" | "fork") andevent.previousSessionFile(set for"new","resume","fork"). - !Session-replacement methods (newSession(), switchSession(), fork(), importFromJsonl()) are removed from
AgentSession; useAgentSessionRuntimeinstead. - !
session_directoryis removed from extension and settings APIs. - !Unknown single-dash CLI flags (e.g.
-s) now produce an error instead of being silently ignored.
- ›New createAgentSessionRuntime() and
- v0.64.0
Pi v0.64.0 adds a prepareArguments hook for tool schema migration and lets extensions customize the thinking block label.
└──▷ GET THIS VERSION$ git clone --branch v0.64.0 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.64.0
└──▷ USE ITWhen building an extension that uses chain-of-thought, replace the default collapsed thinking label with a domain-specific one.export default function myExtension(ctx) { ctx.ui.setHiddenThinkingLabel("[Reasoning hidden — click to expand]"); }- ›Adds
ToolDefinition.prepareArgumentshook so extensions and SDK callers can normalize or migrate raw model arguments before schema validation — enabling compatibility shims for resumed sessions with outdated tool schemas. - ›Built-in
edittool usesprepareArgumentsto silently fold legacy top-leveloldText/newTextintoedits[]when resuming old sessions. - ›Adds ctx.ui.setHiddenThinkingLabel() so extensions can customize the collapsed thinking block label shown in interactive mode.
└──▷ BREAKING ON UPGRADE- !
ModelRegistryno longer has a public constructor; direct new ModelRegistry(...) calls no longer compile. SDK callers and tests must use ModelRegistry.create(authStorage, modelsJsonPath?) for file-backed registries or ModelRegistry.inMemory(authStorage) for built-in-only registries.
- ›Adds
- v0.63.2
Pi v0.63.2 adds
ctx.signalto ExtensionContext for propagating cancellation into nested model calls and fetch operations.└──▷ GET THIS VERSION$ git clone --branch v0.63.2 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.63.2
└──▷ TRY ITPropagate agent turn cancellation into a downstream fetch inside a custom extension handler so it aborts cleanly when the user cancels.$ // Inside your extension handler async function myHandler(ctx) { const response = await fetch('https://api.example.com/data', { signal: ctx.signal }); return response.json(); }- ›Adds
ctx.signaltoExtensionContext, letting extension handlers forward cancellation into nested model calls, fetch(), and other abort-aware work.
- ›Adds
- v0.63.1
Adds gemini-3.1-pro-preview-customtools model support for the google-vertex provider.
└──▷ GET THIS VERSION$ git clone --branch v0.63.1 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.63.1
- ›Adds
gemini-3.1-pro-preview-customtoolsmodel availability for thegoogle-vertexprovider.
- ›Adds
- v0.63.0
Pi v0.63.0 adds persistent sessionDir config, multi-edit support, and per-instance TUI log files.
└──▷ GET THIS VERSION$ git clone --branch v0.63.0 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.63.0
└──▷ USE ITPersist session storage to a project-specific directory so you never need to pass--session-diron the command line.# In your project's settings.json { "sessionDir": "/path/to/project/.pi-sessions" }Capture a unique log file per pi instance when running multiple sessions in parallel (e.g., in tmux panes or CI jobs).$ PI_TUI_WRITE_LOG=/var/log/pi pi- ›Adds
sessionDirsetting in global and projectsettings.jsonto persist session storage location without passing--session-diron every invocation. - ›Adds multi-edit support to the
edittool, allowing one call to update multiple disjoint regions in the same file matched against the original content. - ›Adds
PI_TUI_WRITE_LOGdirectory path support, writing a uniquetui-<timestamp>-<pid>.logper pi instance for debugging multiple concurrent sessions. - ›Adds startup onboarding hint in the interactive header informing users that pi can explain its own features and documentation.
└──▷ BREAKING ON UPGRADE- !ModelRegistry.getApiKey(model) is replaced by getApiKeyAndHeaders(model); extensions and SDK integrations must now fetch both
apiKeyandheadersper request instead of a single API key. - !Deprecated direct model IDs
minimaxandminimax-cnare removed; pinned model IDs must be updated toMiniMax-M2.7orMiniMax-M2.7-highspeed.
- ›Adds
- v0.62.0
Pi v0.62.0 adds extensible built-in tool rendering, unified sourceInfo provenance, and AWS Bedrock cost allocation tagging.
└──▷ GET THIS VERSION$ git clone --branch v0.62.0 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.62.0
- ›Enables extension authors to override rendering of built-in read/write/edit/bash/grep/find/ls tools with custom
renderCall/renderResultcomponents via extensible ToolDefinitions. - ›Adds unified
sourceInfostruct (path, scope, source metadata) to all resources, commands, tools, skills, and prompt templates — visible in autocomplete, RPC discovery, and SDK introspection. - ›New
requestMetadataoption onBedrockOptionsforwards key-value pairs to the Bedrock Converse API for AWS Cost Explorer split cost allocation tagging.
└──▷ BREAKING ON UPGRADE- !If
renderCallorrenderResultis defined on aToolDefinition, it must now return a Component; fallback rendering only occurs when no renderer is defined for that slot. - !RPC
get_commands,RpcSlashCommand, and SDKSlashCommandInfono longer exposelocationorpath— usesourceInfoinstead. - !The legacy
sourcefields on Skill andPromptTemplateare removed — usesourceInfo.sourceinstead. - !ResourceLoader.getPathMetadata() is removed — resource provenance is now attached directly to loaded resources via
sourceInfo. - !
extensionPathis removed fromRegisteredCommandandRegisteredTool— usesourceInfo.pathinstead.
- ›Enables extension authors to override rendering of built-in read/write/edit/bash/grep/find/ls tools with custom
- v0.61.1
Pi v0.61.1 adds typed tool_call handler return values and updated default models for zai, cerebras, and MiniMax providers.
└──▷ GET THIS VERSION$ git clone --branch v0.61.1 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.61.1
- ›Adds
ToolCallEventResulttype exports from@mariozechner/pi-coding-agenttop-level and core extension entry points, enabling extension authors to strongly typetool_callhandler return values. - ›Updates default models for
zai,cerebras,minimax, andminimax-cnproviders and addsMiniMax-M2.1-highspeedmodel entries with normalized context limits.
- ›Adds
- v0.61.0
Pi v0.61.0 adds JSONL session export/import, a unified keybinding manager, and gpt-5.4-mini support.
└──▷ GET THIS VERSION$ git clone --branch v0.61.0 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.61.0
└──▷ TRY ITPreserve a full session to disk for audit, replay, or sharing with a teammate.$ /export ~/sessions/pentest-2025-07-14.jsonlRestore a previously saved session — useful for resuming a long engagement or reviewing an archived conversation.$ /import ~/sessions/pentest-2025-07-14.jsonl- ›Adds JSONL session export and import via
/export <path.jsonl>and/import <path.jsonl>commands. - ›Introduces namespaced keybinding IDs and a unified keybinding manager across the app and TUI, with automatic migration of older
keybindings.jsonconfig files. - ›Adds
gpt-5.4-minito theopenai-codexmodel catalog. - ›Adds a resizable sidebar to HTML share and export views.
└──▷ BREAKING ON UPGRADE- !Keybinding IDs in
keybindings.jsonare now namespaced; extension authors must update keyHint(), keyText(), and keybindings.matches(...) calls from old names like"expandTools","selectConfirm", and"interrupt"to namespaced IDs like"app.tools.expand","tui.select.confirm", and"app.interrupt". Older config files are migrated automatically on startup. - !Custom editors and extension UI components receive an injected
keybindings: KeybindingsManagerand must not call getKeybindings() or setKeybindings() themselves.
- ›Adds JSONL session export and import via
- v0.60.0
Pi v0.60.0 adds session forking from the CLI and a new createLocalBashOperations() SDK export for custom bash integrations.
└──▷ GET THIS VERSION$ git clone --branch v0.60.0 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.60.0
└──▷ TRY ITCheck for and apply available package updates on demand instead of waiting for a startup auto-update.$ pi update- ›Adds
--fork <path|id>flag to fork an existing session file or partial session UUID into a new session in the current project. - ›Adds createLocalBashOperations() export so extensions and SDK callers can wrap pi's built-in local bash backend for
user_bashinterception and custom bash integrations. - ›Startup no longer auto-updates unpinned npm and git packages; interactive mode now checks for updates in the background and notifies when newer packages are available.
└──▷ BREAKING ON UPGRADE- !Installed unpinned packages are no longer checked or updated during startup — use
pi updateexplicitly to apply npm/git package updates.
- ›Adds
- v0.58.1
Adds
pi uninstallas a convenient alias forpi install --uninstall└──▷ GET THIS VERSION$ git clone --branch v0.58.1 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.58.1
└──▷ TRY ITQuickly remove an installed package without typing the full--uninstallflag$ pi uninstall <package>- ›Adds
pi uninstallas a shorthand alias forpi install --uninstall
- ›Adds
- v0.58.0
Pi v0.58.0 expands Claude Opus/Sonnet 4.6 context to 1M tokens, adds parallel tool execution, and supports
GOOGLE_CLOUD_API_KEYfor Vertex AI.└──▷ GET THIS VERSION$ git clone --branch v0.58.0 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.58.0
- ›Raises Claude Opus 4.6, Sonnet 4.6, and related Bedrock model context windows from 200K to 1M tokens.
- ›Enables parallel execution of extension tool calls by default, with sequential
tool_callpreflight preserved for extension interception. - ›Adds
GOOGLE_CLOUD_API_KEYenvironment variable support for thegoogle-vertexprovider as an alternative to Application Default Credentials. - ›Allows extensions to supply deterministic session IDs via newSession().
- v0.57.1
Pi v0.57.1 adds
/treebranch folding, a session_directory extension event, and digit keybindings to the TUI.└──▷ GET THIS VERSION$ git clone --branch v0.57.1 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.57.1
- ›Adds branch folding and segment-jump navigation in
/treevia Ctrl+←/Ctrl+→ (segment jump) and Alt+←/Alt+→ (fold/unfold), alongside existing←/→and Page Up/Page Down paging. - ›New
session_directoryextension event fires before session manager creation, letting extensions customize the session directory path based on cwd or other factors (CLI--session-dirstill takes precedence). - ›Digit keys (
0-9) now supported in the TUI keybinding system, including modified combos likectrl+1, with Kitty CSI-u and xtermmodifyOtherKeysprotocol support.
- ›Adds branch folding and segment-jump navigation in
- v0.57.0
Pi v0.57.0 adds extension payload interception, non-capturing overlay focus control, and strict JSONL framing in RPC mode.
└──▷ GET THIS VERSION$ git clone --branch v0.57.0 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.57.0
- ›Adds
before_provider_requestextension hook so extensions can inspect or replace provider request payloads before they are sent. - ›Enables non-capturing overlays in extension UIs with explicit focus control via
OverlayOptions.nonCapturingand OverlayHandle.focus() / unfocus() / isFocused(). - ›RPC mode now uses strict LF-only JSONL framing for more robust payload handling.
└──▷ BREAKING ON UPGRADE- !RPC mode now uses strict LF-delimited JSONL framing: clients must split records on
\nonly and can no longer use generic line readers such as Nodereadline, which also split on Unicode separators (U+2028, U+2029) inside JSON payloads.
- ›Adds
- v0.56.3
Pi v0.56.3 adds claude-sonnet-4-6 via google-antigravity and improves tmux key support.
└──▷ GET THIS VERSION$ git clone --branch v0.56.3 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.56.3
- ›Adds
claude-sonnet-4-6model support via thegoogle-antigravityprovider. - ›Supports Shift+Enter and Ctrl+Enter inside tmux via xterm modifyOtherKeys fallback.
- ›Adds
- v0.56.2
Pi v0.56.2 adds GPT-5.4 support, a new treeFilterMode setting, and native Mistral conversations integration.
└──▷ GET THIS VERSION$ git clone --branch v0.56.2 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.56.2
- ›Supports GPT-5.4 across
openai,openai-codex,azure-openai-responses, andopencodeproviders, withgpt-5.4now the default foropenaiandopenai-codex. - ›Adds
gpt-5.3-codexas a fallback model forgithub-copilotuntil upstream model catalogs include it. - ›New
treeFilterModesetting lets you choose the default/treefilter mode fromdefault,no-tools,user-only,labeled-only, orall. - ›Adds native Mistral conversations integration via the SDK-backed provider, preserving Mistral-specific thinking and replay semantics.
└──▷ BREAKING ON UPGRADE- !The default model for the
openaiandopenai-codexproviders is nowgpt-5.4; any workflow pinned to the previous default will silently switch models on upgrade.
- ›Supports GPT-5.4 across
- v0.56.0
Pi v0.56.0 adds OpenCode Go provider support, a new branch-summary skip setting, and a Gemini flash-lite fallback model.
└──▷ GET THIS VERSION$ git clone --branch v0.56.0 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.56.0
- ›Adds OpenCode Go provider support with
opencode-gomodel defaults andOPENCODE_API_KEYenvironment variable. - ›New
branchSummary.skipPromptsetting suppresses branch summarization prompts during tree navigation. - ›Adds
gemini-3.1-flash-lite-previewas a fallback model in Google provider catalogs when upstream metadata lags.
└──▷ BREAKING ON UPGRADE- !Scoped model entries without an explicit
:<thinking>suffix now inherit the current session thinking level when selected, instead of applying a startup-captured default. - !Node OAuth runtime exports are removed from the top-level
@mariozechner/pi-aientry; OAuth login and refresh must now be imported from@mariozechner/pi-ai/oauth.
- ›Adds OpenCode Go provider support with
- v0.55.4
Pi v0.55.4 adds live tool registration, per-tool system-prompt injection via
promptSnippetandpromptGuidelines.└──▷ GET THIS VERSION$ git clone --branch v0.55.4 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.55.4
└──▷ USE ITDynamically register a tool mid-session so the LLM can use it immediately without restarting or running/reload.pi.registerTool({ name: "lookup", description: "Look up a value", promptSnippet: "lookup: fetches live data by key", promptGuidelines: "Use lookup when the user asks for real-time data.", execute: async (args) => { /* … */ } });- ›Enables runtime tool registration that takes effect immediately in active sessions — tools added via pi.registerTool() are available to pi.getAllTools() and the LLM without
/reload. - ›Adds
promptSnippetfield toToolDefinitionfor injecting a one-line entry into the default system prompt's Available tools section while the tool is active. - ›Adds
promptGuidelinesfield toToolDefinitionso active tools can append tool-specific bullets to the default system prompt's Guidelines section. - ›Supports custom tool renderers that suppress transcript output cleanly, leaving no blank rows or empty footprint in interactive rendering.
- ›Enables runtime tool registration that takes effect immediately in active sessions — tools added via pi.registerTool() are available to pi.getAllTools() and the LLM without
- v0.55.2
Extensions can now dynamically unregister providers and register them at runtime without requiring
/reload.└──▷ GET THIS VERSION$ git clone --branch v0.55.2 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.55.2
└──▷ TRY ITSwap in a custom provider at runtime from a command handler and later cleanly remove it, restoring the original built-in models — all without issuing/reload.$ pi.unregisterProvider("my-custom-provider")- ›Adds pi.unregisterProvider(name) to dynamically remove a custom provider and its models from the registry, restoring any overridden built-in models.
- ›pi.registerProvider() now takes effect immediately when called outside the initial extension load phase (e.g. from a command handler), eliminating the need for
/reloadafter late registrations.
- v0.55.1
Pi v0.55.1 adds offline startup mode and Gemini 3.1 Pro Preview model support.
└──▷ GET THIS VERSION$ git clone --branch v0.55.1 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.55.1
└──▷ TRY ITStart Pi in an air-gapped or network-restricted environment without waiting on managed-tool network calls.$ pi --offline
- ›Adds
--offlineflag (orPI_OFFLINEenv var) to disable startup network operations and avoid hangs in restricted or air-gapped environments. - ›Adds
gemini-3.1-pro-previewmodel support to thegoogle-gemini-cliprovider.
- ›Adds
- v0.54.0
Pi v0.54.0 adds auto-discovery of agent skills from
.agents/skillsin project and home directories.└──▷ GET THIS VERSION$ git clone --branch v0.54.0 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.54.0
- ›Adds automatic skill discovery from
.agents/skillsin the current directory, ancestor directories (up to git repo root), and~/.agents/skillsglobally, alongside existing.piskill paths.
- ›Adds automatic skill discovery from
- v0.53.0
Pi v0.53.0 adds caller-controlled I/O error draining, pluggable auth storage backends, and a new Claude Sonnet 4-6 model entry.
└──▷ GET THIS VERSION$ git clone --branch v0.53.0 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.53.0
- ›Adds SettingsManager.drainErrors() for caller-controlled settings I/O error handling without manager-side console output.
- ›Adds pluggable auth storage backends (
FileAuthStorageBackend,InMemoryAuthStorageBackend) and AuthStorage.fromStorage(...) for flexible auth persistence wiring. - ›Adds Anthropic
claude-sonnet-4-6model fallback entry to generated model definitions.
└──▷ BREAKING ON UPGRADE- !
SettingsManagersetters now update in-memory state immediately and queue disk writes — code that requires durable on-disk settings must call await settingsManager.flush() explicitly. - !
AuthStorageconstructor is no longer public — code using new AuthStorage(...) directly will break; use AuthStorage.create(...), AuthStorage.fromStorage(...), or AuthStorage.inMemory(...) instead.
- v0.52.12
Pi v0.52.12 adds a
transportsetting to choose between SSE, WebSocket, or auto for supported providers.└──▷ GET THIS VERSION$ git clone --branch v0.52.12 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.52.12
└──▷ USE ITForce SSE transport for openai-codex when WebSocket connections are blocked by a proxy.# In settings.json { "transport": "sse" }- ›New
transportsetting ("sse","websocket","auto") in/settingsandsettings.jsonlets you control the connection transport for providers likeopenai-codex. - ›Interactive mode applies transport changes immediately without restarting the agent session.
└──▷ BREAKING ON UPGRADE- !The legacy
websockets: booleansetting is migrated to the newtransportsetting; existing configs usingwebsocketswill be remapped automatically.
- ›New
- v0.52.10
Pi v0.52.10 adds terminal input interception for extensions, richer
--modelselection syntax, and new built-in GLM-5 and gpt-5.3-codex-spark models.└──▷ GET THIS VERSION$ git clone --branch v0.52.10 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.52.10
└──▷ TRY ITSelect a model with a thinking budget suffix without specifying a provider — useful for quickly switching reasoning depth in CI or ad-hoc sessions.$ pi --model sonnet:high
Target a specific provider and model in one flag when you have multiple providers configured and want deterministic routing.$ pi --model openai/gpt-4o
- ›Adds
terminal_inputextension event, letting extensions intercept, consume, or transform raw terminal input before normal TUI handling. - ›Adds extension event forwarding for full message and tool execution lifecycles:
message_start,message_update,message_end,tool_execution_start,tool_execution_update,tool_execution_end. - ›Expands
--modelflag to supportprovider/idsyntax, fuzzy matching, and:<thinking>suffixes (e.g.,--model sonnet:high,--model openai/gpt-4o) without requiring--provider. - ›Adds built-in
gpt-5.3-codex-sparkmodel definition for OpenAI and OpenAI Codex providers (research preview). - ›Adds built-in GLM-5 model support via z.ai and OpenRouter provider catalogs.
+1 moreshow less
- ›Routes GitHub Copilot Claude 4.x models through the Anthropic Messages API with updated Copilot header handling.
└──▷ BREAKING ON UPGRADE- !
ContextUsage.tokensandContextUsage.percentare nownumber | null; extensions reading these fields must handle thenullcase after compaction. - !The
usageTokens,trailingTokens, andlastUsageIndexfields have been removed fromContextUsage; extensions referencing these fields will break. - !Git source parsing is now strict: shorthand sources like
github.com/org/repoand[email protected]:org/repono longer work without thegit:prefix — only protocol URLs (https://,http://,ssh://,git://) are recognized automatically.
- ›Adds
- v0.52.9
Pi v0.52.9 adds hot-reload for extensions, short disable flag aliases, and richer tool introspection via getAllTools().
└──▷ GET THIS VERSION$ git clone --branch v0.52.9 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.52.9
└──▷ USE ITTrigger a live reload of the Pi runtime from inside an extension — useful when your extension detects a config change and needs to restart the agent without manual intervention.ctx.reload();
Launch Pi quickly in a scripting context without loading extensions, skills, or prompt templates.$ pi -ne -ns -np
Introspect all available tools and their full parameter schemas from within an extension to build dynamic dispatch or validation logic.const tools = pi.getAllTools(); for (const tool of tools) { console.log(tool.name, tool.description, tool.parameters); }- ›New ctx.reload() extension API method triggers a full runtime reload, enabling hot-reloading of configuration or restarting the agent programmatically.
- ›New short CLI aliases
-ne,-ns, and-npfor--no-extensions,--no-skills, and--no-prompt-templatesspeed up interactive usage and scripting. - ›Exported
/exportHTML sessions now include collapsible tool input schemas (parameter names, types, descriptions) for easier session review and sharing. - ›pi.getAllTools() now returns tool parameters in addition to name and description, enabling richer extension integrations.
- v0.52.8
Pi v0.52.8 adds Emacs kill-ring editing, OpenRouter auto-routing, and programmatic editor paste for extensions.
└──▷ GET THIS VERSION$ git clone --branch v0.52.8 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.52.8
└──▷ TRY ITInspect available subcommands for a package without triggering a silent failure.$ pi <package> --help
- ›Adds Emacs-style kill ring (
ctrl+k/ctrl+y/alt+y) and undo (ctrl+z) keybindings in the editor input. - ›Adds
openrouter:automodel alias for automatic OpenRouter model routing. - ›Enables extensions to programmatically paste content into the editor via
pasteToEditorin the extension UI context. - ›Adds helpful output for
pi <package> --helpand invalid subcommands instead of silent failure.
└──▷ BREAKING ON UPGRADE- !The default model is changed from Claude Opus 4.5 to Opus 4.6; any workflow pinned to the implicit default will now use Opus 4.6.
- ›Adds Emacs-style kill ring (
- v0.52.7
Pi v0.52.7 adds per-model config overrides and unauthenticated Bedrock proxy support via new env vars.
└──▷ GET THIS VERSION$ git clone --branch v0.52.7 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.52.7
└──▷ USE ITOverride a specific built-in model's settings (e.g., max tokens) without replacing the whole provider model list.# In models.json { "providers": [...], "modelOverrides": { "claude-opus-4-5": { "maxTokens": 8192 } } }- ›Adds
modelOverrideskey inmodels.jsonto customize individual built-in provider models (e.g., context window, parameters) without replacing the entire provider model list. - ›Supports merge-by-id behavior for
models.jsonprovidermodels, letting custom model entries upsert or extend built-ins rather than replacing the full list. - ›Supports unauthenticated Bedrock proxy endpoints via new
AWS_BEDROCK_SKIP_AUTHandAWS_BEDROCK_FORCE_HTTP1environment variables.
└──▷ BREAKING ON UPGRADE- !
models.jsonprovidermodelsno longer performs full replacement of built-in models — it now merges byid, keeping built-in models by default and upserting custom entries. Any config that relied onmodelsto fully replace a provider's model list will now also include the built-ins.
- ›Adds
- v0.52.0
Pi v0.52.0 adds Claude Opus 4.6 and GPT-5.3 Codex models, SSH git packages, and dynamic API key resolution via shell commands.
└──▷ GET THIS VERSION$ git clone --branch v0.52.0 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.52.0
└──▷ USE ITPull API keys from a secrets manager or keychain at runtime instead of storing plaintext keys in auth.json.# In auth.json: { "openai": "!op read op://vault/openai/credential", "anthropic": "$ANTHROPIC_API_KEY" }- ›Adds Claude Opus 4.6 to the model catalog.
- ›Adds GPT-5.3 Codex to the model catalog (OpenAI Codex provider only).
- ›Supports SSH URLs for git packages.
- ›Enables dynamic API key resolution in
auth.jsonvia shell command (!command) and environment variable lookup. - ›Model selectors now display the currently selected model name.
+1 moreshow less
- ›New
minimal-mode.tsexample extension demonstrating how to override built-in tool rendering for a minimal display mode.
- v0.51.6
Pi v0.51.6 adds a configurable
resumekeybinding and smarter slash command triggering.└──▷ GET THIS VERSION$ git clone --branch v0.51.6 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.51.6
└──▷ USE ITBind a key to open the session resume selector so you can quickly return to a previous session without reaching for the mouse.# In your keybindings config (see docs/keybindings.md) { "key": "ctrl+r", "action": "resume" }- ›Adds
resumeas a configurable keybinding action to open the session resume selector, on par withnewSession,tree, andfork. - ›Slash command menu now triggers on the first line even when other lines contain content, enabling commands to be prepended to existing text.
- ›Adds
- v0.51.4
Share URLs now default to the pi.dev domain.
└──▷ GET THIS VERSION$ git clone --branch v0.51.4 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.51.4
- ›Share URLs now default to pi.dev (replacing the previous default domain).
- v0.51.3
Pi v0.51.3 adds extension command discovery via ExtensionAPI.getCommands() and local path support for
pi install/pi remove.└──▷ GET THIS VERSION$ git clone --branch v0.51.3 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.51.3
└──▷ TRY ITInstall a locally developed extension package by path instead of a registry name.$ pi install ./my-extension- ›Adds ExtensionAPI.getCommands() so extensions can enumerate available slash commands (extensions, prompt templates, skills) for programmatic invocation.
- ›Exports
SlashCommandInfotypes to support command discovery integrations. - ›Adds a
commands.tsexample extension demonstrating command discovery invocation patterns. - ›Supports local filesystem paths in
pi installandpi remove, with relative paths resolved against the settings file.
└──▷ BREAKING ON UPGRADE- !The RPC
get_commandsresponse andSlashCommandSourcetype have the"template"value renamed to"prompt"— any code matching on"template"will break.
- v0.51.2
Pi v0.51.2 adds extension UI controls for tool output expansion and install-method-aware update instructions.
└──▷ GET THIS VERSION$ git clone --branch v0.51.2 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.51.2
- ›Adds
ExtensionUIContextmethodsgetToolsExpandedandsetToolsExpandedso extensions can programmatically control tool output expansion in the UI. - ›Adds install method detection to display package-manager-specific update instructions (e.g., brew, apt) when an update is available.
- ›Adds
- v0.51.1
Pi v0.51.1 adds a programmatic session-switching Extension API and a new terminal clear-on-shrink setting.
└──▷ GET THIS VERSION$ git clone --branch v0.51.1 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.51.1
- ›New ctx.switchSession(sessionPath) Extension API lets extensions programmatically switch sessions.
- ›New
terminal.clearOnShrinksetting (also togglable viaPI_CLEAR_ON_SHRINK=1) pins editor and footer to the bottom of the terminal when content shrinks.
- v0.51.0
Pi v0.51.0 adds Android/Termux support, bash spawn hooks, Nix/Guix compatibility, and a full Extension UI RPC protocol.
└──▷ GET THIS VERSION$ git clone --branch v0.51.0 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.51.0
└──▷ TRY ITInstall and run Pi on an Android device via Termux.$ pkg install nodejs termux-api git && npm install -g @mariozechner/pi-coding-agent && mkdir -p ~/.pi/agent && echo 'You are running on Android in Termux.' > ~/.pi/agent/AGENTS.md && pi
- ›Supports Android via Termux, with graceful clipboard fallback when
termux-apiis unavailable. - ›New pi.setBashSpawnHook() API lets extensions intercept and modify bash commands, working directory, and environment variables before execution.
- ›Adds Linux ARM64 musl (Alpine Linux) support via updated clipboard dependency.
- ›New
PI_PACKAGE_DIRenvironment variable overrides the package path for Nix/Guix content-addressed package managers where store paths tokenize poorly. - ›The
/resumesession picker gains a named-session-only filter toggle (Ctrl+N by default, configurable viatoggleSessionNamedFilterkeybinding).
+3 moreshow less
- ›New isToolCallEventType() type guard lets extension developers narrow
ToolCallEventtypes per tool for stronger TypeScript safety. - ›Full Extension UI Protocol RPC documentation and examples enable headless clients to support interactive extension dialogs and notifications.
- ›Exports
discoverAndLoadExtensionsfrom the package, enabling extension testing without a local repo clone.
└──▷ BREAKING ON UPGRADE- !The
ToolDefinition.executeparameter order has changed from (toolCallId, params, onUpdate, ctx, signal) to (toolCallId, params, signal, onUpdate, ctx). Any existing extension that implementsexecutemust swap thesignalandonUpdateparameters or it will break.
- ›Supports Android via Termux, with graceful clipboard fallback when
- v0.50.9
Pi v0.50.9 adds prompt cache retention control and a new titlebar spinner extension example.
└──▷ GET THIS VERSION$ git clone --branch v0.50.9 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.50.9
- ›New
cacheRetentionstream option lets you control prompt cache retention duration with provider-specific mappings, defaulting to short retention. - ›New
titlebar-spinner.tsexample extension displays a braille spinner animation in the terminal title bar while the agent is working. - ›Adds
PI_AI_ANTIGRAVITY_VERSIONenvironment variable to the help text for easier version management.
- ›New
- v0.50.8
Pi v0.50.8 adds threaded session picker, keybindable fork/tree/new commands, retry cap, Qwen OAuth, and new extension hooks.
└──▷ GET THIS VERSION$ git clone --branch v0.50.8 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.50.8
- ›Adds
newSession,tree, andforkkeybinding actions for/new,/tree, and/forkcommands (unbound by default). - ›New
retry.maxDelayMssetting caps how long Pi will wait on server-requested retry delays — requests exceeding the cap fail immediately with an informative error instead of hanging silently (default: 60 000 ms). - ›Adds 'Threaded' sort mode to the
/resumesession picker (now default), displaying sessions as a tree based on fork relationships with compact one-line format showing message count and age. - ›Adds Qwen CLI OAuth provider extension example and
modifyModelshook support for extension-registered providers at registration time. - ›Supports Qwen thinking format for OpenAI-compatible completions via
enable_thinking.
+2 moreshow less
- ›Adds
resources_discoverextension hook to supply additional skills, prompts, and themes on startup and reload. - ›Adds sticky column tracking so the editor restores the preferred column when vertically navigating across short lines.
- ›Adds
- v0.50.6
Pi v0.50.6 adds ctx.getSystemPrompt() for extensions to read the active system prompt.
└──▷ GET THIS VERSION$ git clone --branch v0.50.6 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.50.6
└──▷ USE ITInspect or branch logic in an extension based on the active system prompt.const prompt = ctx.getSystemPrompt();
- ›Adds ctx.getSystemPrompt() to the extension context API, enabling extensions to access the current effective system prompt at runtime.
- v0.50.4
Pi v0.50.4 adds OSC 52 clipboard over SSH, Vercel AI Gateway routing, new RPC command, and richer editor navigation.
└──▷ GET THIS VERSION$ git clone --branch v0.50.4 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.50.4
└──▷ TRY ITCopy output to the local clipboard from an SSH or mosh session without clipboard frustration.$ /copy- ›Enables
/copyto work over SSH and mosh sessions via OSC 52 terminal escape sequence. - ›Adds Vercel AI Gateway routing with provider failover and load balancing, configured via
vercelGatewayRoutingin models.json. - ›New
set_session_nameRPC command lets headless clients set the session display name programmatically. - ›Adds Bash/Readline-style character jump navigation: Ctrl+] forward, Ctrl+Alt+] backward.
- ›Adds Emacs-style Ctrl+B / Ctrl+F keybindings for word-level cursor navigation in the editor.
+2 moreshow less
- ›Editor now jumps to line start on Up at the first visual line, and line end on Down at the last visual line.
- ›New
"none"option fordoubleEscapeActionsetting completely disables the double-escape shortcut.
- ›Enables
- v0.50.3
Pi v0.50.3 adds Kimi For Coding (Moonshot AI) as a new provider via
KIMI_API_KEY.└──▷ GET THIS VERSION$ git clone --branch v0.50.3 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.50.3
- ›Adds Kimi For Coding provider, enabling access to Moonshot AI's Anthropic-compatible coding API via the
KIMI_API_KEYenvironment variable.
- ›Adds Kimi For Coding provider, enabling access to Moonshot AI's Anthropic-compatible coding API via the
- v0.50.2
Pi v0.50.2 adds Hugging Face provider, extended prompt caching,
/filescommand, shell keybindings, and RPC get_commands.└──▷ GET THIS VERSION$ git clone --branch v0.50.2 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.50.2
└──▷ TRY ITUse a Hugging Face model in place of another provider without changing your workflow.$ HF_TOKEN=hf_xxxxxxxxxxxx piEnable 24-hour prompt cache retention for OpenAI to reduce token costs on long, repeated context.$ PI_CACHE_RETENTION=long piAudit every file the AI has touched in the current session before committing changes.$ /files- ›Adds Hugging Face provider via OpenAI-compatible Inference Router — set
HF_TOKENto access HF models. - ›New
PI_CACHE_RETENTION=longenv var enables 1-hour prompt caching for Anthropic and 24-hour for OpenAI, vs. short in-memory defaults. - ›New
/filescommand lists all file operations (read, write, edit) performed in the current session. - ›Adds shell-style keybindings:
alt+b/alt+ffor word navigation andctrl+dfor forward character delete. - ›New
autocompleteMaxVisiblesetting (3–20 items, default 5) controls autocomplete dropdown height via/settingsorsettings.json.
+1 moreshow less
- ›New
get_commandsRPC method lets headless clients programmatically list available commands.
- ›Adds Hugging Face provider via OpenAI-compatible Inference Router — set
- v0.50.0
Pi v0.50.0 adds package management, custom providers, Azure OpenAI Responses, hot reload, and a new
--verboseflag.└──▷ GET THIS VERSION$ git clone --branch v0.50.0 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.50.0
└──▷ TRY ITReload all skills, themes, and extensions mid-session after editing them on disk.$ /reloadStart Pi with full startup diagnostics visible, overriding a quiet-startup config.$ pi --verbose
- ›New
pi install,pi remove,pi update, andpi listcommands for managing extension packages (npm/git sources). - ›New
pi configTUI command to enable/disable package and top-level resources via glob patterns. - ›New
/reloadcommand for hot-reloading extensions, skills, prompts, themes, and context files without restarting. - ›Custom provider registration via pi.registerProvider() for proxies, OAuth/SSO flows, and non-standard streaming APIs.
- ›Adds
azure-openai-responsesprovider supporting the Azure OpenAI Responses API with deployment-aware model mapping.
+12 moreshow less
- ›Adds OpenRouter routing support for custom models via the
openRouterRoutingfield in model config. - ›New
--verboseCLI flag to override thequietStartupsetting and show full startup output. - ›New CLI flags
--skill,--prompt-template,--theme,--no-prompt-templates, and--no-themesfor resource selection at launch. - ›Skill invocation messages are now collapsible in chat output, shown collapsed by default.
- ›Header values in
models.jsonnow support environment variable and shell command resolution, matchingapiKeybehavior. - ›Glob pattern support (minimatch) in package filters, top-level settings arrays, and pi manifests.
- ›New
markdown.codeBlockIndentsetting to customize code block indentation in rendered output. - ›HTTP proxy environment variable support for all API requests.
- ›Session renaming directly from the
/resumepicker via Ctrl+R. - ›Session selector keybindings are now fully configurable.
- ›Footer now shows the active provider alongside the model when multiple providers are available.
- ›Exposes
copyToClipboardutility for use by extensions.
└──▷ BREAKING ON UPGRADE- !Header values in
models.jsonnow resolve environment variables: if a literal header value matches an env var name, the env var's value is used instead, which may change behavior for existing configs. - !External packages (npm/git) are now configured via the
packagesarray insettings.jsoninstead ofextensions; existingnpm:/git:entries inextensionsare auto-migrated. - !Resource loading now uses
ResourceLoaderonly andsettings.jsonuses arrays forextensions,skills,prompts, andthemes. - !
discoverAuthStorageanddiscoverModelsare removed from the SDK;AuthStorageandModelRegistrynow default to~/.pi/agentpaths unless you pass anagentDir. - !The
/resumepicker sort toggle is moved from Ctrl+R to Ctrl+S (freeing Ctrl+R for session rename).
- ›New
- v0.49.3
Pi v0.49.3 adds inline bash expansion, AI image-gen extension, custom share viewer URLs, and a new word-delete hotkey.
└──▷ GET THIS VERSION$ git clone --branch v0.49.3 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.49.3
└──▷ TRY ITRun an inline shell command inside a prompt without leaving Pi — useful for injecting dynamic values like timestamps or file contents.$ # In a Pi prompt, type: Summarize this file: !{cat README.md}- ›New
markdown.codeBlockIndentsetting to customize code block indentation in rendered output. - ›New
inline-bash.tsexample extension that expands!{command}patterns inline within prompts. - ›New
antigravity-image-gen.tsexample extension for AI image generation via Google Antigravity. - ›New
PI_SHARE_VIEWER_URLenvironment variable to point Pi at a custom share viewer URL. - ›Adds Alt+Delete hotkey for deleting a word forwards in the editor.
└──▷ BREAKING ON UPGRADE- !The tree selector label filter shortcut is changed from
lto Shift+L; any workflow or muscle-memory relying onlto filter labels will now need to use Shift+L.
- ›New
- v0.49.2
Pi v0.49.2 adds AWS container credential detection, quiet startup, and richer HTML exports with JSONL download.
└──▷ GET THIS VERSION$ git clone --branch v0.49.2 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.49.2
- ›Supports AWS credential detection for ECS/Kubernetes environments via
AWS_CONTAINER_CREDENTIALS_RELATIVE_URI,AWS_CONTAINER_CREDENTIALS_FULL_URI, andAWS_WEB_IDENTITY_TOKEN_FILE. - ›Adds 'quiet startup' setting configurable via
/settings. - ›HTML exports now include a JSONL download button and jump-to-last-message navigation.
- ›Adds
widgetPlacementoption in pi.addWidget() for controlling extension widget placement.
└──▷ BREAKING ON UPGRADE- !The
strictResponsesPairingcompat option has been removed from the models.json schema.
- ›Supports AWS credential detection for ECS/Kubernetes environments via
- v0.49.1
Pi v0.49.1 adds undo in interactive mode, richer session management, shell-command API key retrieval, and Azure Responses pairing support.
└──▷ GET THIS VERSION$ git clone --branch v0.49.1 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.49.1
└──▷ USE ITPull an API key from macOS Keychain instead of storing it in plaintext in models.json."apiKey": "!security find-generic-password -ws 'anthropic'"
Undo the last action while working in interactive mode without leaving the session.📍Ctrl+-While reviewing past sessions in/resume, toggle full path display or delete a session without leaving the selector.$ Ctrl+P # toggle path display Ctrl+D # delete selected session (with inline confirmation)- ›Adds
strictResponsesPairingcompat option for custom OpenAI Responses models on Azure. - ›Session selector (
/resume) gains path display toggle (Ctrl+P) and inline session deletion (Ctrl+D). - ›Adds undo support in interactive mode via Ctrl+- hotkey.
- ›API keys in
models.jsoncan now be sourced from shell commands using the!prefix, enabling integration with system keychains (e.g., macOS Keychain). - ›Share URLs now use hash fragments (
#) instead of query strings, keeping session IDs out of server logs.
- ›Adds
- v0.49.0
Pi v0.49.0 adds Emacs-style kill ring editing, per-entry labels via ExtensionAPI, and programmatic context compaction.
└──▷ GET THIS VERSION$ git clone --branch v0.49.0 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.49.0
└──▷ TRY ITTag a specific conversation entry with a label from within a Pi extension.$ pi.setLabel(entryId, "high-priority")Check remaining context budget and trigger compaction before it fills, from an extension.$ const usage = ctx.getContextUsage(); if (usage.used / usage.total > 0.8) { await ctx.compact(); }- ›Adds pi.setLabel(entryId, label) to the ExtensionAPI for setting per-entry labels programmatically from extensions.
- ›Exports
keyHint,appKeyHint,editorKey,appKey, andrawKeyHintso extensions can format keybinding hints consistently. - ›Adds
showHardwareCursorsetting to control cursor visibility while retaining IME positioning support. - ›Adds Emacs-style kill ring editing with yank, yank-pop, Alt+letter handling, and Alt+D delete-word-forward in the interactive editor.
- ›Adds ctx.compact() and ctx.getContextUsage() to extension contexts for programmatic compaction and context-usage inspection.
+1 moreshow less
- ›Exports
VERSIONfrom the package index for use in extensions and custom headers.
└──▷ BREAKING ON UPGRADE- !The
pi-internal://path resolution has been removed from the read tool — any extension or workflow relying onpi-internal://URIs will break.
- v0.48.0
Pi v0.48.0 adds shell alias support, extension argument completions, and bash-style prompt template slicing
└──▷ GET THIS VERSION$ git clone --branch v0.48.0 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.48.0
└──▷ USE ITSilence startup banner output for a cleaner experience when piping Pi into scripts or using it in CI# In your Pi config: "quietStartup": true
Provide tab-completions for custom extension command arguments to speed up practitioner workflowspi.registerCommand({ name: "scan", getArgumentCompletions: async (args) => ["--target", "--profile", "--output"], execute: async (args) => { /* ... */ } });- ›New
quietStartupsetting silences the version header, loaded context info, and model scope line on startup - ›New
shellCommandPrefixsetting prepends a command to every bash execution, enabling alias expansion in non-interactive shells - ›New
editorPaddingXsetting controls horizontal padding (0–3) in the input editor - ›Extension commands can now expose argument auto-completions via
getArgumentCompletionsin pi.registerCommand() - ›Exports
getShellConfigso extensions can detect and respond to the user's shell environment
+4 moreshow less
- ›Adds bash-style argument slicing for prompt templates
- ›Bash tool now displays the configured timeout value in the UI when a timeout is set
- ›navigateTree() gains
replaceInstructionsoption to override the default summarization prompt, and alabeloption to tag branch summary entries - ›Adds
thinkingTextandselectedBgfields to the theme schema
└──▷ BREAKING ON UPGRADE- !Hardware cursor is now disabled by default; the previous opt-out env var
PI_NO_HARDWARE_CURSOR=1is replaced byPI_HARDWARE_CURSOR=1to opt in.
- ›New
- v0.47.0
Pi v0.47.0 adds OpenAI Codex support, an extension input-intercept event, and Tree mode filter shortcuts.
└──▷ GET THIS VERSION$ git clone --branch v0.47.0 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.47.0
└──▷ TRY ITRun Pi against OpenAI's Codex models for allowlisted environments with prompt caching across turns.$ OPENAI_API_KEY=<your-key> pi --provider openai-codex 'Review this file for hardcoded credentials' src/config.ts
- ›Adds OpenAI Codex provider support (
gpt-5.1,gpt-5.2,gpt-5.1-codex-mini,gpt-5.2-codex) with prompt caching via session ID and reasoning signature retention across turns — enable with--provider openai-codex. - ›New
pi-internal://URL scheme in the read tool lets the model access internal coding-agent documentation, READMEs, and examples directly. - ›New
inputevent in the extension system allows intercepting, transforming, or fully handling user input before the agent processes it, with result typescontinue,transform, andhandled. - ›Adds
input-transform.tsextension example demonstrating input interception patterns including quick mode, instant commands, and source routing. - ›Custom tool HTML export: extensions implementing
renderCall/renderResultnow render with ANSI-to-HTML color conversion in/shareand/exportoutput.
+2 moreshow less
- ›Direct filter shortcuts in Tree mode: Ctrl+D (default), Ctrl+T (no-tools), Ctrl+U (user-only), Ctrl+L (labeled-only), Ctrl+A (all).
- ›Skill commands (
/skill:name) now expand in AgentSession, enabling their use in RPC and print modes and allowing theinputevent to intercept them before expansion.
└──▷ BREAKING ON UPGRADE- !Extensions using Editor directly must now pass
TUIas the first constructor argument: new Editor(tui, theme). Thetuiparameter is available in extension factory functions.
- ›Adds OpenAI Codex provider support (
- v0.46.0
Pi v0.46.0 adds MiniMax China provider, fuzzy edit matching,
APPEND_SYSTEM.md support, and enhanced session search.└──▷ GET THIS VERSION$ git clone --branch v0.46.0 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.46.0
└──▷ TRY ITSearch past sessions by regex pattern to quickly locate a specific investigation, or press Ctrl+R to switch to most-recent ordering.$ # In the session picker, type: re:CVE-2024-\d+ to filter sessions by regex, or Ctrl+R to toggle sort mode- ›Adds
APPEND_SYSTEM.mdsupport to append custom instructions to the system prompt without modifying the base prompt. - ›Edit tool now uses fuzzy matching as fallback, tolerating trailing whitespace, smart quotes, Unicode dashes, and special spaces.
- ›Session picker search gains Ctrl+R to toggle between fuzzy and most-recent sorting, plus quoted phrase matching and
re:regex mode. - ›Adds MiniMax China (
minimax-cn) as a new provider. - ›Adds
gpt-5.2-codexmodel support for GitHub Copilot and OpenCode Zen providers.
+2 moreshow less
- ›Exports
getAgentDirfor use in extensions. - ›Shows loaded prompt templates on startup for visibility into active configuration.
- ›Adds
- v0.45.4
Pi v0.45.4 adds Vercel AI Gateway provider support and new extension examples for custom UI workflows.
└──▷ GET THIS VERSION$ git clone --branch v0.45.4 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.45.4
└──▷ TRY ITRoute requests through the Vercel AI Gateway instead of a direct provider — useful when centralizing auth or rate-limiting across teams.$ AI_GATEWAY_API_KEY=<your-key> pi --provider vercel-ai-gateway
- ›Adds experimental Vercel AI Gateway provider support via
--provider vercel-ai-gatewayandAI_GATEWAY_API_KEYenvironment variable. - ›New
summarize.tsextension example for summarizing conversations using custom UI and an external model. - ›New
questionnaire.tsextension example for multi-question input with tab bar navigation. - ›Enhanced
plan-mode/extension example with explicit step tracking and a progress widget. - ›Switches image processing from
sharptowasm-vips, eliminating native build requirements.
- ›Adds experimental Vercel AI Gateway provider support via
- v0.45.0
Pi v0.45.0 adds MiniMax and Amazon Bedrock providers, model reordering in
/scoped-models, and a bash sandbox extension example.└──▷ GET THIS VERSION$ git clone --branch v0.45.0 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.45.0
- ›Adds MiniMax provider support via
MINIMAX_API_KEYenvironment variable andminimax/MiniMax-M2.1model identifier. - ›Adds Amazon Bedrock provider support (experimental, tested with Anthropic Claude models) as a new LLM backend.
- ›Enables Alt+Up/Down reordering of enabled models in
/scoped-models; order persists on Ctrl+S save and controls Ctrl+P cycling sequence. - ›Adds
sandbox/extension example demonstrating OS-level bash sandboxing via@anthropic-ai/sandbox-runtimewith per-project configuration.
- ›Adds MiniMax provider support via
- v0.44.0
Pi v0.44.0 adds session naming, fuzzy settings search, and page-jump navigation in the session selector.
└──▷ GET THIS VERSION$ git clone --branch v0.44.0 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.44.0
└──▷ TRY ITGive the current session a meaningful name so forked sessions are easy to tell apart in the session selector.$ /name threat-hunting-2024-q2- ›New
/name <name>command sets a display name for the current session in the session selector, useful for distinguishing forked sessions. - ›Extensions can programmatically get and set session names via new pi.setSessionName() and pi.getSessionName() APIs.
- ›New
notify.tsextension example demonstrates desktop notifications via the OSC 777 escape sequence. - ›Page-up/down navigation in
/resumesession selector jumps by 5 items at a time. - ›Fuzzy search in
/settingsmenu lets you type to filter settings by label.
└──▷ BREAKING ON UPGRADE- !pi.getAllTools() now returns
ToolInfo[](withnameanddescription) instead ofstring[]; extensions that only need names must use .map(t => t.name).
- ›New
- v0.43.0
Pi v0.43.0 adds
/scoped-modelscycling, skill slash commands with fuzzy autocomplete, and new extension hooks for model changes and custom working messages.└──▷ GET THIS VERSION$ git clone --branch v0.43.0 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.43.0
└──▷ TRY ITRestrict Ctrl+P model cycling to only your preferred models for the current session, then persist the selection.$ /scoped-modelsInvoke a loaded skill directly from the command line using its registered slash command, with fuzzy matching if you forget the full name.$ /skill:brave-search what CVEs were published this week?Show a custom status message in the UI while your extension is doing async work during streaming.$ ctx.ui.setWorkingMessage("Fetching threat intel...");- ›New
/scoped-modelscommand lets you enable/disable models for Ctrl+P cycling; use Ctrl+S to persist choices to settings.json. - ›Loaded skills are now registered as
/skill:nameslash commands for quick access; toggle via/settingsorskills.enableSkillCommands. - ›Slash command autocomplete now uses fuzzy matching (e.g.,
/skbramatches/skill:brave-search). - ›New
model_selectextension hook fires on model changes (via/model, cycling, or session restore) withsourceandpreviousModelfields. - ›New ctx.ui.setWorkingMessage() extension API lets extensions customize the 'Working...' message during streaming.
+5 moreshow less
- ›New
SessionInfo.cwdfield exposes a session's working directory;/resumeAll view now displays session cwd with loading progress. - ›SessionManager.list() and SessionManager.listAll() now accept an optional
onProgresscallback for progress updates. - ›New
SessionListProgresstype export for use with progress callbacks. - ›
/treebranch summarization now offers three options: 'No summary', 'Summarize', and 'Summarize with custom prompt'; custom prompts are appended to default summarization instructions. - ›Tab in the
/resumeselector toggles between current-folder and all sessions.
└──▷ BREAKING ON UPGRADE- !The
/branchcommand is renamed to/fork; RPCbranch→forkandget_branch_messages→get_fork_messages; SDK branch() → fork() and getBranchMessages() → getForkMessages(); AgentSession branch() → fork() and getUserMessagesForBranching() → getUserMessagesForForking(); extension eventssession_before_branch→session_before_forkandsession_branch→session_fork; settings valuedoubleEscapeAction: "branch"→"fork". - !Extension editor (ctx.ui.editor()) submit key changed from Ctrl+Enter to Enter (Shift+Enter now inserts newlines); extensions with hardcoded "ctrl+enter" hints need updating.
- !SessionManager.list() and SessionManager.listAll() are now async, returning
Promise<SessionInfo[]>; all callers must be updated to await them.
- ›New
- v0.42.2
Pi v0.42.2 adds smarter model switching, a custom footer API, and a hotkey to recover queued messages.
└──▷ GET THIS VERSION$ git clone --branch v0.42.2 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.42.2
└──▷ TRY ITJump directly to a specific provider's model when multiple providers offer the same model name.$ /model openai/gpt-4- ›Adds pre-filtering and exact-match auto-selection to
/model <search>, withprovider/modelsyntax (e.g.,/model openai/gpt-4) to disambiguate across providers. - ›Introduces
FooterDataProviderAPI: ctx.ui.setFooter() gains a thirdfooterDataparameter exposing getGitBranch(), getExtensionStatuses(), and onBranchChange() for reactive custom footers. - ›Adds Alt+Up hotkey to restore queued steering or follow-up messages back into the editor without aborting the current run.
- ›Adds pre-filtering and exact-match auto-selection to
- v0.39.0
Pi v0.39.0 adds remote SSH tool execution,
--no-toolsflag, Wayland clipboard, and runtime theme switching for extensions.└──▷ GET THIS VERSION$ git clone --branch v0.39.0 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.39.0
└──▷ TRY ITStrip all built-in tools from a session so only your extension-provided tools are available — useful for tightly scoped, extension-only workflows.$ pi --no-tools
- ›Adds
--no-toolsflag to disable all built-in tools, enabling pure extension-defined tool setups. - ›Adds pluggable operations interfaces (
ReadOperations,WriteOperations,BashOperations,GrepOperations, etc.) for routing built-in tool calls over SSH or other transports. - ›Adds
user_bashevent so extensions can intercept and redirect user!/!!shell commands to remote systems. - ›Adds setActiveTools() to ExtensionAPI for dynamically managing the active tool set at runtime.
- ›Adds ctx.ui.getAllThemes(), ctx.ui.getTheme(name), and ctx.ui.setTheme(name | Theme) for extensions to list, load, and switch themes at runtime.
+5 moreshow less
- ›Adds Wayland clipboard support for the
/copycommand via wl-copy with xclip/xsel fallback. - ›Adds experimental
{ overlay: true }option to ctx.ui.custom() for floating modal components that composite over existing content without clearing the screen. - ›Adds
AgentSession.skillsandAgentSession.skillWarningsproperties to access loaded skills and warnings without re-running discovery. - ›Ships
ssh.tsexample extension for remote tool execution via--ssh user@host:/path. - ›Ships
interactive-shell.tsexample for running interactive commands (vim, git rebase, htop) with full terminal access via!iprefix or auto-detection.
└──▷ BREAKING ON UPGRADE- !The
before_agent_startevent now receivessystemPromptin the event object and must returnsystemPrompt(full replacement) instead ofsystemPromptAppend; extensions that were appending must now use theevent.systemPrompt + extrapattern. - !discoverSkills() now returns
{ skills: Skill[], warnings: SkillWarning[] }instead ofSkill[]; callers that destructured or iterated the return value directly will break.
- ›Adds
- v0.38.0
Pi v0.38.0 adds
--no-extensions, async extension factories, UI dialog timeouts, custom editor components, and graceful shutdown control.└──▷ GET THIS VERSION$ git clone --branch v0.38.0 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.38.0
└──▷ TRY ITRun pi without scanning for extensions automatically, but still load a specific trusted extension by path.$ pi --no-extensions -e ./extensions/my-tool.ts
Suppress the startup version-check banner in automated or CI pipelines.$ PI_SKIP_VERSION_CHECK=1 pi 'summarize the latest alerts'Customize token budgets per thinking level for a token-based provider in settings.{ "thinkingBudgets": { "low": 1024, "medium": 8192, "high": 32768 } }- ›Adds
--no-extensionsflag to disable auto-discovery of extensions while still loading explicit-epaths. - ›Adds
PI_SKIP_VERSION_CHECKenvironment variable to suppress startup version-update notifications. - ›Adds
thinkingBudgetssetting to customize per-level token budgets for token-based providers. - ›Extension UI dialogs (ctx.ui.select(), ctx.ui.confirm(), ctx.ui.input()) now support a
timeoutoption with live countdown display. - ›Extensions can now provide custom editor components via ctx.ui.setEditorComponent().
+3 moreshow less
- ›Extension factories can now be async, enabling dynamic imports and lazy-loaded dependencies.
- ›Adds ctx.shutdown() to extension contexts for requesting graceful shutdown, with mode-aware deferral (idle in interactive, post-response in RPC, no-op in print).
- ›SDK exports
InteractiveMode, runPrintMode(), and runRpcMode() for building custom run modes.
└──▷ BREAKING ON UPGRADE- !ctx.ui.custom() factory signature changed from (tui, theme, done) to (tui, theme, keybindings, done); custom components must add the new
keybindingsparameter. - !
LoadedExtensiontype renamed to Extension; code referencingLoadedExtensionwill fail to compile. - !LoadExtensionsResult.setUIContext() removed; replace with the
runtime: ExtensionRuntimefield. - !
ExtensionRunnerconstructor now requiresruntime: ExtensionRuntimeas a second parameter. - !ExtensionRunner.initialize() signature changed from an options object to positional params (actions, contextActions, commandContextActions?, uiContext?).
- !ExtensionRunner.getHasUI() renamed to hasUI(); calls to getHasUI() will break.
- !OpenAI Codex model aliases
gpt-5,gpt-5-mini,gpt-5-nano, andcodex-mini-latestremoved; replace with canonical IDsgpt-5.1,gpt-5.1-codex-mini,gpt-5.2, orgpt-5.2-codex.
- ›Adds
- v0.37.6
Extension UI dialogs gain AbortSignal support for programmatic timeouts; HTML export improves Codex session visibility.
└──▷ GET THIS VERSION$ git clone --branch v0.37.6 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.37.6
└──▷ USE ITAuto-dismiss a confirmation dialog after a timeout so an unattended extension doesn't hang indefinitely.const ac = new AbortController(); setTimeout(() => ac.abort(), 5000); const confirmed = await ctx.ui.confirm("Proceed?", { signal: ac.signal });- ›Adds optional
AbortSignalparameter to ctx.ui.select(), ctx.ui.confirm(), and ctx.ui.input() extension dialogs, enabling programmatic dismissal and timeout patterns. - ›HTML export now includes bridge prompts in model change messages for Codex sessions.
- ›Adds optional
- v0.37.5
Pi v0.37.5 adds runtime model/thinking controls, exported truncation utilities, and a full UI component library for extensions.
└──▷ GET THIS VERSION$ git clone --branch v0.37.5 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.37.5
└──▷ USE ITCap tool output to a safe byte budget before returning it, preventing context blowout on large command output.import { truncateTail, DEFAULT_MAX_BYTES } from "pi/tools"; const raw = await runShellCommand(cmd); return truncateTail(raw, { maxBytes: DEFAULT_MAX_BYTES });- ›Adds setModel(), getThinkingLevel(), and setThinkingLevel() ExtensionAPI methods so extensions can switch model and thinking level at runtime.
- ›Exports truncation utilities (
truncateHead,truncateTail,truncateLine,formatSize,DEFAULT_MAX_BYTES,DEFAULT_MAX_LINES,TruncationOptions,TruncationResult) for use in custom tools. - ›Exports the full suite of built-in UI components (
ArminComponent,AssistantMessageComponent,BashExecutionComponent,BorderedLoader, and 20+ more) plus utilitiesrenderDiffandtruncateToVisualLinesfor extension developers. - ›New
truncated-tool.tsexample demonstrating output truncation with custom rendering for extensions. - ›New
preset.tsexample demonstrating preset configurations with model, thinking, and tools switching.
+1 moreshow less
- ›New Common Patterns and Key Rules sections in
docs/tui.mdwith copy-paste code forSelectList,BorderedLoader,SettingsList,setStatus,setWidget, andsetFooter.
- v0.37.0
Pi v0.37.0 adds headless OAuth over SSH, per-message shareable URLs, and a claude-rules extension example.
└──▷ GET THIS VERSION$ git clone --branch v0.37.0 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.37.0
- ›Adds headless OAuth login with paste-based URL/code entry, enabling authentication over SSH sessions without a DISPLAY environment variable.
- ›Adds copy-link button in the share viewer to generate URLs that navigate directly to a specific message.
- ›Adds
claude-rulesextension example that loads.claude/rules/entries into the system prompt. - ›OpenAI Codex provider now sets thinking level separately from model selection, with the provider clamping to each model's supported range.
└──▷ BREAKING ON UPGRADE- !OpenAI Codex per-thinking-level model variants have been removed; thinking level must now be set separately.
- v0.36.0
Pi v0.36.0 adds experimental OpenAI Codex OAuth so ChatGPT Plus/Pro subscribers can access Codex models without a separate API key.
└──▷ GET THIS VERSION$ git clone --branch v0.36.0 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.36.0
└──▷ TRY ITAuthenticate as a ChatGPT Plus/Pro subscriber to access Codex models without a standalone API key.$ /login openai-codex- ›Adds experimental OpenAI Codex OAuth provider, letting ChatGPT Plus/Pro subscribers authenticate and use Codex models via
/login openai-codex.
- ›Adds experimental OpenAI Codex OAuth provider, letting ChatGPT Plus/Pro subscribers authenticate and use Codex models via
- v0.35.0
Pi v0.35.0 unifies hooks and custom tools into a single extensions system with a richer API and renames slash commands to prompt templates.
└──▷ GET THIS VERSION$ git clone --branch v0.35.0 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.35.0
└──▷ TRY ITLoad a safety-check extension and a custom todo tool in one flag instead of separate--hook/--toolflags.$ pi --extension ./safety.ts -e ./todo.ts
Publish a multi-file extension as an npm package by declaring entry points in its package.json pi field.{ "name": "my-extension-package", "dependencies": { "zod": "^3.0.0" }, "pi": { "extensions": ["./src/main.ts", "./src/tools.ts"] } }- ›Introduces unified extensions system — hooks and custom tools are now a single concept discovered from
extensions/directories, configured via one--extension/-eflag and oneextensionskey in settings.json. - ›Extensions now support npm package.json manifests with declared entry points and dependencies (resolved via jiti), enabling extensions to be published to and installed from npm.
- ›Custom tools registered via pi.registerTool() now receive the same full
ctxobject as event handlers, giving them access to UI prompts, session management, and all other context capabilities. - ›New extension API surface: pi.registerCommand(), pi.registerShortcut(), pi.registerFlag(), pi.registerMessageRenderer(), pi.appendEntry(), pi.getActiveTools() / pi.setActiveTools(), pi.getAllTools(),
pi.eventsevent bus for cross-extension communication. - ›New UI API: ctx.ui.setStatus() (persistent per-extension footer status), ctx.ui.setWidget() (widget above editor), ctx.ui.setTitle() (terminal window title), ctx.ui.custom() (full TUI component with keyboard handling), ctx.ui.editor() (multi-line editor with external editor support).
+2 moreshow less
- ›Renames 'slash commands' to 'prompt templates';
commands/directories are auto-migrated toprompts/on startup. - ›Session format bumped to version 3; existing sessions are automatically migrated on first load (message role
hookMessage→custom).
└──▷ BREAKING ON UPGRADE- !The
hooksandcustomToolsarrays in settings.json are replaced by a singleextensionsarray; existing configs must be updated manually. - !The
--hookand--toolCLI flags are replaced by--extension/-e; invocations using the old flags will break. - !Extension source files must be moved from
hooks/andtools/directories toextensions/; deprecation warnings are shown on startup but old paths are not auto-migrated. - !SDK:
HookAPI,HookContext,HookCommandContext,HookUIContext,CustomToolAPI,CustomToolContext,CustomToolUIContext,CustomTool,CustomToolFactory,HookMessagetypes are renamed — existing TypeScript extensions will fail to compile without updates. - !SDK: discoverAndLoadHooks(), discoverAndLoadCustomTools(), loadHooks(), loadCustomTools() are replaced by discoverAndLoadExtensions() and loadExtensions().
- !SDK:
HookRunneris renamed toExtensionRunner; wrapToolsWithHooks() / wrapToolWithHooks() are renamed to wrapToolsWithExtensions() / wrapToolWithExtensions(). - !SDK
CreateAgentSessionOptions:.hooksis removed;.additionalHookPaths→.additionalExtensionPaths;.preloadedHooks→.preloadedExtensions;.customToolstype changed fromArray<{ path?; tool: CustomTool }>toToolDefinition[];.additionalCustomToolPathsmerged into.additionalExtensionPaths;.slashCommands→.promptTemplates. - !SDK
AgentSession:.hookRunner→.extensionRunner;.fileCommands→.promptTemplates; .sendHookMessage() → .sendCustomMessage(). - !SDK:
FileSlashCommand,LoadSlashCommandsOptionstypes and discoverSlashCommands(), loadSlashCommands(), expandSlashCommand(), getCommandsDir() functions are renamed; callers must update imports. - !Session files with message role
hookMessageare migrated tocustomon first load under the new session version 3 format.
- ›Introduces unified extensions system — hooks and custom tools are now a single concept discovered from
- v0.34.1
Pi v0.34.1 adds a Hook API method to dynamically set the terminal window/tab title from hooks.
└──▷ GET THIS VERSION$ git clone --branch v0.34.1 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.34.1
└──▷ TRY ITUpdate the terminal tab title from a hook to reflect the current task or context at a glance.$ ctx.ui.setTitle("My Custom Title")- ›New Hook API method ctx.ui.setTitle(title) lets hooks dynamically set the terminal window or tab title.
- v0.34.0
Pi v0.34.0 adds dynamic system prompt injection, multi-message hook returns, and runtime tool toggling via hooks.
└──▷ GET THIS VERSION$ git clone --branch v0.34.0 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.34.0
└──▷ TRY ITRestrict the agent to safe read-only tools at startup, then let a hook re-enable bash mid-session based on user confirmation.$ pi --tools read,grep,find,ls # Inside a hook, after user confirms: # pi.setActiveTools(['read', 'grep', 'find', 'ls', 'bash'])
- ›Enables
before_agent_starthook handlers to returnsystemPromptAppendto dynamically inject text into the system prompt per turn; multiple hooks' appends are concatenated. - ›Allows
before_agent_starthandlers to return and inject multiple messages in a single turn, not just the first. - ›Expands the tool registry to include all built-in tools (
read,bash,edit,write,grep,find,ls) even when--toolsrestricts the initially active set, letting hooks enable any registered tool via pi.setActiveTools(). - ›Automatically rebuilds the system prompt — including tool descriptions and guidelines — whenever the active tool set changes via setActiveTools().
- ›Adds example hook
tools.tsproviding an interactive/toolscommand to enable/disable tools with session persistence.
+2 moreshow less
- ›Adds example hook
pirate.tsdemonstratingsystemPromptAppendto alter agent persona at runtime. - ›Displays full stack traces for hook errors to aid debugging.
- ›Enables
- v0.33.0
Pi v0.33.0 adds clipboard image paste, configurable keybindings, and clean-exit slash commands.
└──▷ GET THIS VERSION$ git clone --branch v0.33.0 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.33.0
└──▷ TRY ITExit cleanly after a session, ensuring all hook and tool cleanup handlers finish before the process terminates.$ /quit- ›Supports pasting clipboard images via Ctrl+V — images are saved to a temp file and attached to the message (macOS, Windows, Linux/X11).
- ›Adds configurable keybindings via
~/.pi/agent/keybindings.json, covering editor navigation, deletion, and app actions like model cycling, with support for multiple bindings per action. - ›New
/quitand/exitslash commands exit the application gracefully, properly awaiting hook and custom tool cleanup handlers before terminating.
└──▷ BREAKING ON UPGRADE- !All isXxx() key detection functions (isEnter(), isEscape(), isCtrlC(), etc.) have been removed from
@mariozechner/pi-tui; replace them with matchesKey(data, keyId) (e.g., matchesKey(data, "enter"), matchesKey(data, "ctrl+c")). Hooks and custom tools using ctx.ui.custom() with keyboard input handling will break without this change.
- v0.32.2
Pi v0.32.2 adds $ARGUMENTS syntax for slash commands and enables slash/hook commands during streaming.
└──▷ GET THIS VERSION$ git clone --branch v0.32.2 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.32.2
└──▷ TRY ITUse the new $ARGUMENTS syntax in a custom slash command definition to match Claude/Codex-style templates.$ # In your slash command file: echo 'Summarise the following: $ARGUMENTS' > ~/.pi/commands/summarise.txt- ›Adds
$ARGUMENTSas an alternative to$@in custom slash commands, aligning with Claude, Codex, and OpenCode conventions — both syntaxes remain supported. - ›Slash commands and hook commands now work during agent streaming: hook commands execute immediately, file-based slash commands are queued via steer/followUp.
- ›New
streamingBehavioroption ("steer"or"followUp") on prompt() lets callers specify queuing behavior when the agent is mid-stream. - ›RPC
promptcommand now accepts an optionalstreamingBehaviorfield for remote streaming-state control.
- ›Adds
- v0.32.1
Pi v0.32.1 adds
!!commandsyntax to run shell commands hidden from LLM context.└──▷ GET THIS VERSION$ git clone --branch v0.32.1 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.32.1
└──▷ TRY ITRun a command containing secrets or sensitive output without exposing it to the LLM's context window.$ !!cat ~/.aws/credentials- ›New
!!commandsyntax executes bash commands that appear in the TUI and session history but are excluded from LLM context, keeping sensitive commands private from the AI.
- ›New
- v0.32.0
Pi v0.32.0 adds Vertex AI support, proxy overrides in models.json, auto image resizing, and splits message delivery into steer/followUp APIs.
└──▷ GET THIS VERSION$ git clone --branch v0.32.0 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.32.0
└──▷ USE ITProxy a built-in provider through an internal gateway without losing its model list, by overriding onlybaseUrlin models.json.{ "providers": { "openai": { "baseUrl": "https://my-internal-gateway.example.com/openai" } } }Enable automatic image resizing so large screenshots are down-sampled before being sent to the model, reducing token usage.{ "images": { "autoResize": true } }- ›Adds steer(text) and followUp(text) methods to
AgentSession, replacing queueMessage(), with distinct delivery semantics:steerinterrupts mid-run,followUpwaits until the agent finishes. - ›Adds
steeringModeandfollowUpModesettings tosettings.json, replacingqueueMode, with automatic migration of existing settings files. - ›Adds
deliverAs: "followUp"option to pi.sendMessage() second parameter (nowoptions?: { triggerTurn?, deliverAs? }), enabling follow-up delivery from hooks. - ›Adds
steerandfollow_upRPC commands,set_steering_modeandset_follow_up_modeRPC commands, andsteeringMode/followUpModefields onRpcSessionState, replacing the oldqueue_message/set_queue_modesurface. - ›Adds
doubleEscapeActionkey tosettings.json(also configurable via/settings) to choose whether double-escape with empty editor opens/tree(default) or/branch.
+6 moreshow less
- ›Adds
google-vertexprovider for accessing Gemini models via Google Cloud Vertex AI using Application Default Credentials. - ›Adds built-in provider overrides in
models.json: setbaseUrlto proxy a built-in provider while keeping its models, or definemodelsto fully replace the provider. - ›Adds
images.autoResizekey tosettings.json(also configurable via/settings) to automatically resize images larger than 2000x2000 and inject original dimensions into the prompt. - ›Adds Alt+Enter keybind to queue follow-up messages while the agent is streaming.
- ›Exports Theme and
ThemeColortypes for hooks using ctx.ui.custom(). - ›Terminal window title now displays 'pi - dirname' to identify which project session is active.
└──▷ BREAKING ON UPGRADE- !AgentSession.queueMessage() is removed; use steer() for mid-run interrupts or followUp() for post-run delivery.
- !
queueModegetter onAgentSessionis replaced bysteeringModeandfollowUpModegetters. - !setQueueMode() on
AgentSessionis replaced by setSteeringMode() and setFollowUpMode(). - !
queuedMessageCountonAgentSessionis renamed topendingMessageCount. - !getQueuedMessages() on
AgentSessionis replaced by getSteeringMessages() and getFollowUpMessages(). - !clearQueue() on
AgentSessionnow returns{ steering: string[], followUp: string[] }instead of a flat array. - !hasQueuedMessages() on
AgentSessionis renamed to hasPendingMessages(). - !pi.sendMessage() second parameter changed from
triggerTurn?: booleantooptions?: { triggerTurn?, deliverAs? }; callers passing a bare boolean must be updated. - !
queue_messageRPC command replaced bysteerandfollow_upcommands. - !
set_queue_modeRPC command replaced byset_steering_modeandset_follow_up_modecommands. - !
RpcSessionState.queueModefield replaced bysteeringModeandfollowUpModefields. - !The 'Queue mode' settings UI entry is split into 'Steering mode' and 'Follow-up mode'.
- ›Adds steer(text) and followUp(text) methods to
- v0.31.0
Pi v0.31.0 adds session trees with in-place branching, a restructured hooks/tools API, structured compaction with file tracking, and new UI commands.
└──▷ GET THIS VERSION$ git clone --branch v0.31.0 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.31.0
└──▷ USE ITDiscover available models and resolve an API key using the new ModelRegistry, replacing the old resolveApiKey callback pattern.import { discoverAuthStorage, discoverModels } from "@mariozechner/pi-coding-agent"; const authStorage = discoverAuthStorage(); // ~/.pi/agent/auth.json const modelRegistry = discoverModels(authStorage); // + ~/.pi/agent/models.json const model = modelRegistry.find("anthropic", "claude-sonnet-4-20250514"); const apiKey = await modelRegistry.getApiKey(model); const available = await modelRegistry.getAvailable();Register a custom slash command in a hook that waits for the agent to finish before branching from a chosen entry.pi.registerCommand("branch-here", { description: "Branch session from a specific entry", async handler(ctx) { await ctx.waitForIdle(); const entries = ctx.sessionManager.getBranch(); const target = entries[entries.length - 2]; // second-to-last entry await ctx.branch(target.id); } });- ›Sessions now use a tree structure with
id/parentIdfields, enabling in-place branching via the new/treecommand; existing sessions are auto-migrated from v1 to v2 on first load. - ›New
/treeinteractive navigator supports search, ←/→ paging, filter modes toggled with Ctrl+O (default → no-tools → user-only → labeled-only → all), andlto bookmark entries asLabelEntry. - ›New
/sharecommand uploads a session as a secret GitHub gist and returns a shareable URL via shittycodingagent.ai. - ›Adds
enabledModelskey tosettings.jsonas an allowlist for models, mirroring the--modelsCLI flag. - ›New
ModelRegistryclass (discoverModels,discoverAuthStorage) resolves model discovery and API key lookup from~/.pi/agent/auth.jsonand~/.pi/agent/models.json; exposed to hooks and tools viactx.modelRegistry.
+29 moreshow less
- ›Hooks API gains granular session events:
session_start,session_before_switch,session_switch(withreason: "new" | "resume"),session_before_branch,session_branch,session_before_compact,session_compact,session_shutdown,session_before_tree,session_tree,before_agent_start, andcontext. - ›New hook API method pi.sendMessage(message, triggerTurn?) replaces pi.send() and creates a
CustomMessageEntry. - ›New hook API method pi.appendEntry(customType, data?) for persisting hook state without exposing it to the LLM context.
- ›New hook API method pi.registerCommand(name, options) for registering custom slash commands whose handlers receive
HookCommandContext. - ›New hook API method pi.registerMessageRenderer(customType, renderer) for custom TUI rendering of hook entry types.
- ›New hook context methods available in all events: ctx.isIdle(), ctx.abort(), ctx.hasQueuedMessages().
- ›New UI helpers on
ctx.ui: editor(title, prefill?) for multi-line editing with Ctrl+G external editor support, custom(component) for full TUI component rendering, setStatus(key, text) for persistent footer status text, andthemegetter for theme-colored text. - ›New
HookCommandContext-onlymethods for slash commands: ctx.waitForIdle(), ctx.newSession(options?), ctx.branch(entryId), ctx.navigateTree(targetId, options?). - ›New
ctx.modelRegistryandctx.modelon hook context for API key resolution. - ›Custom tools
executesignature reordered to execute(toolCallId, params, onUpdate, ctx, signal?) and gainsCustomToolContextwithsessionManager,modelRegistry,model, isIdle(), hasQueuedMessages(), and abort(). - ›New
SessionManagertree methods: getTree(), getBranch(), getLeafId(), getLeafEntry(), getEntry(), getChildren(), getLabel(). - ›New
SessionManagerappend methods: appendCustomEntry(), appendCustomMessageEntry(), appendLabelChange(). - ›New
SessionManagerbranch methods: branch(entryId), branchWithSummary(). - ›New
AgentSessionmethod navigateTree(targetId, options?) for in-place session tree navigation. - ›New
AgentSessionmethod newSession(options?) accepts optionalparentSessionfor lineage tracking. - ›SDK adds sendHookMessage(message, triggerTurn?) for hook message injection.
- ›RPC
promptcommand replacesattachmentsfield withimagesfield usingImageContentformat;auto_compaction_startgainsreasonfield ("threshold"or"overflow");auto_compaction_endgainswillRetryfield;compactresponse now includes fullCompactionResultwithsummary,firstKeptEntryId,tokensBefore, anddetails. - ›RPC
resetcommand replaced bynew_sessioncommand with optionalparentSessionfield. - ›Structured compaction now tracks
readFilesandmodifiedFilesarrays indetails, accumulated across compactions, with clear sections: Goal, Progress, Key Information, File Operations. - ›New
before_compactandbefore_treehook events allow custom compaction implementations. - ›HTML export includes a tree visualization sidebar for navigating session branches.
- ›HTML export supports keyboard shortcuts Ctrl+T (toggle thinking blocks) and Ctrl+O (toggle tool outputs).
- ›HTML export supports theme-configurable background colors via optional
exportsection in theme JSON. - ›HTML export syntax highlighting now uses theme colors matching TUI rendering.
- ›New theme token
thinkingTextfor configurable thinking block text color. - ›New theme tokens required for custom themes:
selectedBg,customMessageBg,customMessageText,customMessageLabel(total color count increased from 46 to 50). - ›New
BranchSummaryEntry,CustomEntry,CustomMessageEntry, andLabelEntrysession entry types. - ›Session entries now use short 8-character hex IDs instead of full UUIDs.
- ›
ANTHROPIC_OAUTH_TOKENenvironment variable now takes precedence overANTHROPIC_API_KEYfor API key resolution.
└──▷ BREAKING ON UPGRADE- !
HookEventContextis renamed toHookContext; existing hooks referencingHookEventContextwill break. - !The monolithic
sessionhook event is removed; hooks must migrate to the granular eventssession_start,session_before_switch,session_switch,session_before_branch,session_branch,session_before_compact,session_compact,session_shutdown. - !Session entries are no longer passed in hook or custom tool events; code must call ctx.sessionManager.getEntries() or ctx.sessionManager.getBranch() instead.
- !pi.send(text, attachments?) is replaced by pi.sendMessage(message, triggerTurn?); callers using the old signature will break.
- !ctx.exec() moved to pi.exec(); existing hooks calling ctx.exec() will break.
- !
ctx.sessionFilereplaced by ctx.sessionManager.getSessionFile(). - !
hookTimeoutsetting removed; hooks no longer have timeouts. - !
resolveApiKeyparameter removed; use ctx.modelRegistry.getApiKey(model) instead. - !Custom tool type
CustomAgentToolrenamed toCustomTool;ToolAPIrenamed toCustomToolAPI;ToolContextrenamed toCustomToolContext;ToolSessionEventrenamed toCustomToolSessionEvent. - !Custom tool
executeparameter order changed from execute(toolCallId, params, signal, onUpdate) to execute(toolCallId, params, onUpdate, ctx, signal?). - !Custom tool dispose() method removed; use
onSessionwithreason: "shutdown"for cleanup. - !SDK type
AppMessagerenamed toAgentMessage; references will break. - !SDK Attachment type removed; use
ImageContentfrom@mariozechner/pi-aiand add images directly to message content arrays. - !AgentSession.branch(entryIndex: number) changed to branch(entryId: string).
- !AgentSession.getUserMessagesForBranching() now returns
{ entryId, text }instead of{ entryIndex, text }. - !AgentSession.reset() replaced by newSession(options?).
- !SessionManager.saveXXX() methods renamed to appendXXX() (e.g.,
appendMessage,appendCompaction). - !SessionManager.branchInPlace() renamed to branch().
- !SessionManager.reset() replaced by newSession(options?) with optional
parentSession. - !SessionManager.createBranchedSessionFromEntries(entries, index) replaced by createBranchedSession(leafId).
- !
SessionHeader.branchedFromrenamed toSessionHeader.parentSession. - !SessionManager.saveCompaction(entry) replaced by appendCompaction(summary, firstKeptEntryId, tokensBefore, details?).
- !SessionManager.getEntries() now excludes the session header; use getHeader() separately.
- !SessionManager.getSessionFile() returns
string | undefined(previously returned a value for in-memory sessions). - !SDK export
messageTransformerrenamed toconvertToLlm. - !SDK
SessionContextaliasLoadedSessionremoved. - !RPC
branchcommand fieldentryIndexreplaced byentryId;get_branch_messagesresponse fieldentryIndexreplaced byentryId. - !RPC
resetcommand replaced bynew_sessioncommand. - !Custom themes must add
selectedBg,customMessageBg,customMessageText, andcustomMessageLabelcolor tokens or they will fail to load.
- ›Sessions now use a tree structure with
- v0.30.0
Pi v0.30.0 adds custom session directories and reverse model cycling in the TUI.
└──▷ GET THIS VERSION$ git clone --branch v0.30.0 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.30.0
└──▷ TRY ITResume a session stored in a project-specific directory rather than the default cwd-encoded path.$ pi --session-dir ./my-project-sessions -r
Continue the most recent session from a shared or team-defined session directory.$ pi --session-dir /shared/sessions -c
- ›New
--session-dirflag lets you store sessions in any directory instead of the default~/.pi/agent/sessions/<encoded-cwd>/, compatible with-c(continue) and-r(resume) flags. - ›Shift+Ctrl+P cycles models backward and Ctrl+L opens the model selector while retaining the current editor text.
└──▷ BREAKING ON UPGRADE- !The second parameter of SessionManager.create(), continueRecent(), and list() is renamed from
agentDirtosessionDirwith changed semantics: when provided it now specifies the session directory directly (no cwd encoding); when omitted it falls back to~/.pi/agent/sessions/<encoded-cwd>/. - !SessionManager.open() no longer accepts an
agentDirparameter.
- ›New
- v0.29.1
Pi v0.29.1 adds automatic SYSTEM.md prompt loading and a unified
/settingscommand.└──▷ GET THIS VERSION$ git clone --branch v0.29.1 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.29.1
└──▷ TRY ITOverride the default system prompt for a specific project without touching the CLI flag on every invocation.$ mkdir -p .pi && echo 'You are a security-focused assistant. Always recommend least-privilege principles.' > .pi/SYSTEM.md
Override all system prompt sources on the fly for a one-off session with a custom persona.$ pi --system-prompt ~/prompts/pentest.md
- ›Adds automatic custom system prompt loading: Pi now auto-loads
.pi/SYSTEM.md(project-local) or~/.pi/agent/SYSTEM.md(global), with--system-promptflag taking highest precedence. - ›Introduces unified
/settingscommand consolidating thinking level, theme, queue mode, auto-compact, show images, hide thinking, and collapse changelog into a single menu.
└──▷ BREAKING ON UPGRADE- !The
/thinking,/queue,/theme,/autocompact, and/show-imagescommands are replaced by the new/settingsmenu.
- ›Adds automatic custom system prompt loading: Pi now auto-loads
- v0.29.0
Pi v0.29.0 adds word navigation, full Unicode input, and auto-spacing for pasted file paths in the CLI.
└──▷ GET THIS VERSION$ git clone --branch v0.29.0 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.29.0
- ›Adds Ctrl+Left/Right and Alt+Left/Right word-by-word cursor movement in input fields.
- ›Supports full Unicode input beyond ASCII in all input fields.
- ›Auto-prepends a space when pasting a file path (starting with
/,~, or.) after a word character.
└──▷ BREAKING ON UPGRADE- !The
/clearcommand is renamed to/new; hook event reasonsbefore_clearandclearare renamed tobefore_newandnew.
- v0.28.0
Pi v0.28.0 refactors credential storage to
~/.pi/agent/auth.jsonand overhauls the SDK API for auth and model management.└──▷ GET THIS VERSION$ git clone --branch v0.28.0 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.28.0
- ›Moves credential storage (API keys and OAuth tokens) from
oauth.jsonandsettings.jsonto~/.pi/agent/auth.json; existing credentials are automatically migrated on first run. - ›Adds
AuthStorageclass to the SDK for managing API keys and OAuth tokens, including AuthStorage.setRuntimeApiKey() for runtime overrides. - ›Adds
ModelRegistryclass to the SDK for model discovery and API key resolution, with modelRegistry.find() for locating custom and built-in models. - ›Adds discoverAuthStorage() and discoverModels() discovery functions to the SDK.
- ›Extends createAgentSession() to accept
authStorageandmodelRegistryoptions.
+1 moreshow less
- ›Adds getModel() from
@mariozechner/pi-aifor accessing built-in models.
└──▷ BREAKING ON UPGRADE- !API keys are removed from
settings.json; they must now be stored in~/.pi/agent/auth.json. - !SDK: configureOAuthStorage(), defaultGetApiKey(), findModel(), and discoverAvailableModels() are removed.
- !SDK: The
getApiKeycallback option to createAgentSession() is removed; use AuthStorage.setRuntimeApiKey() instead.
- ›Moves credential storage (API keys and OAuth tokens) from
- v0.27.6
Pi v0.27.6 enhances compaction hooks with richer context and cleans up the SessionManager API.
└──▷ GET THIS VERSION$ git clone --branch v0.27.6 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.27.6
- ›Adds
previousSummaryfield tobefore_compacthook payloads so hooks can carry accumulated context across compactions. - ›Adds
messagesToKeepfield tobefore_compacthook payloads exposing the recent turns that will survive compaction. - ›Adds
resolveApiKeyfunction tobefore_compacthook payloads for flexible model key resolution across settings, OAuth, and env vars. - ›Adds buildSessionContext() method to SessionManager for building LLM context from entries with compaction handling.
- ›Renames getEntries() (formerly loadEntries()) on SessionManager to return a defensive copy of all session entries.
└──▷ BREAKING ON UPGRADE- !loadSessionFromEntries() is renamed to buildSessionContext() — any code calling loadSessionFromEntries() will break.
- !loadEntries() is renamed to getEntries() — any code calling loadEntries() will break.
- !The
apiKeystring field inbefore_compacthook payloads is removed in favor ofresolveApiKey— hooks that readapiKeydirectly will break.
- ›Adds
- v0.27.5
Pi v0.27.5 adds syntax highlighting and full markdown rendering to HTML exports.
└──▷ GET THIS VERSION$ git clone --branch v0.27.5 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.27.5
- ›Adds syntax highlighting to code blocks in HTML exports using highlight.js, with theme-aware colors matching the TUI.
- ›Adds server-side markdown rendering in HTML exports (tables, headings, code blocks, image rendering for user messages, TUI-style language markers, light/dark theme support).
- v0.27.3
Pi v0.27.3 adds persistent API key storage in settings.json with priority over environment variables.
└──▷ GET THIS VERSION$ git clone --branch v0.27.3 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.27.3
└──▷ USE ITPersist an Anthropic API key in settings so it takes precedence over any environment variable across sessions.~/.pi/agent/settings.json: { "apiKeys": { "anthropic": "sk-..." } }- ›Supports storing API keys in
~/.pi/agent/settings.jsonunder theapiKeysfield, taking priority over environment variables.
- ›Supports storing API keys in
- v0.27.2
Hooks can now skip conversation restore on branch for checkpoint-style session management.
└──▷ GET THIS VERSION$ git clone --branch v0.27.2 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.27.2
- ›Adds
skipConversationRestore: truereturn value forbefore_branchhooks, allowing branched sessions to be created without restoring conversation messages.
- ›Adds
- v0.27.1
Pi v0.27.1 adds startup timing instrumentation via
PI_TIMING=1to profile interactive-mode performance.└──▷ GET THIS VERSION$ git clone --branch v0.27.1 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.27.1
└──▷ TRY ITDiagnose slow Pi startup times by seeing exactly where time is spent during initialization.$ PI_TIMING=1 pi- ›New
PI_TIMING=1env var prints a startup performance breakdown in interactive mode.
- ›New
- v0.27.0
Pi v0.27.0 adds cancellable
before_*session lifecycle hooks and ashutdownhook for graceful exit handling.└──▷ GET THIS VERSION$ git clone --branch v0.27.0 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.27.0
└──▷ TRY ITIntercept a branch action before it happens and conditionally cancel it — useful for prompting the user or running pre-checks before a session branches.$ pi.on("session", (event) => { if (event.reason === "before_branch") { const allow = confirmBranch(); // your pre-check if (!allow) return { cancel: true }; } });Run cleanup logic (flush logs, save state) when Pi is shutting down gracefully.$ pi.on("session", async (event) => { if (event.reason === "shutdown") { await flushLogs(); } });- ›Adds
before_switch,before_clear, andbefore_branchsession hook variants that fire before their respective actions and can be cancelled by returning{ cancel: true }. - ›Adds
shutdownsession hook reason for graceful exit handling via pi.on("session", ...).
└──▷ BREAKING ON UPGRADE- !The
branchevent is merged into thesessionevent:BranchEvent,BranchEventResulttypes and pi.on("branch", ...) are removed; use pi.on("session", ...) withreason: "before_branch" | "branch"instead. - !AgentSession.branch() now returns
{ cancelled }instead of{ skipped }. - !AgentSession.reset() and switchSession() now return
boolean(false if cancelled by a hook) instead of their previous return types. - !RPC commands
reset,switch_session, andbranchnow includecancelledin their response data instead ofskipped.
- ›Adds
- v0.26.0
Pi v0.26.0 adds a programmatic SDK with factory APIs for agent sessions, project-scoped settings, and flexible session management.
└──▷ GET THIS VERSION$ git clone --branch v0.26.0 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.26.0
└──▷ USE ITResume the most recent session programmatically to continue a long-running agent workflow without re-specifying session IDs.const session = await SessionManager.continueRecent();
- ›New createAgentSession() SDK factory enables programmatic agent control over model, tools, hooks, skills, session persistence, and settings — ships with 12 examples.
- ›Supports project-specific settings loaded from
<cwd>/.pi/settings.json, deep-merged over global~/.pi/agent/settings.json, and treated as read-only for version control. - ›New
SettingsManagerstatic factories: SettingsManager.create() for file-based settings, SettingsManager.inMemory() for testing, plus applyOverrides() for programmatic overrides. - ›New
SessionManagerstatic factories: SessionManager.create(), SessionManager.open(), SessionManager.continueRecent(), SessionManager.inMemory(), and SessionManager.list() for flexible session lifecycle management.
- v0.25.3
Pi v0.25.3 adds Gemini 3 preview models, external editor support, process suspension, and granular skills filtering.
└──▷ GET THIS VERSION$ git clone --branch v0.25.3 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.25.3
└──▷ TRY ITFilter to only skills matching a pattern at startup, e.g. to load only recon-related skills in a focused engagement.$ pi --skills 'recon*'
Draft a long, structured prompt in your preferred editor rather than the inline input, useful for complex multi-step instructions.$ # While in the pi prompt, press Ctrl+G to open $EDITOR, write your message, save and quit to send it.- ›Adds
gemini-3-pro-previewandgemini-3-flash-previewmodels to the google-gemini-cli provider. - ›New Ctrl+G keybinding opens the current message in
$VISUALor$EDITORfor external editing. - ›New Ctrl+Z keybinding suspends Pi to the shell; resume with
fg. - ›Adds granular skill-source toggles:
enableCodexUser,enableClaudeUser,enableClaudeProject,enablePiUser,enablePiProject, pluscustomDirectoriesandignoredSkillssettings. - ›New
--skills <patterns>CLI flag filters loaded skills by glob pattern;includeSkillssetting and glob support forignoredSkillsalso added.
- ›Adds
- v0.25.0
Pi v0.25.0 adds interruptible tool execution and two free Google OAuth providers for Gemini and Claude models.
└──▷ GET THIS VERSION$ git clone --branch v0.25.0 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.25.0
└──▷ TRY ITAuthenticate with the Antigravity sandbox to get free access to Claude thinking and GPT-OSS models.$ # Inside pi, run: /login # Then select: Antigravity- ›Enables mid-task agent interruption: queuing a message while tools are running skips remaining tools and processes your new message immediately.
- ›New Google Gemini CLI OAuth provider: access Gemini 2.0/2.5 models for free via Google Cloud Code Assist using
/login→ 'Google Gemini CLI'. - ›New Google Antigravity OAuth provider: access Gemini 3, Claude sonnet/opus thinking models, and GPT-OSS models for free via
/login→ 'Antigravity'. - ›The
/modelcommand now filters to only the models specified by--models, preventing accidental selection of out-of-scope providers.
- v0.24.1
Pi v0.24.1 adds OAuth/model config exports for scripting and xhigh thinking level for gpt-5.2 models.
└──▷ GET THIS VERSION$ git clone --branch v0.24.1 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.24.1
└──▷ USE ITWhen building a custom script around AgentSession, import OAuth and model helpers directly to reuse Pi's token storage without reimplementing auth.import { getAvailableModels, getApiKeyForModel, findModel, login, logout, getOAuthProviders } from '@mariozechner/pi-coding-agent';- ›Exports
getAvailableModels,getApiKeyForModel,findModel,login,logout, andgetOAuthProvidersfrom@mariozechner/pi-coding-agentso customAgentSessionscripts can reuse OAuth token storage and model resolution. - ›Adds
xhighthinking level option forgpt-5.2andgpt-5.2-codexmodels in the thinking level selector and shift+tab cycling.
- ›Exports
- v0.24.0
Pi v0.24.0 adds multi-agent orchestration, Kitty keyboard protocol, dynamic OAuth refresh, and a new
/hotkeyscommand.└──▷ GET THIS VERSION$ git clone --branch v0.24.0 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.24.0
└──▷ USE ITCancel a long-running shell command from a custom tool or hook if it exceeds a time limit.const result = await pi.exec("npm test", { timeout: 30000 }); if (result.killed) console.error("Process timed out and was terminated");Display all available keyboard shortcuts at any point during a session.$ /hotkeys- ›Adds a comprehensive subagent orchestration example with scout/planner/reviewer/worker agents and multi-agent pipeline workflow commands.
- ›Enables pi.exec() to accept
{ signal, timeout }options in custom tools and hooks, with akilledflag on the result when the process is terminated. - ›Supports the Kitty keyboard protocol, enabling Shift+Enter, Alt+Enter, Shift+Tab, Ctrl+D, and all Ctrl+key combos in Ghostty, Kitty, WezTerm, and other modern terminals.
- ›Adds dynamic OAuth token refresh for GitHub Copilot and Anthropic OAuth before each LLM call, preventing auth failures in long-running agent loops.
- ›Adds
/hotkeyscommand to display all keyboard shortcuts in a formatted table.
+2 moreshow less
- ›Exports getMarkdownTheme() from
@mariozechner/pi-coding-agentso custom tools can use the same markdown styling as the main UI. - ›Renders markdown tables with proper top and bottom borders.
└──▷ BREAKING ON UPGRADE- !Auto-discovered custom tools now require an
index.tsentry point inside a subdirectory: the old pattern~/.pi/agent/tools/mytool.tsmust become~/.pi/agent/tools/mytool/index.ts. Explicit paths via--toolorsettings.jsonstill accept any.tsfile. - !The
ToolResultEventresult: stringfield is removed; hook handlers must replace{ result: "..." }returns with{ content: [{ type: "text", text: "..." }] }, and access content viacontent: (TextContent | ImageContent)[]instead.ToolResultEventResult.resultis renamed/removed — usecontentinstead.
- v0.23.4
Pi v0.23.4 adds syntax highlighting for code blocks and word-level intra-line diff highlighting in the Edit tool.
└──▷ GET THIS VERSION$ git clone --branch v0.23.4 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.23.4
- ›Adds syntax highlighting for markdown code blocks, read tool output, and write tool content using theme-aware VS Code-style colors.
- ›Edit tool now shows word-level (intra-line) diff highlighting with inverse highlighting for single-line changes; multi-line changes display all removed lines before added lines.
- v0.23.0
Pi v0.23.0 adds custom TypeScript tools with TUI rendering, user interaction, and session-state persistence.
└──▷ GET THIS VERSION$ git clone --branch v0.23.0 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.23.0
└──▷ USE ITScaffold and run a custom TypeScript tool that prompts the user and persists state across pi sessions.# See examples/custom-tools/ for a working starter # Tool skeleton (TypeScript): export default { onSession({ reason, entries }) { if (reason === "start") { /* initialise state */ } }, async run(pi) { const choice = await pi.ui.select("Pick an option", ["A", "B"]); await pi.ui.notify(`You picked ${choice}`); } };- ›New custom tools system: extend pi with TypeScript plugins that provide custom TUI rendering, prompt users via
pi.ui(select, confirm, input, notify), and persist state across sessions via anonSessioncallback. - ›Bundled hook and custom-tool examples in
examples/hooks/andexamples/custom-tools/shipped with npm and binary releases.
└──▷ BREAKING ON UPGRADE- !The
session_startandsession_switchhook events are replaced by a singlesessionevent; useevent.reason("start" | "switch" | "clear") to distinguish them, and readevent.entriesfor state reconstruction.
- ›New custom tools system: extend pi with TypeScript plugins that provide custom TUI rendering, prompt users via
- v0.22.4
Pi v0.22.4 adds
--list-modelsto browse available models with fuzzy search and capability details.└──▷ GET THIS VERSION$ git clone --branch v0.22.4 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.22.4
└──▷ TRY ITQuickly find which vision-capable models you have API keys for before starting a multimodal task.$ pi --list-models image
- ›New
--list-models [search]flag lists all available models filtered by configured API keys, showing provider, model ID, context window, max output, thinking support, and image support — with optional fuzzy search.
- ›New
- v0.22.0
Pi v0.22.0 adds GitHub Copilot OAuth login with access to Claude, GPT, Gemini, Grok, and more.
└──▷ GET THIS VERSION$ git clone --branch v0.22.0 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.22.0
- ›Adds GitHub Copilot integration via OAuth login (
/login→ "GitHub Copilot"), supporting github.com and GitHub Enterprise with models sourced from models.dev including Claude, GPT, Gemini, and Grok — all automatically enabled after login.
- ›Adds GitHub Copilot integration via OAuth login (
- v0.21.0
Pi v0.21.0 adds inline image rendering for Kitty/iTerm2 terminals and Gemini 3 Pro thinking-level support.
└──▷ GET THIS VERSION$ git clone --branch v0.21.0 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.21.0
└──▷ TRY ITToggle inline image rendering on the fly during a session to see model-returned images rendered directly in the terminal.$ /show-images- ›Renders images inline in tool output on terminals supporting Kitty graphics protocol (Kitty, Ghostty, WezTerm) or iTerm2 inline images, with aspect ratio preserved; toggle via
/show-imagescommand orterminal.showImagessetting. - ›Extends thinking level selector (Minimal/Low → Google LOW, Medium/High → Google HIGH) to Gemini 3 Pro models.
- ›Renders images inline in tool output on terminals supporting Kitty graphics protocol (Kitty, Ghostty, WezTerm) or iTerm2 inline images, with aspect ratio preserved; toggle via
- v0.20.0
Pi v0.20.0 displays loaded skills on startup and adopts the SKILL.md directory convention.
└──▷ GET THIS VERSION$ git clone --branch v0.20.0 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.20.0
- ›Displays loaded skills on startup in interactive mode so you can confirm which skills are active before issuing commands.
└──▷ BREAKING ON UPGRADE- !Pi skills must now be named
SKILL.mdinside a directory (e.g.~/.pi/agent/skills/foo/SKILL.md); the previous convention of any*.mdfile directly under the skills directory is no longer supported. Migrate by renaming~/.pi/agent/skills/foo.mdto~/.pi/agent/skills/foo/SKILL.md.
- v0.19.0
Pi v0.19.0 adds a skills system for on-demand instruction loading and a
--versionflag.└──▷ GET THIS VERSION$ git clone --branch v0.19.0 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.19.0
└──▷ TRY ITDisable the skills system entirely when you want a clean, instruction-free agent run.$ pi --no-skills
Check the installed Pi version quickly from the terminal.$ pi --version
- ›New skills system auto-discovers and loads instruction files on demand from Claude Code, Codex CLI, and Pi-native skill directories, with descriptions surfaced in the system prompt.
- ›Adds
--version/-vflag to print the current Pi version and exit.
- v0.18.2
Pi v0.18.2 adds auto-retry with exponential backoff for transient provider errors and line numbers in HTML exports.
└──▷ GET THIS VERSION$ git clone --branch v0.18.2 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.18.2
└──▷ USE ITTune retry behaviour for a slow or rate-limited provider without touching your workflow.# In settings.json { "retry": { "enabled": true, "maxRetries": 5, "baseDelayMs": 2000 } }- ›Adds auto-retry on transient provider errors (429, 500, 502–504) using exponential backoff (2s, 4s, 8s), with TUI retry status display and Escape-to-cancel support.
- ›Exposes retry configuration via
retry.enabled,retry.maxRetries, andretry.baseDelayMsinsettings.json. - ›Emits
auto_retry_startandauto_retry_endevents in RPC mode for programmatic retry visibility. - ›HTML exports now show line number ranges (e.g.,
file.txt:10-20) for read tool calls when offset/limit parameters are used, with yellow highlighting.
- v0.18.1
Pi v0.18.1 adds Mistral AI as a supported provider via
MISTRAL_API_KEY.└──▷ GET THIS VERSION$ git clone --branch v0.18.1 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.18.1
└──▷ TRY ITQuery a Mistral model by setting your API key before invoking Pi.$ export MISTRAL_API_KEY=<your-key> pi <your-prompt>- ›Supports Mistral AI models as a new provider — set the
MISTRAL_API_KEYenvironment variable to enable.
- ›Supports Mistral AI models as a new provider — set the
- v0.13.1
Pi v0.13.1 adds flexible Windows shell configuration, supporting Cygwin, MSYS2, and custom bash environments.
└──▷ GET THIS VERSION$ git clone --branch v0.13.1 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.13.1
└──▷ TRY ITPoint Pi at a Cygwin bash installation on Windows instead of the default Git Bash.$ echo '{"shellPath": "C:\\cygwin64\\bin\\bash.exe"}' > ~/.pi/agent/settings.json- ›Supports custom Windows shell configuration via
shellPathin~/.pi/agent/settings.json, enabling Cygwin, MSYS2, and other bash environments beyond Git Bash.
- ›Supports custom Windows shell configuration via
- v0.12.12
Pi v0.12.12 adds fuzzy model/session search, prompt history navigation, and a
/resumecommand for mid-conversation session switching.└──▷ GET THIS VERSION$ git clone --branch v0.12.12 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.12.12
└──▷ TRY ITSwitch to a previous session without restarting the agent — useful when you need to continue a different investigation mid-conversation.$ /resume- ›Adds fuzzy search for models and sessions (e.g.,
codexmaxmatchesgpt-5.1-codex-max) in the interactive selector. - ›Adds prompt history navigation: browse up to 100 previously submitted prompts using Up/Down arrow keys when the editor is empty.
- ›New
/resumecommand lets you switch to a different session mid-conversation via an interactive selector, without restarting the agent. - ›Footer token counts now use M suffix for millions and shortened context display format (e.g.,
61.3%/200k).
- ›Adds fuzzy search for models and sessions (e.g.,
- v0.12.11
Pi v0.12.11 adds custom auth headers, a system-prompt layering flag, and a thinking-block visibility toggle.
└──▷ GET THIS VERSION$ git clone --branch v0.12.11 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.12.11
└──▷ USE ITEnable bearer-token auth for a custom provider without manually specifying headers each time.{ "name": "my-provider", "apiKey": "sk-...", "authHeader": true, "baseUrl": "https://my-provider.example.com/v1" }- ›New
authHeaderoption in models.json lets custom providers automatically injectAuthorization: Bearer <apiKey>headers. - ›New
--append-system-promptflag appends inline text or file contents to the system prompt without replacing the base prompt. - ›New Ctrl+T shortcut toggles visibility of LLM thinking blocks to reduce visual clutter during long conversations.
- ›New
- v0.12.9
Pi v0.12.9 adds
/copycommand to grab the last agent message straight to your clipboard.└──▷ GET THIS VERSION$ git clone --branch v0.12.9 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.12.9
└──▷ TRY ITAfter receiving a long Markdown-formatted agent response, copy it to clipboard for pasting into a report or ticket without losing formatting.$ /copy- ›Adds
/copycommand to copy the last agent message to the clipboard, with cross-platform support (macOS, Windows, Linux) — useful for extracting text from rendered Markdown output.
- ›Adds
- v0.12.7
Pi v0.12.7 adds context compaction with manual and auto modes, plus branch source tracking for session lineage.
└──▷ GET THIS VERSION$ git clone --branch v0.12.7 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.12.7
└──▷ TRY ITManually compact a long session mid-conversation, directing the summary to focus on a specific area of work.$ /compact focus on the authentication module decisions and discard unrelated tangentsEnable auto-compaction so long-running agent sessions never stall due to context overflow.$ /autocompact- ›Adds
/compact [instructions]command to manually summarize older messages and reduce context usage, with optional custom instructions for the summary. - ›Adds
/autocompacttoggle to automatically compact context when it reachescontextWindow - reserveTokens(default 16k reserve tokens). - ›Compacted sessions display a collapsible summary in the TUI (toggled with
okey) and in HTML exports. - ›RPC mode gains a
{"type":"compact"}command and auto-compaction support, emitting compaction events. - ›Branched sessions now record
branchedFromin the session header to track the originating session file path.
- ›Adds
- v0.12.5
Pi v0.12.5 adds configurable branding via
piConfiginpackage.jsonfor forks and white-labels.└──▷ GET THIS VERSION$ git clone --branch v0.12.5 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.12.5
└──▷ USE ITRebrand the CLI for a fork by declaringpiConfigin yourpackage.json— no source changes required.{ "piConfig": { "name": "mytool", "configDir": ".mytool" } }- ›Supports forking/rebranding the CLI by setting
piConfig.nameandpiConfig.configDirinpackage.json, updating the banner, help text, config paths, and error messages without code changes.
- ›Supports forking/rebranding the CLI by setting
- v0.12.4
Pi v0.12.4 adds a
/debugslash command that logs terminal rendering diagnostics to disk.└──▷ GET THIS VERSION$ git clone --branch v0.12.4 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.12.4
└──▷ TRY ITCapture a rendering diagnostic snapshot when lines appear misaligned or truncated in your terminal.$ /debug- ›New
/debugslash command writes terminal width and all rendered lines with their visible widths to~/.pi/agent/pi-debug.logfor diagnosing rendering issues.
- ›New
- v0.12.0
Pi v0.12.0 ships pre-built standalone binaries for macOS, Linux, and Windows — no Node/Bun runtime required.
└──▷ GET THIS VERSION$ git clone --branch v0.12.0 https://github.com/earendil-works/pi.git # already have the repo? check out this version: $ git checkout v0.12.0
- ›Adds standalone self-contained binary builds via
npm run build:binary, with pre-built releases for macOS (arm64/x64), Linux (x64/arm64), and Windows (x64) on GitHub Releases.
- ›Adds standalone self-contained binary builds via