Finding / pi-coding-agent

2026-10-13-pi-coding-agent-extensions-gained-more-reach-in-the-1-0-line-and-before-agent-start-now-also-gates-extensi

Extensions gained more reach in the 1.0 line, and before_agent_start now also gates extension-started runs. The September additions (authenticated model calls, context_with_system, context edits) are all still present at v1.2.0, and the 1.0 line widened the surface. An extension can now register MCP servers for the session, run any callable tool through ctx.executeTool() from a tool execution context (not every extension event context), decide which tools the model sees (exposure, prepareLoadout()), observe raw provider events, generate images with session credentials, and register a virtual model that picks the physical model and thinking level for every request. Pi records the physical model on each assistant message, and /session splits cost by physical model, so routing can be audited after the fact. One gate tightened in 1.2.0. Before it, runs started by pi.sendMessage(..., { triggerTurn: true }) skipped before_agent_start, so prompt sections or policies injected there did not apply to extension-started runs. Now they do, and handlers that should act only on user prompts must check event.messageType === "user". 1.2.0 also fixed a quiet control failure: ~ was not expanded in !pattern and -path entries of the extensions, skills, prompts and themes settings, so an exclusion like !~/skills/pdf matched nothing (#10765).

Channel: tagged-release (additions across v0.99.0 to v1.2.0). Half: both. Date: 2026-10-12.

Operator consequence: On upgrade, grep third-party extensions for registerVirtualModel, registerMcpServer, executeTool, generateImages, provider_stream_event, modelRegistry, context_with_system and context_edit. appendContextEdit, the grep target the profile gives, is the internal SessionManager method; extension code proposes context_edit entries instead. Extension authors with before_agent_start handlers must handle the new "custom" branch on 1.2.0. If you excluded resources with ~ paths, upgrade and confirm they are actually excluded.

Receipt

Finding metadata

Run: 2026-10-13-profile-refresh-2026-09-21_2026-10-13-frontier-v0

Finding ID: 2026-10-13-pi-coding-agent-extensions-gained-more-reach-in-the-1-0-line-and-before-agent-start-now-also-gates-extensi

Profile citations

Source links

Primary links, including exact changelog lines when available.