Release · Pi · earendil-works

Pi v1.8.0

What's new in Pi v1.8.0, released Dec 3, 2026 (). This is the latest version.

Release notes

Pi v1.8.0

New Features
  • MCP 2026-07-28: Pi speaks the stateless MCP revision with servers that reject initialize, or with any server when "protocol": "2026-07-28" is set.
  • mcp.json schema: Add "$schema": "https://pi.dev/schemas/mcp.schema.json" to mcp.json for editor validation and completion.
  • Unloaded llama.cpp models in /model: When the router autoloads models, /model lists models from the Hugging Face cache and --models-dir, not only presets.
  • OpenRouter /images models: Codemode image generation supports OpenRouter image models that are served only on POST /images.
  • pi.appendUsage(): Extensions can record model usage that the session's messages do not carry, such as a subagent's; the footer's cost and session stats count it.
Breaking Changes
  • getShellConfig() returns commandTransport: "env" for Git Bash and other bash.exe on Windows, except WSL launchers: the command goes in the environment variable named by the new SHELL_COMMAND_ENV_VAR export, not after args. Extensions that spawn the shell from getShellConfig() must set that variable; appending the command to args fails with an error (#12340)
  • SessionManager.open(path) without sessionDir now creates new sessions (/new, /fork, /clone) in the default directory of the session's cwd instead of the opened file's folder. Pass the folder as sessionDir to keep the old behavior. usesDefaultSessionDir() now says whether a custom session directory was given, rather than comparing folders
  • Renamed OpenRouter's chat-completions image API from openrouter-images to openrouter-chat-images; openrouter-images now means OpenRouter's POST /images endpoint. Custom models.json entries with "api": "openrouter-images" for chat-completions image models must switch to openrouter-chat-images. Image models saved in the model store by pi 1.7.0 are migrated on load
Added
  • Added SessionManager.getCustomSessionDir(), the custom session directory (--session-dir, PI_CODING_AGENT_SESSION_DIR or the sessionDir setting), or undefined for default storage
  • Added MCP 2026-07-28, the stateless revision. Pi still starts every connection with initialize, so existing servers work as before. Servers that reject initialize are spoken to with 2026-07-28, and their tool list changes are followed with subscriptions/listen; a stdio server that exits or refuses server/discover after rejecting initialize is started once more. "protocol": "2026-07-28" in mcp.json uses it with servers that speak both revisions. See Protocol versions. Based on #12479 by @dmmulroy (#10416)
  • Added pi.appendUsage() so extensions can record model usage that the session's messages do not carry, such as a subagent's; the footer's cost and session stats count it (#12654, based on introspection-org/pi#2 by @brightsparc)
  • Published a JSON schema for mcp.json: add "$schema": "https://pi.dev/schemas/mcp.schema.json" for editor validation and completion (#12563)
  • Added OpenRouter image models that are served only on POST /images to codemode image generation, through the new openrouter-images API
  • Added the decision models jev-1.14, gemini-decision-1 and gpt-6-luna-decision from OpenCode Go (billed to the Go subscription) and OpenCode Zen for models.classify() in codemode and ctx.modelRegistry.classify() in extensions; Zen's jev-1.13 and jev-1.13-free now also take images (#12484)
  • Added Baseten's decision models (bison-1, groundhog-1, elephant-1, mammoth-1, joey-1) for models.classify() in codemode and ctx.modelRegistry.classify() in extensions (#12712)
Changed
  • /model now lists unloaded llama.cpp models from the Hugging Face cache and --models-dir, not only presets, when the router autoloads models; the router loads the selected model on the first request (#12730 by @julien-c)
  • Changed the opencode default model from the removed kimi-k2.7-code to kimi-k3.1-pro
  • Updated cross-spawn to 7.1.2 for GHSA-ghv9-86vm-4v8m (command injection when spawning batch files through cmd.exe on Windows). On Windows, an MCP command with embedded arguments (such as "npx -y foo") is now quoted as one command and fails, as it already did on Linux; put the arguments in args (#12729)
  • Updated minimatch to 11.0.9 for GHSA-cf2h-pxjq-68xw, GHSA-hqmv-qgp3-jx75 and GHSA-c859-jr93-m5j4 (slow compiling of long wildcard patterns, and memory growth from the pattern cache). Glob patterns in model selection, package filters and find on Windows that would expand to more than 100,000 patterns now fail with an error instead of hanging
Fixed
  • Fixed /login llama.cpp reporting that no models are loaded before its catalog refresh finished; the guidance now waits for the refresh and points to /model when models are available (#12730 by @julien-c)
  • Fixed a session resumed with another working directory, for example after choosing "continue in current cwd" at the missing-cwd prompt, being treated as stored in a custom --session-dir: /new, /fork and /clone saved into the old project's folder, /resume All listed only that folder, and the resume hint added --session-dir. /clone and /fork of such a session also went back to the missing cwd. Opening a session no longer creates its session directory; it is created when the first session file is written. The resume hint for a session opened from outside the session directory (pi --session <path>) gives that path. Based on #11562 by @juanibiapina
  • Fixed WSL detection in terminals that start the shell without the WSL environment variables (for example from a systemd user service): the Windows keybinding defaults (alt+v image paste, ctrl+q follow-up) and the footer's branch polling for repos under /mnt/<drive> now apply there too, because all WSL checks share one detection that falls back to /proc/version.
  • Fixed HTML export dropping the $ from the session cost and altering the embedded highlight.js, because $$ and $&

…