New Features
- MCP servers stay out of the way: servers with the default
codemodeexposure are no longer listed in thecodemodedescription and no longer block the first prompt. They appear in a short system prompt section, and scripts find their tools withsearchTools()anddescribeNamespace(). See Control tool exposure. - More MCP authentication options:
oauth.clientNamefor servers that only accept known OAuth clients, and"auth": { "provider": "<provider>" }to authenticate HTTP servers with a provider's/logintoken. See Authenticate with OAuth. - Anthropic workload identity federation from the Anthropic SDK environment variables. See Use an API key from the environment.
/reloadenables tools newly added to thedefaultToolssetting. See Tools.
Added
- Added a
descriptionfield for MCP servers (pi mcp add --description), shown with the server in the system prompt and used to rank its tools in tool search, and adescribeNamespace(name)codemode helper that returns a namespace's instructions and tool names.describeNamespace()andsearchTools()accept a namespace asmcp__dev-radius,mcp__dev_radius,dev-radius, ordev_radius. - Added an
oauth.clientNamesetting for MCP servers (pi mcp add --oauth-client-name) to change the client name sent during OAuth client registration, for servers that only accept known clients (#10226). - Added
"auth": { "provider": "<provider>" }for HTTP MCP servers to send a provider's current/logintoken as the bearer token instead of using MCP OAuth. The token is read on every request, so provider refreshes apply. Only allowed in the globalmcp.jsonand from extensions, and requires https except on loopback hosts. - Added Anthropic workload identity federation from the
ANTHROPIC_FEDERATION_RULE_ID,ANTHROPIC_ORGANIZATION_ID, andANTHROPIC_IDENTITY_TOKEN_FILEenvironment variables (see Providers) (#10177, #10242 by @philfreo). /reloadnow enables tools newly added to thedefaultToolssetting. Tools removed from it stay enabled, tools turned off during the session stay off unless newly added, and--tools,--no-tools, and--no-builtin-toolsstill override the setting (#10245).
Changed
- MCP servers with the default
codemodeexposure no longer appear in thecodemodedescription; scripts find them withsearchTools().codemode-deferredis now an alias forcodemode. Usedirectexposure for tools the model should see without searching (#10212). - The
codemodedescription no longer includes deferred tools, tool counts, or MCP server instructions, so it no longer changes when MCP servers connect or change their tools. Thetool_searchdescription no longer lists the servers whose tools it can load, for the same reason. Servers are listed instead in anmcp_serverssystem prompt section with a one-line summary, updated at the start of each prompt; a changed section is appended to the conversation. Scripts read server instructions withdescribeNamespace()(#10212). - The first prompt no longer waits for MCP servers without
directtools. They connect in the background and are waited for when a codemode script names them, a script searches tools, ortool_searchruns (#10212).
Fixed
- Fixed new sessions intermittently ignoring the saved default model, or warning that no models are available, when it belongs to an extension-registered native provider with a stored credential (#9962, #10190 by @davidbrai).
- Fixed the
/mcpsign-in URL not being clickable when it wraps across lines, by emitting it as a terminal hyperlink with aCmd/Ctrl+click to openline like/login(#10186). - Fixed codemode
image()accepting malformed base64 data or unsupported image types, which persisted an invalid image block that made every later provider request fail with HTTP 400 (#10215). - Fixed codemode failing to start its script worker from the standalone Windows executable (#10204).
- Fixed prompt submission slowing down with session length, because resolving the session's model selection looked up the model catalog once per assistant message (#10198).
- Fixed model lookups slowing down for providers with a refreshed pi.dev catalog, because merging remote catalog models took quadratic time.
- Fixed the
built-in-tool-renderer.tsandminimal-mode.tsextension examples removing the built-in tools' summaries and guidelines from the system prompt (#10072, #10193 by @christianklotz). - Fixed context overflow detection for Z.AI CN endpoint
Prompt exceeds max lengtherrors (#10208). - Fixed Anthropic requests failing when a tool schema uses keywords Anthropic strict tool use rejects, such as
minimum/maximum; such tools are now sent non-strict (#9953). - Fixed provider retries firing immediately when a
Retry-Afterheader contains an unparseable date; they now use exponential backoff (#9571). - Fixed extension commands registered without a string name or handler crashing pi when typing
/; the extension now fails to load with an error instead (#10054). - Fixed collapsed
codemodeand MCP tool results filling the screen when the output is one long line, such as minified JSON. Like bash output, the preview is now limited to wrapped lines instead of logical lines. - Fixed
codemode.mode: "only"listingread,bash,edit, andwritein the system prompt's tool list although requests only declarecodemode(#10192). - Fixed codemode scripts calling the wrong MCP tool when two tool names differ only in
-and_, such asread-fileandread_file. Like in Codex, MCP tool and namespace names now replace-with_(mcp__my-server__xis nowmcp__my_server__x), colliding tools of a server all get a hash suffix, and server names that differ only in-and_are rejected (#10239).