Skip to content

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

Open

Description

@ri200

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:

    claude auth status

    Then run:

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

    It returns:

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

    import subprocess
    
    r = subprocess.run(
        ["/Users/<user>/.local/bin/claude", "-p", "Reply with exactly: OK"],
        cwd="/Users/<user>/Documents/claude-backup",
        text=True,
        capture_output=True,
    )
    
    print("returncode:", r.returncode)
    print("stdout:")
    print(r.stdout)
    print("stderr:")
    print(r.stderr)

    Result:

    returncode: 0
    stdout:
    OK
    
    stderr:
    
  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:

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

  7. Send:

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

    Provider 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:
{
  "class": "transport_error",
  "message": "Provider turn failed.",
  "code": null,
  "retryable": null
}

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

query.open
prompt.offer

The query.open configuration includes:

model: claude-sonnet-5
permissionMode: auto
cwd: /Users/<user>/Documents/claude-backup
pathToClaudeCodeExecutable: /Users/<user>/.local/bin/claude
effort: high
includePartialMessages: 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:

system:init
assistant
result

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:

Impact

Major degradation or frequent failure

Version or commit

0.0.46-nightly.20261005.2702 (commit cfa4f76)

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

# Standalone Claude CLI succeeds

$ claude -p "Reply with exactly: OK"
OK


# Non-TTY subprocess also succeeds

returncode: 0
stdout:
OK

stderr:


# T3 Claude provider session

driver: claudeAgent
status: ready
model: claude-sonnet-5
cwd: ~/Documents/claude-backup
lastError: null


# T3 Claude provider turn

status: failed
startedAt: 2026-10-06T00:16:13.601Z
completedAt: 2026-10-06T00:16:13.612Z


# Persisted failure

{
  "class": "transport_error",
  "message": "Provider turn failed.",
  "code": null,
  "retryable": null
}


# Provider protocol log for the same fresh failing run

OUT: query.open
  model=claude-sonnet-5
  permissionMode=auto
  cwd=~/Documents/claude-backup
  pathToClaudeCodeExecutable=~/.local/bin/claude

OUT: prompt.offer
  "OK とだけ返してください。"

# No subsequent incoming system:init / assistant / result is logged
# before the provider turn is marked failed.


# Control test in the same T3 project

providerInstanceId: codex
model: gpt-6-luna
status: completed

Screenshots, recordings, or supporting files

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

Workaround

Claude Code itself works normally outside T3.

Current workaround:

cd ~/Documents/claude-backup
claude

or:

claude -p "..."

Codex also works inside T3 on the same project.

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

Activity

  1. added
    bugSomething is broken or behaving incorrectly.
    needs-triageIssue needs maintainer review and initial categorization.
    on Oct 6, 2026
  2. harshalranjhani commented on Oct 7, 2026

    @harshalranjhani

    bumping this as i am facing the same issue

  3. juliusmarminge commented on Oct 8, 2026

    @juliusmarminge
    Member

    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.
  4. harshalranjhani commented on Oct 8, 2026

    @harshalranjhani

    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]:

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

    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
    [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}}}}
    [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
    {"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"}}
    {"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"}}
    {"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"}}
    {"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"}}
    {"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"}}
    {"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"}}
    {"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"}}
    {"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"}}
    {"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"}}
    {"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"}}
    {"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"}}
    {"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"}}
    {"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"}}
  5. ri200 commented on Oct 8, 2026

    @ri200
    Author

    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:

    11:45:37.794Z outgoing query.open
    11: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.

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

    bugSomething is broken or behaving incorrectly.needs more infoInitial triage showed no bug. Awaiting more infoneeds-triageIssue needs maintainer review and initial categorization.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions