Skip to content
Source
Sign inSign up
pingdotgg/t3code

feat(server): Pi 1.0 support, with replay fixtures recorded on 1.0 #14688

Mergedjuliusmarmingemerged 1 commit intot3code/codex-turn-mapping fromrefs/pull/14688/headmerged by juliusmarminge View on GitHub

juliusmarmingecommented

V2 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)

  • --provider without --model is now a startup error (earendil-works/pi#10236). I checked it against 1.0.0 in RPC mode: pi --mode rpc --provider openrouter prints Error: --provider requires --model … and exits 1. T3 never adds --provider itself, so a user's launchArgs setting is the only way to hit this. Before this PR, PiRpc reported only pi process exited with code 1, because stderr stays out of public details on purpose.
  • RPC prompt/steer/follow_up acks now carry data.disposition (started / queued / handled). The success path ignores data and keys off success, so nothing breaks. The idle probe for command-only prompts stays, because Pi versions before 0.99 never send disposition.
  • Assistant messages and session entries gain thinkingLevel. It is additive and the adapter doesn't read it.
  • --no-extensions now also disables Pi's built-in extensions (llama.cpp, mcp, codemode, tool-search). That is why the recorded get_commands is now empty, where it used to list llama.
  • The TUI defaults to fullscreen. This doesn't apply to --mode rpc: the mode resolves to rpc before 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's mcp.json. Its MCP bridge is the T3 extension, which calls pi.registerTool with names like mcp__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.md and docs/session-format.md have no other differences between 0.87.1 and 1.0.0.

What changed here

  • resolvePiLaunchArgs rejects --provider without --model with the message "Pi launch argument '--provider' requires '--model'." The check runs before every spawn site: the provider probe, sessions, text generation, and the --fork relaunch, 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 --provider together with --model. The pi_output.ts assertions 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.5 floor stays, because nothing in 1.0 needs a newer floor.
  • docs/user/providers-pi.md now recommends 1.0 and states the --provider/--model pairing.

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, the get_commands response now arrives after the concurrent get_available_models request goes out.
  • In thread_rollback_after_stop, there is one fewer tool_execution_update.

Verification

  • Pi 1.0.0 was installed into an isolated npm prefix. The global pi and ~/.pi were not touched.
  • Recorder run for all 8 scenarios (T3_PI_BIN=<prefix>/pi, inside unshare -U --map-current-user -p -f --mount-proc). All 8 exited 0 and passed their own replay assertions.
  • vp test run inside unshare on PiAdapterV2.test.ts, piT3McpInjection.test.ts, PiProvider.test.ts, ModelManifest.test.ts and providerCompatibility.test.ts: 85/85 passed.
  • OrchestratorReplayFixtures.integration.test.ts -t "/pi through" inside unshare: 8/8 Pi rows passed.
  • vp exec tsc --noEmit -p . in apps/server: exit 0, 0 error TS / warning TS.
  • vp lint and vp fmt on 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


Devin Review
    1. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted

    2. juliusmarminge added labelsmacroscope-review

    3. 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:

      FileDiff SizeEstimate
      apps/server/src/orchestration-v2/testkit/fixtures/thread_rollback_after_stop/pi_transcript.ndjson261.24KB$10.45
      apps/server/src/orchestration-v2/testkit/fixtures/thread_rollback/pi_transcript.ndjson162.50KB$6.50
      apps/server/src/orchestration-v2/testkit/fixtures/pi_compaction/pi_transcript.ndjson161.53KB$6.46

      Tip

      To get this pull request reviewed, you can:

      1. Comment @macroscope-app on this PR to request a manual review (monthly spend limits still apply).
      2. Exclude the file(s) above from review by adding a pattern to your .macroscope/ignore.md — note that creating this file replaces Macroscope's built-in default ignores rather than extending them.
      3. Raise your cost limit in your workspace billing settings.
      [Turn off this reminder going forward](https://app.macroscope.com/pingdotgg/settings#Personal)
    4. Thread transfer impact

      ✅ Thread transfer remains within every enforced ceiling.

      ℹ️ No successful main baseline artifact is available yet. This run establishes the initial measurement.

      ProviderMetricMain baselineThis PRImpactPR ceiling
      CodexTotal thread wire—4.9 KiB—6.8 KiB✅
      CodexThread snapshot wire—3.7 KiB—4.9 KiB✅
      CodexLive turn WebSocket wire—1.2 KiB—2.0 KiB✅
      CodexLive turn WebSocket decoded—20.4 KiB—29.3 KiB✅
      CodexLive turn messages—2—8✅
      ClaudeTotal thread wire—4.9 KiB—6.8 KiB✅
      ClaudeThread snapshot wire—3.7 KiB—4.9 KiB✅
      ClaudeLive turn WebSocket wire—1.2 KiB—2.0 KiB✅
      ClaudeLive turn WebSocket decoded—20.7 KiB—29.3 KiB✅
      ClaudeLive turn messages—1—8✅

      Baseline: unavailable · PR result: 736c4ba · Source CI: success

      Scenario 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.

    5. 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
      Review your spending limits in [Billing settings](https://app.macroscope.com/pingdotgg/settings/billing), or comment `@macroscope-app review this PR` to bypass the limit and review now. You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    6. juliusmarminge merged thisde95adc

    7. juliusmarminge closed this

Sign in to join this conversation.