feat(server): Pi 1.0 support, with replay fixtures recorded on 1.0 #14688
t3code/codex-turn-mapping fromrefs/pull/14688/head·merged by juliusmarminge View on GitHubV2 supports Pi >=0.80.5, but its replay fixtures were recorded on 0.87.1. Pi 1.0.0 shipped today, and its startup behaviour changed in a way that can stop Pi from launching for some users.
What changed in Pi that matters to us (0.87.1 → 1.0.0, including 0.99.0–0.99.2)#
--providerwithout--modelis now a startup error (earendil-works/pi#10236). I checked it against 1.0.0 in RPC mode:pi --mode rpc --provider openrouterprintsError: --provider requires --model …and exits 1. T3 never adds--provideritself, so a user'slaunchArgssetting is the only way to hit this. Before this PR,PiRpcreported onlypi process exited with code 1, because stderr stays out of public details on purpose.- RPC
prompt/steer/follow_upacks now carrydata.disposition(started/queued/handled). The success path ignoresdataand keys offsuccess, so nothing breaks. The idle probe for command-only prompts stays, because Pi versions before 0.99 never senddisposition. - Assistant messages and session entries gain
thinkingLevel. It is additive and the adapter doesn't read it. --no-extensionsnow also disables Pi's built-in extensions (llama.cpp, mcp, codemode, tool-search). That is why the recordedget_commandsis now empty, where it used to listllama.- The TUI defaults to fullscreen. This doesn't apply to
--mode rpc: the mode resolves torpcbefore any TUI setup runs, and all 8 recordings ran normally. - MCP OAuth credentials are now keyed by server name + URL, and Pi-managed MCP tool names normalise
-to_. T3 doesn't write Pi'smcp.json. Its MCP bridge is the T3 extension, which callspi.registerToolwith names likemcp__t3-code__<tool>and passes its own bearer token through the environment, so neither change touches it. - Codemode
typeof tools.name→"name" in tools. T3 has no codemode scripts, so this doesn't apply. docs/rpc.md,docs/rpc-commands.mdanddocs/session-format.mdhave no other differences between 0.87.1 and 1.0.0.
What changed here#
resolvePiLaunchArgsrejects--providerwithout--modelwith the message "Pi launch argument '--provider' requires '--model'." The check runs before every spawn site: the provider probe, sessions, text generation, and the--forkrelaunch, which reuses the resolved args. So a saved launch-args value that 1.0 would refuse now shows its reason on the provider card or turn instead of a bare exit code. The equals form (--provider=x) is covered by the existing equals-splitting.- All 8 Pi replay fixtures were re-recorded on 1.0.0 with the existing recorder. The pinned model is unchanged (
openrouter/deepseek/deepseek-v4-flash). The recorder already passes--providertogether with--model. Thepi_output.tsassertions needed no change: the recorder replays each new transcript through them before writing it, and all 8 passed. - In
model-manifest.json, the Pi recommended range is now>=1.0.0. The>=0.80.5floor stays, because nothing in 1.0 needs a newer floor. docs/user/providers-pi.mdnow recommends 1.0 and states the--provider/--modelpairing.
How the transcripts differ#
A per-frame field diff across all 8 fixtures shows only these changes: +data.disposition on response:prompt, +thinkingLevel on assistant messages and entries, and get_commands going empty. The frame sequences match the 0.87.1 recordings, apart from two variations that come from timing and the model, not from Pi:
- In
thread_rollback, theget_commandsresponse now arrives after the concurrentget_available_modelsrequest goes out. - In
thread_rollback_after_stop, there is one fewertool_execution_update.
Verification#
- Pi 1.0.0 was installed into an isolated npm prefix. The global
piand~/.piwere not touched. - Recorder run for all 8 scenarios (
T3_PI_BIN=<prefix>/pi, insideunshare -U --map-current-user -p -f --mount-proc). All 8 exited 0 and passed their own replay assertions. vp test runinsideunshareonPiAdapterV2.test.ts,piT3McpInjection.test.ts,PiProvider.test.ts,ModelManifest.test.tsandproviderCompatibility.test.ts: 85/85 passed.OrchestratorReplayFixtures.integration.test.ts -t "/pi through"insideunshare: 8/8 Pi rows passed.vp exec tsc --noEmit -p .inapps/server: exit 0, 0error TS/warning TS.vp lintandvp fmton the touched files: clean.vp run knip:check: exit 0.- I grepped the diff for
sk-or-,crsr_and local home paths: no matches. - Not run: the full server suite, web/mobile, and live user sessions with built-in extensions.
Model: Claude Opus 5.5 (Claude Code)
🤖 Generated with Claude Code
- 1
github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:XXL
juliusmarminge added labelsmacroscope-review
Thread transfer impact#
✅ Thread transfer remains within every enforced ceiling.
ℹ️ No successful
mainbaseline artifact is available yet. This run establishes the initial measurement.Provider Metric Main baseline This PR Impact PR ceiling Codex Total thread wire — 4.9 KiB — 6.8 KiB ✅ Codex Thread snapshot wire — 3.7 KiB — 4.9 KiB ✅ Codex Live turn WebSocket wire — 1.2 KiB — 2.0 KiB ✅ Codex Live turn WebSocket decoded — 20.4 KiB — 29.3 KiB ✅ Codex Live turn messages — 2 — 8 ✅ Claude Total thread wire — 4.9 KiB — 6.8 KiB ✅ Claude Thread snapshot wire — 3.7 KiB — 4.9 KiB ✅ Claude Live turn WebSocket wire — 1.2 KiB — 2.0 KiB ✅ Claude Live turn WebSocket decoded — 20.7 KiB — 29.3 KiB ✅ Claude Live turn messages — 1 — 8 ✅ Baseline: unavailable · PR result:
736c4ba· Source CI: successScenario and decoded snapshot size
10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
- Codex decoded thread snapshot: 106.1 KiB
- Claude decoded thread snapshot: 106.4 KiB
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.
Approvability#
Verdict: Would Approve
Macroscope's review found this PR approvable — This PR is a focused Pi 1.0 compatibility update: it adds a tested validation for an invalid launch-argument combination, refreshes replay fixtures, and updates compatibility guidance. The large fixture diff is test data, while existing valid Pi configurations and the prior supported-version floor remain unchanged.
Not approved because:
- Per-review cost limit exceeded (workspace setting). Approvability relies on correctness review in order to determine eligibility
juliusmarminge merged thisde95adc
juliusmarminge closed this
Sign in to join this conversation.
Macroscope skipped reviewing this pull request. Per-review cost limit exceeded (workspace setting).
This review would cost an estimated $39.87, which exceeds your per-review limit of $15.00.
The top 3 files driving up this estimate:
apps/server/src/orchestration-v2/testkit/fixtures/thread_rollback_after_stop/pi_transcript.ndjsonapps/server/src/orchestration-v2/testkit/fixtures/thread_rollback/pi_transcript.ndjsonapps/server/src/orchestration-v2/testkit/fixtures/pi_compaction/pi_transcript.ndjsonTip
To get this pull request reviewed, you can:
@macroscope-appon this PR to request a manual review (monthly spend limits still apply)..macroscope/ignore.md— note that creating this file replaces Macroscope's built-in default ignores rather than extending them.