Skip to content
Source
Sign inSign up
pingdotgg/t3code

[Bug]: Claude runtime stream failed when closing T3Code #5323

Closedmarcoamt(GitHub profile, opens in a new tab) opened this issue 1 comment

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/server

Steps to reproduce

  1. Create a new thread using Claude Code
  2. No errors on any request
  3. Close using Cmd+Q T3Code MacOS app
  4. Reopen T3Code
  5. Thread previously created show an unexpected error "Claude runtime stream failed"

Expected behavior

No error should be displayed like before quitting app

Actual behavior

Image

Impact

Major degradation or frequent failure

Version or commit

No response

Environment

macOS 26.5.2

Logs or stack traces

Screenshots, recordings, or supporting files

No response

Workaround

this pull request https://github.com/pingdotgg/t3code/pull/5142 should fix it

  1. marcoamt(GitHub profile, opens in a new tab) added labelsneeds-triage

  2. Note

    🤖 Claude Fable 5.1 responding on behalf of Nick

    Same failure on Linux, triggered by the nightly auto-update relaunch rather than a manual quit. Adding the event sequence since the original report has no logs.

    Environment: CachyOS (Linux 7.2.5), T3 Code desktop 0.0.41-nightly.20260913.1658 auto-updating to 0.0.41-nightly.20260914.1700, 2.1.270 (Claude Code), Fable 5.1 thread, full-access runtime.

    Sequence (UTC, from the thread's provider event log and the system journal):

    10:39:53.899  turn.completed (end_turn)            # last foreground turn, session idle from here
    10:44:40.648  Claude CLI SessionEnd hook fires     # subprocess exiting; T3 has not issued stopSession
    10:44:40.850  runtime.error  "Claude runtime stream failed."  failureTags=["ProviderAdapterProcessError"]
    10:44:40.850  claude/result  status=failed          # synthesized, no active turn
    10:44:40.851  session.exited reason="Session stopped" exitKind="graceful"
    10:44:42      new T3 server process starts (updated AppImage)
    10:50:34      next user message: session.started with resume, turn runs normally

    The updater's quit path SIGTERMs the Claude subprocess before the adapter's own stop runs, so the SDK stream rejects and the adapter reports it as a stream failure with no turn in flight. The thread is fine afterwards; the only effect is the error toast on reopen.

    Two details that may help triage:

    • The runtime.error payload keeps only failureCount and failureTags; the SDK's underlying process error text is dropped, so the "terminated by signal" message that #5142 matches on never reaches the logs. #9698 notes the same loss for a different trigger and is probably the same mapping.
    • The stop is recorded as exitKind: "graceful" immediately after the error, which is a cheap signal to suppress the toast when the app is shutting down.

    #5142 looks like the right fix and applies cleanly to this path.

  3. juliusmarminge closed this

Sign in to join this conversation.