[Bug]: Claude turns fail immediately with transport_error on macOS while standalone CLI and non-TTY subprocess succeed#16297

opened28d agobyRri200

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. On macOS, authenticate Claude Code with a Claude Max subscription.

  2. Confirm Claude Code works normally outside T3:

    bash
    1claude auth status

    Then run:

    bash
    1/Users/<user>/.local/bin/claude -p "Reply with exactly: OK"

    It returns:

    text
    1OK
  3. Also confirm that Claude works when launched as a non-TTY child process:

    python
    1import subprocess
    2
    3r = subprocess.run(
    4 ["/Users/<user>/.local/bin/claude", "-p", "Reply with exactly: OK"],
    5 cwd="/Users/<user>/Documents/claude-backup",
    6 text=True,
    7 capture_output=True,
    8)
    9
    10print("returncode:", r.returncode)
    11print("stdout:")
    12print(r.stdout)
    13print("stderr:")
    14print(r.stderr)

    Result:

    text
    1returncode: 0
    2stdout:
    3OK
    4
    5stderr:
  4. In T3 Code, select the same macOS machine/environment and confirm that the Claude provider shows as authenticated.

  5. Configure the Claude binary explicitly as:

    text
    1/Users/<user>/.local/bin/claude
  6. Open a fresh local T3 thread and select Claude Sonnet 5.

  7. Send:

    text
    1OK とだけ返してください。
  8. The Claude turn fails immediately with:

    text
    1Provider turn failed.
  9. The same behavior also reproduces with Claude Opus 5.5.

  10. In the same T3 project/thread environment, switch to Codex / GPT-6 Luna and send the same prompt.

  11. The Codex turn completes normally and returns OK.

The Claude failure still reproduces after:

  • creating a fresh Claude thread
  • toggling the Claude provider off and on
  • switching between Claude Opus 5.5 and Claude Sonnet 5
  • restarting T3 Code
  • updating T3 Code to Nightly 0.0.46-nightly.20261005.2702

Expected behavior

A Claude turn launched from T3 should behave like the same authenticated Claude Code installation launched directly from the terminal.

Since both direct claude -p execution and a non-TTY subprocess invocation succeed using the same Claude installation and project directory, the T3 Claude provider should return OK rather than failing before model output begins.

Actual behavior

The Claude provider is detected as authenticated and its provider session successfully reaches ready, but every Claude turn fails almost immediately.

For the latest Claude Sonnet 5 reproduction:

  • workspace preparation completes successfully
  • Claude provider session reaches ready
  • provider session lastError is null
  • T3 successfully creates a native Claude thread
  • the provider turn starts and fails about 11 ms later
  • the persisted failure is:
json
1{
2 "class": "transport_error",
3 "message": "Provider turn failed.",
4 "code": null,
5 "retryable": null
6}

The provider protocol log for the same fresh turn contains the outgoing events:

text
1query.open
2prompt.offer

The query.open configuration includes:

text
1model: claude-sonnet-5
2permissionMode: auto
3cwd: /Users/<user>/Documents/claude-backup
4pathToClaudeCodeExecutable: /Users/<user>/.local/bin/claude
5effort: high
6includePartialMessages: true

The user prompt is then sent via prompt.offer.

However, no subsequent incoming event is recorded before T3 marks the turn failed. In particular, there is no:

text
1system:init
2assistant
3result

for the current failing fresh thread.

The same T3 project/environment successfully runs Codex / GPT-6 Luna.

The issue reproduces with both Claude Opus 5.5 and Claude Sonnet 5.

Related issues:

  • #3530 is similar because Claude Max works outside T3 but generation fails inside T3. However, #3530 reports explicit 401 authentication failures. This reproduction currently persists as transport_error with code: null.
  • #15011 reports almost the same outgoing-only query.open / prompt.offer pattern, but it was a Windows executable-resolution bug. This reproduction is on macOS and T3 is already passing the absolute Claude executable path.
  • #15243 also reports Claude transport_error, but concerns imported Claude sessions and resume semantics. This reproduction happens on a brand-new T3-created thread.

Impact

Major degradation or frequent failure

Version or commit

0.0.46-nightly.20261005.2702 (commit cfa4f765ec05950a032b6c1cf9cdfff0c2391545)

Environment

macOS 26.5.2, Apple Silicon (arm64) T3 Code Desktop Nightly: 0.0.46-nightly.20261005.2702 Claude Code: 2.1.289 Claude authentication: Claude Max subscription via claude.ai / OAuth Provider: claudeAgent Models reproduced: claude-opus-5-5, claude-sonnet-5 Runtime mode: auto Claude binary: ~/.local/bin/claude Project: local Git repository under ~/Documents

Logs or stack traces

shell
1# Standalone Claude CLI succeeds
2
3$ claude -p "Reply with exactly: OK"
4OK
5
6
7# Non-TTY subprocess also succeeds
8
9returncode: 0
10stdout:
11OK
12
13stderr:
14
15
16# T3 Claude provider session
17
18driver: claudeAgent
19status: ready
20model: claude-sonnet-5
21cwd: ~/Documents/claude-backup
22lastError: null
23
24
25# T3 Claude provider turn
26
27status: failed
28startedAt: 2026-10-06T00:16:13.601Z
29completedAt: 2026-10-06T00:16:13.612Z
30
31
32# Persisted failure
33
34{
35 "class": "transport_error",
36 "message": "Provider turn failed.",
37 "code": null,
38 "retryable": null
39}
40
41
42# Provider protocol log for the same fresh failing run
43
44OUT: query.open
45 model=claude-sonnet-5
46 permissionMode=auto
47 cwd=~/Documents/claude-backup
48 pathToClaudeCodeExecutable=~/.local/bin/claude
49
50OUT: prompt.offer
51 "OK とだけ返してください。"
52
53# No subsequent incoming system:init / assistant / result is logged
54# before the provider turn is marked failed.
55
56
57# Control test in the same T3 project
58
59providerInstanceId: codex
60model: gpt-6-luna
61status: completed

Screenshots, recordings, or supporting files

スクリーンショット 2026-10-06 10.36.46.png

Workaround

Claude Code itself works normally outside T3.

Current workaround:

bash
1cd ~/Documents/claude-backup
2claude

or:

bash
1claude -p "..."

Codex also works inside T3 on the same project.

No workaround has been found that makes Claude turns work inside T3.

Thanks for ruling so much out, @ri200 (and @harshalranjhani for confirming). A turn that fails about 11 ms after prompt.offer, with nothing back from Claude, means the Claude process or its SDK stream failed before producing any output. T3 records every stream failure in that position as a generic transport_error, so the real cause is hidden in the UI. #16303 will start showing it.

Until then, could one of you share these from a failing turn? Please redact tokens, pairing credentials and home-directory paths.

  1. The lines of ~/.t3/userdata/logs/server.trace.ndjson from the failing turn, especially any span or log with claude in it and an error or cause.
  2. The provider event log for that thread from ~/.t3/userdata/logs/provider/, from query.open through the failure.
  3. Your Claude Code version (claude --version), and whether your shell profile or ~/.claude/settings.json sets anything unusual (apiKeyHelper, a proxy, ANTHROPIC_* variables). The SDK launches Claude with T3's environment, not your terminal's.
  4. @harshalranjhani: your macOS version, Claude Code version and T3 build, so we can see what the two setups share.
Synced from GitHub

Thanks — I see the failure on both my local macOS 27 setup and a remote Linux environment. The details below are from a fresh failing turn on the remote Linux provider host, accessed from my Mac; these versions and logs are not from the Mac-local provider.

  • Claude Code: 2.1.294 (claude --version)
  • T3 server: 0.0.46-nightly.20261008.2813
  • Provider host: Linux x86_64; process runs as root
  • Model: claude-sonnet-5-5
  • Permission mode: bypassPermissions
  • Prompt: hello
  • Thread: af3c2406-43cb-4ec3-bd72-6e449b6590bc, first turn

The turn started at 2026-10-08T09:26:15.410Z and failed at 2026-10-08T09:26:16.002Z (592 ms total). query.open was logged at 09:26:15.491Z, followed by prompt.offer at 09:26:15.493Z. There are no incoming Claude events for this turn: no system:init, assistant, or result. The UI showed Provider turn failed.

On this Linux host, ~/.claude/settings.json contains theme and enabledPlugins; it has no apiKeyHelper or env entries. The active T3 server process has no ANTHROPIC_*, CLAUDE_*, or proxy environment variables. No direct definitions of those variables or apiKeyHelper references were found in the shell profiles checked (sourced files were not recursively evaluated).

The trace contains successful ClaudeAdapterV2.openSession, ClaudeAdapterV2.ensureThread, ClaudeAgentSdkQueryRunner.open, and ClaudeAdapterV2.startTurn spans, but no underlying Claude error/cause. The service log does record the stream failure, with its cause collapsed to [Object]:

text
1[09:26:15.966] WARN (#21320): orchestration-v2.claude-query-stream-failed
2 {
3 providerSessionId: 'provider-session:provider-instance:claudeAgent:thread:af3c2406-43cb-4ec3-bd72-6e449b6590bc:b9802bac-0948-4872-b2f8-5f47ac4d15b4',
4 providerThreadId: 'provider-thread:provider:claudeAgent:native-thread:pending%3Arun%3Athread%3Aaf3c2406-43cb-4ec3-bd72-6e449b6590bc%3Aordinal%3A1',
5 providerTurnId: 'provider-turn:provider:claudeAgent:native-turn:turn%3Arun-attempt%3Arun%3Arun%253Athread%253Aaf3c2406-43cb-4ec3-bd72-6e449b6590bc%253Aordinal%253A1%3Aattempt%3A1',
6 cause: { _id: 'Cause', failures: [ [Object] ] }
7 }

Home-directory paths are replaced with <HOME> in the excerpts below. Tokens and pairing credentials are excluded/redacted.

Provider event log — failing Claude turn, complete excerpt
text
1[2026-10-08T09:26:15.491Z] NTIVE: {"provider":"claudeAgent","protocol":"claude-agent-sdk.query","kind":"protocol","providerSessionId":"provider-session:provider-instance:claudeAgent:thread:af3c2406-43cb-4ec3-bd72-6e449b6590bc:b9802bac-0948-4872-b2f8-5f47ac4d15b4","event":{"direction":"outgoing","stage":"decoded","payload":{"type":"query.open","options":{"model":"claude-sonnet-5-5","tools":{"type":"preset","preset":"claude_code"},"permissionMode":"bypassPermissions","sessionId":"1e50f054-d645-45e4-ba1b-c4ed351c1825","cwd":"<HOME>/.t3/scratch/2026-10-08-hello-9b6590bc","allowedTools":["mcp__t3-code__*"],"settings":{"showThinkingSummaries":true},"effort":"high","includePartialMessages":true,"pathToClaudeCodeExecutable":"<HOME>/.local/bin/claude","hasExtraArgs":true,"allowDangerouslySkipPermissions":true,"hasCanUseTool":true,"hasEnvironment":true,"hasMcpServers":true}}}}
2[2026-10-08T09:26:15.493Z] NTIVE: {"provider":"claudeAgent","protocol":"claude-agent-sdk.query","kind":"protocol","providerSessionId":"provider-session:provider-instance:claudeAgent:thread:af3c2406-43cb-4ec3-bd72-6e449b6590bc:b9802bac-0948-4872-b2f8-5f47ac4d15b4","event":{"direction":"outgoing","stage":"decoded","payload":{"type":"prompt.offer","message":{"type":"user","message":{"role":"user","content":"hello"},"parent_tool_use_id":null,"uuid":"e0b06fb8-cf93-49a5-be48-a9f3b3bb0693"}}}}
server.trace.ndjson — Claude spans and thread events around the failing turn
jsonl
1{"type":"effect-span","name":"ClaudeAdapterV2.openSession","traceId":"735afc97f3a899e67c9ca00877f14631","spanId":"56e88223e00ed40a","parentSpanId":"e8ccf29d612bad69","sampled":true,"kind":"internal","startTimeUnixNano":"1791451575399847752","endTimeUnixNano":"1791451575401324572","durationMs":1.47682,"attributes":{"server.mode":"web","server.port":3773,"server.host":"default","startup.phase":"orchestration-v2.effect-worker.start"},"events":[],"links":[],"exit":{"_tag":"Success"}}
2{"type":"effect-span","name":"orchestrationV2.EventSink.write","traceId":"735afc97f3a899e67c9ca00877f14631","spanId":"ea3b07995b828839","parentSpanId":"e8ccf29d612bad69","sampled":true,"kind":"internal","startTimeUnixNano":"1791451575401976275","endTimeUnixNano":"1791451575406849847","durationMs":4.873572,"attributes":{"server.mode":"web","server.port":3773,"server.host":"default","startup.phase":"orchestration-v2.effect-worker.start","orchestration_v2.command_id":null,"orchestration_v2.event_count":1,"orchestration_v2.thread_id":"af3c2406-43cb-4ec3-bd72-6e449b6590bc"},"events":[],"links":[],"exit":{"_tag":"Success"}}
3{"type":"effect-span","name":"ClaudeAdapterV2.ensureThread","traceId":"735afc97f3a899e67c9ca00877f14631","spanId":"97ab2e8f240ee0af","parentSpanId":"e8ccf29d612bad69","sampled":true,"kind":"internal","startTimeUnixNano":"1791451575408238411","endTimeUnixNano":"1791451575408472000","durationMs":0.233589,"attributes":{"server.mode":"web","server.port":3773,"server.host":"default","startup.phase":"orchestration-v2.effect-worker.start"},"events":[],"links":[],"exit":{"_tag":"Success"}}
4{"type":"effect-span","name":"orchestrationV2.EventSink.writeIfRunCurrent","traceId":"735afc97f3a899e67c9ca00877f14631","spanId":"753c8b13c35ff0cb","parentSpanId":"e8ccf29d612bad69","sampled":true,"kind":"internal","startTimeUnixNano":"1791451575410769249","endTimeUnixNano":"1791451575419383458","durationMs":8.614209,"attributes":{"server.mode":"web","server.port":3773,"server.host":"default","startup.phase":"orchestration-v2.effect-worker.start","orchestration_v2.command_id":null,"orchestration_v2.event_count":5,"orchestration_v2.run_id":"run:thread:af3c2406-43cb-4ec3-bd72-6e449b6590bc:ordinal:1","orchestration_v2.thread_id":"af3c2406-43cb-4ec3-bd72-6e449b6590bc"},"events":[],"links":[],"exit":{"_tag":"Success"}}
5{"type":"effect-span","name":"ClaudeAdapterV2.startTurn","traceId":"735afc97f3a899e67c9ca00877f14631","spanId":"7d71697a3276d682","parentSpanId":"e8ccf29d612bad69","sampled":true,"kind":"internal","startTimeUnixNano":"1791451575464819457","endTimeUnixNano":"1791451575492808239","durationMs":27.988782,"attributes":{"server.mode":"web","server.port":3773,"server.host":"default","startup.phase":"orchestration-v2.effect-worker.start"},"events":[],"links":[],"exit":{"_tag":"Success"}}
6{"type":"effect-span","name":"discoverClaudeSkills","traceId":"735afc97f3a899e67c9ca00877f14631","spanId":"53a899c295d530e6","parentSpanId":"7d71697a3276d682","sampled":true,"kind":"internal","startTimeUnixNano":"1791451575467066282","endTimeUnixNano":"1791451575471323367","durationMs":4.257085,"attributes":{"server.mode":"web","server.port":3773,"server.host":"default","startup.phase":"orchestration-v2.effect-worker.start"},"events":[],"links":[],"exit":{"_tag":"Success"}}
7{"type":"effect-span","name":"resolveClaudeConfigDirPath","traceId":"735afc97f3a899e67c9ca00877f14631","spanId":"49d2c64f1cee7ad5","parentSpanId":"53a899c295d530e6","sampled":true,"kind":"internal","startTimeUnixNano":"1791451575467128368","endTimeUnixNano":"1791451575467184634","durationMs":0.056266,"attributes":{"server.mode":"web","server.port":3773,"server.host":"default","startup.phase":"orchestration-v2.effect-worker.start"},"events":[],"links":[],"exit":{"_tag":"Success"}}
8{"type":"effect-span","name":"ClaudeAgentSdkQueryRunner.open","traceId":"735afc97f3a899e67c9ca00877f14631","spanId":"a9afde72ef042c79","parentSpanId":"7d71697a3276d682","sampled":true,"kind":"internal","startTimeUnixNano":"1791451575473849055","endTimeUnixNano":"1791451575491682217","durationMs":17.833162,"attributes":{"server.mode":"web","server.port":3773,"server.host":"default","startup.phase":"orchestration-v2.effect-worker.start"},"events":[],"links":[],"exit":{"_tag":"Success"}}
9{"type":"effect-span","name":"orchestrationV2.EventSink.write","traceId":"735afc97f3a899e67c9ca00877f14631","spanId":"81bed3730e99ab8e","parentSpanId":"e8ccf29d612bad69","sampled":true,"kind":"internal","startTimeUnixNano":"1791451575512666329","endTimeUnixNano":"1791451575521090401","durationMs":8.424072,"attributes":{"server.mode":"web","server.port":3773,"server.host":"default","startup.phase":"orchestration-v2.effect-worker.start","orchestration_v2.command_id":null,"orchestration_v2.event_count":1,"orchestration_v2.thread_id":"af3c2406-43cb-4ec3-bd72-6e449b6590bc"},"events":[],"links":[],"exit":{"_tag":"Success"}}
10{"type":"effect-span","name":"orchestrationV2.EventSink.write","traceId":"735afc97f3a899e67c9ca00877f14631","spanId":"58ee8531803153b3","parentSpanId":"e8ccf29d612bad69","sampled":true,"kind":"internal","startTimeUnixNano":"1791451575979820905","endTimeUnixNano":"1791451575988293738","durationMs":8.472833,"attributes":{"server.mode":"web","server.port":3773,"server.host":"default","startup.phase":"orchestration-v2.effect-worker.start","orchestration_v2.command_id":null,"orchestration_v2.event_count":1,"orchestration_v2.thread_id":"af3c2406-43cb-4ec3-bd72-6e449b6590bc"},"events":[],"links":[],"exit":{"_tag":"Success"}}
11{"type":"effect-span","name":"orchestrationV2.EventSink.writeIfRunCurrent","traceId":"735afc97f3a899e67c9ca00877f14631","spanId":"23823b097397f0bc","parentSpanId":"e8ccf29d612bad69","sampled":true,"kind":"internal","startTimeUnixNano":"1791451575989655603","endTimeUnixNano":"1791451575993611603","durationMs":3.956,"attributes":{"server.mode":"web","server.port":3773,"server.host":"default","startup.phase":"orchestration-v2.effect-worker.start","orchestration_v2.command_id":null,"orchestration_v2.event_count":1,"orchestration_v2.run_id":"run:thread:af3c2406-43cb-4ec3-bd72-6e449b6590bc:ordinal:1","orchestration_v2.thread_id":"af3c2406-43cb-4ec3-bd72-6e449b6590bc"},"events":[],"links":[],"exit":{"_tag":"Success"}}
12{"type":"effect-span","name":"orchestrationV2.EventSink.write","traceId":"735afc97f3a899e67c9ca00877f14631","spanId":"832c4bfd432d5786","parentSpanId":"e8ccf29d612bad69","sampled":true,"kind":"internal","startTimeUnixNano":"1791451575994588826","endTimeUnixNano":"1791451576001168449","durationMs":6.579623,"attributes":{"server.mode":"web","server.port":3773,"server.host":"default","startup.phase":"orchestration-v2.effect-worker.start","orchestration_v2.command_id":null,"orchestration_v2.event_count":1,"orchestration_v2.thread_id":"af3c2406-43cb-4ec3-bd72-6e449b6590bc"},"events":[],"links":[],"exit":{"_tag":"Success"}}
13{"type":"effect-span","name":"orchestrationV2.EventSink.writeIfRunCurrent","traceId":"735afc97f3a899e67c9ca00877f14631","spanId":"c2a7d32f92a1aee9","parentSpanId":"e8ccf29d612bad69","sampled":true,"kind":"internal","startTimeUnixNano":"1791451576009819436","endTimeUnixNano":"1791451576047832302","durationMs":38.012866,"attributes":{"server.mode":"web","server.port":3773,"server.host":"default","startup.phase":"orchestration-v2.effect-worker.start","orchestration_v2.command_id":null,"orchestration_v2.event_count":4,"orchestration_v2.run_id":"run:thread:af3c2406-43cb-4ec3-bd72-6e449b6590bc:ordinal:1","orchestration_v2.thread_id":"af3c2406-43cb-4ec3-bd72-6e449b6590bc"},"events":[],"links":[],"exit":{"_tag":"Success"}}
Synced from GitHub

Thanks for the guidance. I reproduced the failure again on my original macOS provider host and captured a fresh provider event log and server trace.

Environment: macOS 26.5.2, Apple Silicon arm64, Claude Code 2.1.289, Claude Sonnet 5.5, permission mode auto, fresh T3 thread.

On October 8, 2026, at approximately 11:45:37 UTC, the provider event log recorded only:

text
111:45:37.794Z outgoing query.open
211:45:37.794Z outgoing prompt.offer

There were no incoming system:init, assistant, result, or other provider events. The UI displayed Provider turn failed.

I also captured the server trace during this reproduction. It contained 903 spans: 894 Success and 9 Failure.

The Claude-related startup spans all succeeded, including ClaudeAdapterV2.openSession, ClaudeAdapterV2.ensureThread, ClaudeAgentSdkQueryRunner.open, ClaudeAdapterV2.startTurn, and orchestrationV2.providerTurnStart.start.

Interestingly, all nine failed spans belonged to Codex-based thread-title generation: three failures each for CodexTextGeneration.generateThreadTitle, runCodexJson, and runCodexJson.runCodexCommand. These may be unrelated to the Claude stream failure, but they occurred around the same time.

My ~/.claude/settings.json contains only theme, with no apiKeyHelper or env entries. The terminal environment contains no ANTHROPIC_*, CLAUDE_*, or proxy variables, and no direct references were found in the common shell profiles checked. This does not establish the environment of the T3 server process itself.

The direct Claude CLI and non-TTY subprocess succeeded in my original reproduction tests; those control tests were not repeated during this latest capture.

I could not identify an underlying Claude error/cause in the trace. The visible spans cover successful startup, but not the subsequent SDK stream failure.

Please let me know if there is a specific macOS Desktop backend log location or additional diagnostic that would expose the underlying stream error.