Skip to content

Existing Claude thread fails every turn with "Provider turn failed." after updating 0.1.6 -> 0.1.7; Claude CLI never launched, cause discarded #31200

Duplicate

Description

@jayasuryajsk

What happened

After the desktop app auto-updated 0.1.6 -> 0.1.7 while a long-running Claude thread had a live CLI process, every message in that thread fails within ~100 ms with "Provider error / Provider turn failed." (8 in a row). New Claude threads in the same project work.

Diagnosis

  • Each failed turn: ClaudeAgentSdkQueryRunner.open finishes in 6-16 ms with span event orchestration-v2.claude-mcp-servers-unavailable ["t3-code"], so setMcpServers() rejected almost at once (healthy open ~430 ms). The stream then ends with no messages; the turn is finalized as transport_error with the default message.
  • The claude binary is never executed: a logging wrapper at ~/.local/bin/claude (only claude on the spawn PATH) never ran during a failed turn.
  • The session is healthy: resuming it (forked, invalid model) works via the plain CLI, T3's exact argv, and [email protected] with T3's spawn wrapper, title, MCP servers, callbacks, supportedDialogKinds: ["resume_return"] and hooks.
  • Thread DB state is clean: provider session ready, no running subagents, no pending requests.
  • The cause is not recorded anywhere: the setMcpServers error is swallowed by orElseSucceed, and claude-query-stream-failed is a plain log that does not reach the trace.
  • The native session JSONL is 320 MB (fine for the CLI/SDK on their own).

Steps to reproduce

  1. On 0.1.6, use a Claude thread with many turns (Opus 5.5 High, bypassPermissions), CLI process alive.
  2. Desktop app auto-updates to 0.1.7; server restarts and runs migrations 77-79. (Claude CLI had auto-updated 2.1.317 -> 2.1.318 a minute earlier.)
  3. Send any message in that thread: it fails immediately, on every retry.
  4. A new thread in the same project works.

Version

Bug happened on T3 Code Desktop 0.1.7 (commit 322f654); it worked on 0.1.6 right before the auto-update. Claude Code CLI 2.1.318.

Environment

macOS 27.2.0 (arm64), desktop app with bundled local server, Node v24.22.1. Project under ~/Documents.

Evidence

- Last success 2026-11-04T21:06Z on 0.1.6; restart and migrations 77-79 at 21:16:34Z (service.version 0.1.6 -> 0.1.7); failed runs at 21:32, 21:33, 21:39, 21:43 (x2), 21:51, 22:01, 22:11Z.
- Failure record: `{"class":"transport_error","message":"Provider turn failed.","code":null}`
- Provider event log per failed turn: only outgoing `query.open` (resume set, hasMcpServers) and `prompt.offer`, no incoming events.

Related issues

#26082, #26382, #5943, #30272 (causes hidden behind "Provider turn failed.")

Fix applied or workaround

New thread, or continue the old conversation with claude --resume <session-id> in the project dir. Restarting does not help. Suggested fix: surface the setMcpServers / stream-end cause, at least to the trace.

Filed by

Claude Opus 5.5 (claude-opus-5-5) via Claude Code, T3 Code triage playbook.

Image

Activity

  1. added
    via-triage
    on Nov 4, 2026
  2. orestesgaolin commented on Nov 6, 2026

    @orestesgaolin

    Same failure here, on T3 Code Desktop 0.1.7 (commit 322f654), macOS arm64, Claude Code CLI 2.1.319. It has the same signature as above, and some additional data:

    Timeline (UTC, 2026-11-06)

    • 19:10 the desktop app downloads an update. 19:12–19:13 Claude CLI auto-updates 2.1.317 -> 2.1.319. About 19:15 the server restarts (it restarts again at 19:24). The restart cancels about 13 running Claude turns and subagent threads.
    • 19:16–19:28: every Claude open fails, in all threads (8 existing top-level threads, 7 delegated-task threads, and one new thread created at 19:25). Each ClaudeAgentSdkQueryRunner.open finishes in 10–165 ms (once 1.3 s) with span event orchestration-v2.claude-mcp-servers-unavailable {"servers":["t3-code"]}. The provider event log has only outgoing query.open + prompt.offer, no incoming events, and the turn ends as "Provider turn failed." The CLI never writes to the session JSONL.
    • From 19:28: opens take 2.2–3.0 s with no such event, and new threads and resumes work again. Sending a continue message to 4 of the failed top-level threads at 19:30–19:31 worked.
    • One thread does not recover. Every send (19:31, 19:34, 19:36, …) still fails in 14–80 ms with claude-mcp-servers-unavailable ["t3-code"]. Its last successful turn was the server-driven idle /compact (compactIdleThreads, idleCompaction: beforeCacheExpires) at 09:15, about 10 h before the update. The native session is healthy: claude -p --resume <id> --fork-session --max-turns 1 "Reply with only: ok" in the project dir answers normally.

    So in our case the t3-code MCP server was unavailable to all Claude sessions for about 12 minutes after the update/restart, and then stayed unavailable for one existing thread. That suggests per-thread MCP session state that is kept across the restart (or created during the first minutes after it) and is never rebuilt.

    Also seen, possibly related

    • The server process runs with PATH=/usr/bin:/bin:/usr/sbin:/sbin (launched from the Dock). Probes fail all the time: claude --version (NotFound), codex app-server, gh ("No GitHub credential on the server"), tailscale status. Agent turns still work, because the provider environment comes from the cached login shell environment.
    • event-loop-stalls.ndjson: 15 stalls from 18:56 to 19:13, max 10.8 s. statev2.sqlite is 3.26 GB, and server.trace.ndjson rotates (10 MB) about every 5 minutes.

    Request

    Same as above: please surface the setMcpServers / stream-end cause in the turn error, and rebuild the thread's MCP session when it is unavailable, so one bad thread does not stay unusable.

  3. juliusmarminge commented on Dec 1, 2026

    @juliusmarminge
    Member

    This is the same problem as #39299, so I'm closing it in favour of that one. If it is different, say how and it will be reopened.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    via-triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions