Skip to content
Source
Sign inSign up
pingdotgg/t3code

Stream-disconnect turn failure leaves thread stuck with disabled composer and active goal despite "Retry the turn" prompt #47988

Openvibhor1102(GitHub profile, opens in a new tab) opened this issue 0 comments
vibhor1102(GitHub profile, opens in a new tab)commented

What happened

I originally opened this in #46728, which got false-positively closed by the automated classifier as a feature request shortly after #46746 closed, so I am opening this new one. Sorry if this behavior is deliberate—if it is, please drop a quick reason while closing so I know not to reopen.

When a Codex turn fails mid-stream with "The provider event stream closed unexpectedly. Retry the turn; if it keeps failing, check the provider and server logs.", T3 Code explicitly instructs the user to retry the turn, but leaves the thread in a broken recovery state:

  • The composer primary action is a disabled submit arrow instead of the existing Play (Resume thread) button.
  • The goal banner stays stuck in "Goal set" (status: "active") on an idle thread with only Clear and no Resume button.

This is a defect in existing turn-recovery state handling (not a request for new UI or new behavior): both resume controls already exist, and the error banner already tells the user to retry, but the failure state breaks both checks.

image

Diagnosis

  1. deriveResumableRunId (packages/client-runtime/src/state/threadExecution.ts) only treats a run as resumable when run.status === "interrupted" or (run.status === "failed" and failure.class === "usage_limit"). A stream-disconnect failure (status: "failed", failure.class: "unknown") returns null, so canResumeThread is false and ComposerPrimaryActions disables the composer button instead of showing Play (Resume thread).
  2. presentProviderGoal (packages/client-runtime/src/state/threadExecution.ts) sets canResume: goal.status !== "active" && goal.status !== "complete". Because mid-stream process death does not transition the goal out of "active", goalNowItem (apps/web/src/components/chat/ThreadActivityBanners.tsx) hides Resume even though the thread is idle after a failed turn.
  3. Already reproduced on main in PR #46746 (fix(client-runtime): offer Resume after a turn fails because the provider stream closed), which was closed via factory:fresh after 3 review rounds before a replacement PR was opened.

Steps to reproduce

  1. Start a Codex thread and set a /goal.
  2. Kill the turn's codex app-server process (or trigger a stream disconnect) so the turn fails with "The provider event stream closed unexpectedly. Retry the turn; if it keeps failing, check the provider and server logs.".
  3. Observe the idle thread: the error banner asks to retry the turn, yet the composer button is disabled (no Play button) and the Goal set banner only offers Clear (no Resume).

Version

0.1.14-nightly.20261201.5530

Environment

Linux x64 (7.3.5-200.fc44.x86_64), Node v24.22.1, T3 Code Desktop 0.1.14-nightly.20261201.5530, Codex (gpt-6.2-sol)

Evidence

// Latest run in statev2.sqlite (orchestration_v2_projection_runs): ordinal 25, status "failed"
{
  "class": "unknown",
  "message": "The provider event stream closed unexpectedly. Retry the turn; if it keeps failing, check the provider and server logs.",
  "code": null,
  "retryable": null
}

#46728 (closed as factory:feature-request 8m after #46746 closed with factory:fresh), #46746 (prior fix PR that reproduced this on main)

Fix applied or workaround

Send a manual message (e.g. continue) in the composer to start a new turn under the active goal.

Filed by

Antigravity (Gemini 4 Hydrogen (Medium)) via t3 triage

  1. vibhor1102(GitHub profile, opens in a new tab) added labelsvia-triage

  2. tanstack-source added labelsbug

Sign in to join this conversation.