Tools / Pi / v1.8.0

Pi v1.8.0 release notes & breaking changes

breakingmodel

Pi v1.8.0 is a Mario Zechner release published 2026-12-03 with 51 listed changes, flagged for breaking changes. Summary and full notes below, extracted from the official notes.

Get breaking changes for Pi in your inbox every Monday

One free email: every breaking change, retirement and price change across 23 coding agents. No spam, unsubscribe anytime.

Subscribe free

← All Pi releases and breaking changes

Summary

Full notes

### New Features

- **[MCP 2026-07-28](https://github.com/earendil-works/pi/blob/v1.8.0/packages/coding-agent/docs/mcp.md#protocol-versions):** 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](https://github.com/earendil-works/pi/blob/v1.8.0/packages/coding-agent/docs/mcp.md#configure-servers):** Add `"$schema": "https://pi.dev/schemas/mcp.schema.json"` to `mcp.json` for editor validation and completion.
- **[Unloaded llama.cpp models in `/model`](https://github.com/earendil-works/pi/blob/v1.8.0/packages/coding-agent/docs/llama-cpp.md):** When the router autoloads models, `/model` lists models from the Hugging Face cache and `--models-dir`, not only presets.
- **[OpenRouter `/images` models](https://github.com/earendil-works/pi/blob/v1.8.0/packages/coding-agent/docs/codemode.md#generate-images):** Codemode image generation supports OpenRouter image models that are served only on `POST /images`.
- **[`pi.appendUsage()`](https://github.com/earendil-works/pi/blob/v1.8.0/packages/coding-agent/docs/extensions.md#piappendusagerecord):** 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](https://github.com/earendil-works/pi/issues/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](https://github.com/earendil-works/pi/blob/v1.8.0/packages/coding-agent/docs/mcp.md#protocol-versions). Based on [#12479](https://github.com/earendil-works/pi/pull/12479) by [@dmmulroy](https://github.com/dmmulroy) ([#10416](https://github.com/earendil-works/pi/issues/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](https://github.com/earendil-works/pi/issues/12654), based on [introspection-org/pi#2](https://github.com/introspection-org/pi/pull/2) by [@brightsparc](https://github.com/brightsparc))
- Published a JSON schema for `mcp.json`: add `"$schema": "https://pi.dev/schemas/mcp.schema.json"` for editor validation and completion ([#12563](https://github.com/earendil-works/pi/issues/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](https://github.com/earendil-works/pi/issues/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](https://github.com/earendil-works/pi/issues/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](https://github.com/earendil-works/pi/pull/12730) by [@julien-c](https://github.com/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](https://github.com/earendil-works/pi/issues/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](https://github.com/earendil-works/pi/pull/12730) by [@julien-c](https://github.com/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](https://github.com/earendil-works/pi/pull/11562) by [@juanibiapina](https://github.com/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 `$&` in inserted files were expanded as replacement patterns ([#12608](https://github.com/earendil-works/pi/issues/12608), [#12609](https://github.com/earendil-works/pi/pull/12609) by [@acmerfight](https://github.com/acmerfight))
- Fixed codemode `models.classify()` and `models.generateImages()` not passing the current session ID
- Fixed prefilled fields (the `/model <term>` and `/login <provider>` search, session rename, `/tree` labels, and extension input dialogs with an initial value) opening with the cursor before the text, so `/model son` followed by typing `net` searched `netson` ([#12676](https://github.com/earendil-works/pi/issues/12676), [#12677](https://github.com/earendil-works/pi/pull/12677) by [@acmerfight](https://github.com/acmerfight))
- Fixed undo in dialogs that clear or prefill their input, such as the `/login` steps and `/scoped-models` search, skipping the cleared or prefilled value and restoring older text, and the next kill or yank mixing with text from before the change
- Fixed `/tree` branch summaries leaving out the selected user or custom message, which leaves the context and goes back to the editor, so the summary never said what the abandoned branch was asked to do. `session_before_tree` handlers now get that message in `preparation.entriesToSummarize`, and `preparation.commonAncestorId` is its parent ([#12576](https://github.com/earendil-works/pi/issues/12576), [#12577](https://github.com/earendil-works/pi/pull/12577) by [@acmerfight](https://github.com/acmerfight))
- Fixed selecting a user or custom message that is the current leaf in `/tree` doing nothing; it now moves to the message's parent and puts its text in the editor, like any other user message
- Fixed bash commands running only partly, with exit code 0, under Git Bash on Windows when longer than about 8 KB or made of newline-separated words without spaces ([#12340](https://github.com/earendil-works/pi/issues/12340))
- Fixed pi exiting immediately when its terminal goes away without SIGHUP, such as a Windows console host that exits, without saving the aborted turn or emitting `session_shutdown`. pi now runs the same session cleanup as for SIGHUP, without writing to the terminal, and exits with 129 after at most 5 seconds. The next start shows why pi exited, for example `pi exited on ... because its terminal went away (write EPIPE)`. An uncaught `EPIPE` or `EIO` that does not come from the terminal, such as a write to an exited child process, is now reported as a crash instead of exiting silently ([#12317](https://github.com/earendil-works/pi/issues/12317))
- Fixed codemode scripts that declare `const` or `let` named `tools` or `console` failing with `SyntaxError: invalid redefinition of parameter name` before they ran ([#11878](https://github.com/earendil-works/pi/pull/11878) by [@arajkumar](https://github.com/arajkumar))
- Fixed unloaded llama.cpp models without a configured context size getting a 128000-token context window: Pi now uses the trained context length the router reports for them (`context_length` in `GET /models`)
- Fixed two `prompt()` calls that reach an idle session in the same tick both starting a run, so the second failed with `Agent is already processing a prompt`; the second prompt now queues into the first run by its `streamingBehavior` ([#12186](https://github.com/earendil-works/pi/issues/12186))
- Fixed shifted characters (uppercase letters, `"`, `:`) not being typed in dialogs and search boxes such as `/login`, `/resume`, `/model` and `/settings` in terminals using xterm `modifyOtherKeys` (xterm, tmux, VS Code, GNOME Terminal, Apple Terminal), and `/tree` search ignoring keys in those terminals and with the Kitty keyboard protocol ([#12727](https://github.com/earendil-works/pi/issues/12727), [#12728](https://github.com/earendil-works/pi/pull/12728) by [@acmerfight](https://github.com/acmerfight))
- Fixed Shift+Backspace and Shift+Delete doing nothing in dialogs, search boxes and `/tree` search with the Kitty keyboard protocol or xterm `modifyOtherKeys`; they now delete as in the editor, through the `tui.editor.deleteCharBackward` and `tui.editor.deleteCharForward` defaults ([#12727](https://github.com/earendil-works/pi/issues/12727))
- Fixed the `overlay-test` and `overlay-qa-tests` example extensions dropping keys sent as Kitty CSI-u or xterm `modifyOtherKeys` sequences
- Fixed `pi auth print-api-key` and `print-bearer-token` with `--model` and no `--provider` failing with `Model "..." not found` when the key came from an environment variable or a `models.json` `apiKey` ([#12667](https://github.com/earendil-works/pi/issues/12667))
- Fixed every loaded skill keeping its whole `SKILL.md` in memory, once per live session ([#12649](https://github.com/earendil-works/pi/issues/12649))
- Fixed OpenAI Codex WebSocket sessions resending the full history every turn once the output token limit shrank as the context grew ([#12444](https://github.com/earendil-works/pi/issues/12444))
- Fixed thinking signatures from Claude via OpenRouter or Bifrost (`openai-completions`) being dropped or merged across `reasoning_details` entries ([#9534](https://github.com/earendil-works/pi/issues/9534), [#12615](https://github.com/earendil-works/pi/issues/12615))
- Fixed Google `MALFORMED_RESPONSE` stops (`Provider stopped with: MALFORMED_RESPONSE`) not being retried automatically ([#12622](https://github.com/earendil-works/pi/issues/12622))
- Fixed OpenCode Go's request body limit (`decoded body exceeds 50331648 bytes`) being retried instead of triggering compaction ([#12625](https://github.com/earendil-works/pi/issues/12625))
- Fixed Amazon Bedrock `Too many tokens` throttling errors not being retried automatically ([#12574](https://github.com/earendil-works/pi/pull/12574) by [@acmerfight](https://github.com/acmerfight))
- Fixed `upstream_error: upstream SSE stream failed` gateway errors not being retried automatically ([#12605](https://github.com/earendil-works/pi/issues/12605))
- Fixed a second `/login` for OpenAI Codex, Anthropic or Radius in the same process failing with `State mismatch.` and waiting until it timed out ([#12724](https://github.com/earendil-works/pi/issues/12724))
- Fixed DeepSeek prompt updates being sent in the wrong form: `deepseek-flash` now gets them in place and keeps its cached prefix, and `deepseek-v4-pro` gets one merged leading prompt ([#12658](https://github.com/earendil-works/pi/issues/12658))
- Fixed Groq rejecting tool calls with HTTP 400 `missing properties` when a model left out an optional argument ([#12653](https://github.com/earendil-works/pi/issues/12653))
- Fixed Gemini 3+ answering follow-ups to tool calls with `400 INVALID_ARGUMENT` on Gemini-compatible hosts that return URL-safe base64 thought signatures ([#12637](https://github.com/earendil-works/pi/issues/12637))
- Fixed the TUI rendering without colors under GNU screen when an inherited `COLORTERM` advertised truecolor; pi now uses 256 colors there unless `PI_TRUE_COLOR=1` or `terminal.trueColor` opts in ([#10618](https://github.com/earendil-works/pi/issues/10618))
- Fixed quoted lists losing the quote color after the bullet, and HTML and LaTeX blocks inside quotes not using the quote color ([#12663](https://github.com/earendil-works/pi/issues/12663))
- Fixed `@` file autocomplete passing queries that start with `-` to `fd` as options, so `@-test` showed nothing and `@-u` listed ignored files ([#12719](https://github.com/earendil-works/pi/issues/12719), [#12720](https://github.com/earendil-works/pi/pull/12720) by [@acmerfight](https://github.com/acmerfight))
← Older: v1.7.0 (2026-11-27)
Weekly digest: every breaking change, retirement and price change across 23 coding agents, one email.

Form not loading? Subscribe here.