feat(providers): add Pi coding agent - #7211
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Effect service conventions review of the new Pi provider code. Two error-modeling issues found; everything else (namespace subpath imports, Effect.catchTags usage, layer/driver construction acquiring ChildProcessSpawner/FileSystem/IdAllocatorV2/ServerConfig from the environment, Schema.TaggedErrorClass failures) follows the conventions.
Posted via Macroscope — Effect Service Conventions
There was a problem hiding this comment.
One consistency finding on the new web provider icon wiring. Everything else in the web scope (providerDriverMeta.ts, ProviderModelsSection.tsx, contextWindow.ts, session-logic.ts, AddProviderInstanceDialog.tsx) is registry/data-only and matches the existing per-driver patterns.
Posted via Macroscope — UI Consistency
ApprovabilityVerdict: Skipped Macroscope did not run approvability analysis for this PR. Diff is too large for automated approval analysis, so this PR cannot be approved automatically. You can add or adjust custom eligibility rules. Learn more. |
There was a problem hiding this comment.
One finding on the Pi icon geometry after the tile removal. Everything else in the web scope (provider icon map, driver meta, model placeholder, display-name and picker option entries) follows the existing per-provider patterns.
Posted via Macroscope — UI Consistency
There was a problem hiding this comment.
Effect service conventions: one finding — a raw child-process stderr payload is copied into a log annotation. Elsewhere in this repo process output is reported as lengths only (stdoutLength/stderrLength, lineLength), with explicit tests asserting stderr is not retained in diagnostics.
Posted via Macroscope — Effect Service Conventions
There was a problem hiding this comment.
Two log annotations in the new Pi adapter copy Pi's raw wire error text into the observability stream. Everything else in the Pi files (error attributes, cause handling, driver/layer shape, dependency acquisition) matches the repo's adapter conventions.
Posted via Macroscope — Effect Service Conventions
7c18cde to
f8c8600
Compare
a91b8e2 to
be48afa
Compare
be48afa to
4a6d708
Compare
Trial layer for pingdotgg#7211 pi-provider. Net of the 18 unique CTM commits at aa38c5d, replayed onto the published trial tip. Adds Pi as an Early Access built-in provider (pi --mode rpc) with native steer, abort-based Stop, official-extension subagent projection, and session-tree rollback. Adapted the replay for this line's older CTM pin: thread fixtures include settledOverrideAt, and Pi select/input/editor questions set multiSelect to false. Shared registry files keep the existing OpenCode 2 entries. Not published to origin/trial/orchestrator-v2.1.
|
Live-tested this branch today on macOS against a heavily customized Pi 0.84.2 install (7 extension packages, RPC mode) — overall it held up impressively: provider/model discovery, native session resume, checkpoint revert with correct post-rollback session reconciliation, steer/queue, the MCP bridge, and cross-provider Pi extension re-discovery misses
Impact in my setup: all seven packages vanish (pi-lens, pi-subagents, pi-intercom, pi-mcp-adapter, pi-web-access, pi-messenger, Workaround that worked: adding Fix sketch: for each |
[gpt-5.6-sol] RESPONDING ON BEHALF OF WOUT:Confirmed, this was a real gap. Fixed in T3 now reads user npm package specs from The existing discovery test covers a normal npm extension, the reported scoped Anthropic auth shape, filtered and disabled packages, and the real |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit f015a6c. Configure here.
Bring trial Pi spawn discovery in line with the current pingdotgg#7211 pi-provider tip plus StiensWout#35 diagnose-early-pi-rpc-exits git and project package loading.
|
Follow-up to the extension re-discovery fix (f015a6c): project-local Symptom: a Pi thread spawned by T3 gets none of its project-local extensions ( Root cause: Suggested fix: consult I have this working locally — patch + tests here if useful: astarktc@9c3c80d97 (the new tests cover trusted-ancestor lookup and explicit-false-overrides-always). |
[gpt-5.6-sol] RESPONDING ON BEHALF OF WOUT:Confirmed, this is a real issue and is fixed on the PR head at d7a2028. I validated the behavior against Pi 0.84.2 and your patch: T3 now reads the canonical Pi trust store, follows the nearest-ancestor decision, lets an explicit false override the always default, and falls back to the default only when no saved decision exists. Malformed trust data fails closed. I folded the coverage into the existing project-extension trust test to keep the suite focused. Thanks for the precise report and patch. |
Trial layer for pingdotgg#7211 pi-provider. Net of the 18 unique CTM commits at aa38c5d, replayed onto the published trial tip. Adds Pi as an Early Access built-in provider (pi --mode rpc) with native steer, abort-based Stop, official-extension subagent projection, and session-tree rollback. Adapted the replay for this line's older CTM pin: thread fixtures include settledOverrideAt, and Pi select/input/editor questions set multiSelect to false. Shared registry files keep the existing OpenCode 2 entries. Not published to origin/trial/orchestrator-v2.1.
Bring trial Pi spawn discovery in line with the current pingdotgg#7211 pi-provider tip plus StiensWout#35 diagnose-early-pi-rpc-exits git and project package loading.
|
Bug: Pi extension re-discovery passes macOS AppleDouble sidecars as Third extension-discovery issue in the same area as my two earlier reports (settings.json package extensions; trust.json).
Repro:
Suggested fix: skip dotfile entries ( |

Problem
Pi users depend on their existing models, auth, extensions, skills, context files, and native session history. T3 Code did not have a Pi provider, and a shallow CLI wrapper would lose the customization and session behavior that make Pi useful.
Solution
This adds Pi as an Early Access provider on Orchestrator V2:
$menu; selecting one uses Pi's native skill expansion while unrelated dollar-prefixed text remains unchanged.subagentextension, deduplicates explicit extension arguments, and restores user/npm extensions plus project extensions accepted by Pi's saved trust decision.The MCP bridge, resumable subagent work, and per-model thinking support originated in @mwolson's stacked contribution and retain that authorship.
Related work
Closes #397.
Closes #402.
Addresses #6685.
This supersedes the Pi implementations in #2211, #2748, #2800, #2812, #2831, #2856, #3818, #3947, #4355, #4445, #5688, #5882, and #6319.
This incorporates StiensWout#34 by @mwolson.
Validation
ProviderSessionManager.test.ts; this pass introduces no additional server type errors.Proof
Provider discovery
End-to-end Pi turn
Context meter persists across turns
The active context stays at 21k/272k while Pi's cumulative session total rises from 90k to 111k after the next completed turn.
Configured thinking default
Pi's effective setting appears as the labeled default while the internal selection continues to inherit from Pi.
Native resumable subagent
Native steering
Checkpoint and Pi session-tree rollback
Clean Stop
Stopping an active Pi turn leaves the expected interrupted terminal and no provider stream error.
Stacked on #2829 (
t3code/codex-turn-mapping) until that branch lands.Built by GPT-5.6 Sol in T3 Code through Codex.
Note
High Risk
New subprocess RPC provider with extension injection, MCP credentials in env, and complex turn/session state; bugs could corrupt threads, leak tokens, or wedge Pi processes.
Overview
Pi is wired in as a first-class orchestration-v2 provider: the server spawns the user’s
pibinary in RPC mode and speaks JSONL over stdio (PiRpc), with a largePiAdapterV2that maps Pi events into T3 turns (streaming, tools, compaction, retries, extension UI → runtime requests, subagent child threads, fork/rollback/steer, context usage).Launch wiring materializes T3-owned Pi extensions (MCP bridge + subagent override), injects bearer/MCP env when a session exists, and deduplicates/filters user and trusted project extensions so Pi customization is preserved without conflicting official
subagentregistration.Mobile gets a Pi provider icon and “Pi” display label in model options; ~1.5k lines of
PiAdapterV2tests cover the RPC contract and lifecycle edge cases.Reviewed by Cursor Bugbot for commit d7a2028. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Add Pi coding agent as a provider with orchestration-v2 integration and text generation
pi --mode rpcover stdio JSONL.pi --mode rpcsessions with 180s timeouts and structured JSON decoding.contextUsageinderiveLatestContextWindowSnapshot, preferring it over compaction-derived estimates when present.formatProviderDisplayNameis removed from contextWindow.ts; any callers importing it from that module will break.Macroscope summarized d7a2028.