Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): allow handoff after a provider session detaches #13882

MergedYash-Singh1(GitHub profile, opens in a new tab)merged 1 commit intot3code/codex-turn-mapping fromt3code/fix-detached-provider-handoffmerged by Yash-Singh1(GitHub profile, opens in a new tab) View on GitHub

What Changed

Allow a completed thread to switch providers when its session has detached but its active provider thread still has a native reference.

Why

Detached sessions no longer appear in the thread projection. That hid the provider thread needed to hand off on the next turn. Check the active provider thread's native reference when deciding whether handoff is supported.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes
    1. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted

    2. Approvability

      Verdict: Approved at 5ffe144

      Macroscope's review found this PR approvable — This is a small, well-tested bug fix that exposes an existing provider-handoff path after a session detaches, while preserving active-run and missing-native-reference safeguards. It does not alter schemas, defaults, infrastructure, or static-analysis settings.

      You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    3. 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.1 KiB—2.0 KiB✅
      CodexLive turn WebSocket decoded—20.4 KiB—29.3 KiB✅
      CodexLive turn messages—1—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.8 KiB—29.3 KiB✅
      ClaudeLive turn messages—2—8✅

      Baseline: unavailable · PR result: 5ffe144 · 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.

Sign in to join this conversation.