Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): surface provider CLI startup diagnostics #22763

Closedjuliusmarmingewants to merge 2 commits intomain fromfix/issue-5943opened View on GitHub

juliusmarmingecommented

A provider CLI can exit during startup while the turn reports a control-RPC failure or a generic error, hiding the process diagnostic. Reproduced on current main a003b73aa8 against an isolated development server: wrapper CLIs print an EPERM diagnostic and exit 1; Codex shows only its exit code and Claude shows “Provider turn failed.”

References #5943.

The fix retains a bounded stderr tail while draining each CLI, preserves process exit status, and carries typed process errors through the existing sanitized failure formatter. Permission and mode behavior are unchanged.

Validation at a7e642d26c: 222 scoped tests passed across Claude adapter, Codex client/termination, and provider-failure tests; the final Claude fixture rerun passed both cases. Scoped server, Codex package, and provider-core typechecks pass. Formatting passes; lint reports one existing unused-variable warning. Four startup cases failed on the base implementation before the fix. Independent reviews and runtime after evidence are pending.

Evidence: baseline runtime transcript.

Codex baselineClaude baseline
Codex startup failure omits the EPERM diagnosticClaude startup failure is reduced to Provider turn failed

Unverified: macOS desktop TCC trigger (Linux VM); native desktop and mobile clients. Real-data seed failed due to incompatible migration history; reproduction used fresh isolated state and existing-thread retry.

Model: GPT-6.1-Sol. Harness: Codex through T3 Code, with delegated implementation and review steps recorded below when complete.

    1. github-actions[bot](GitHub profile, opens in a new tab)commented

      Thread transfer impact

      ✅ Thread transfer remains within every enforced ceiling.

      ProviderMetricMain baselineThis PRImpactPR ceiling
      CodexTotal thread wire5.0 KiB5.0 KiB0 B (0.0%)6.8 KiB✅
      CodexThread snapshot wire3.8 KiB3.8 KiB0 B (0.0%)4.9 KiB✅
      CodexLive turn WebSocket wire1.2 KiB1.2 KiB0 B (0.0%)2.0 KiB✅
      CodexLive turn WebSocket decoded20.9 KiB20.9 KiB0 B (0.0%)29.3 KiB✅
      CodexLive turn messages220 (0.0%)8✅
      ClaudeTotal thread wire5.0 KiB5.0 KiB−24 B (−0.5%)6.8 KiB✅
      ClaudeThread snapshot wire3.8 KiB3.8 KiB0 B (0.0%)4.9 KiB✅
      ClaudeLive turn WebSocket wire1.2 KiB1.2 KiB−24 B (−2.0%)2.0 KiB✅
      ClaudeLive turn WebSocket decoded21.2 KiB21.2 KiB−41 B (−0.2%)29.3 KiB✅
      ClaudeLive turn messages21−1 (−50.0%)8✅

      Baseline: efdda5e · PR result: a7e642d · 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: 108.5 KiB
      • Claude decoded thread snapshot: 108.8 KiB

      Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

    2. tanstack-source added labelsbug

    3. Closing this draft: it has sat unfinished, and the fix for #5943 is being written again from current main by the factory. The new pull request will link the issue.

    4. juliusmarminge closed this

Sign in to join this conversation.