[Bug] sdk_stream_ended_no_result over VS Code Remote-SSH (related to #59374, locked)
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
This appears related to #59374 (VS Code extension: streams end with sdk_stream_ended_no_result after first chunk), which is locked and I can't comment on directly. Filing separately with an additional environment: VS Code Remote-SSH to a remote HPC login node — showing this isn't limited to a single local machine as that issue's title suggests.
What Should Happen?
The Claude Code process should complete the API stream and tool call normally without being killed. If the underlying API stream genuinely fails or is interrupted (e.g. due to a transient network issue or server-side error), the extension should handle this gracefully — for example, by retrying the stream, surfacing a clear, recoverable error message to the user, or ending the tool call cleanly — rather than terminating the entire process with SIGKILL, which crashes the whole session and loses in-progress context.
Error Messages/Logs
Log 1 (from your Sept 2 message, crash right after Bash spawn):
2026-09-02T11:29:01.047Z [INFO] [Stall] tool_dispatch_start tool=Bash toolUseId=toolu_014TCHRU9KJTFj7RAjFZgjJ4 permissionDecisionMs=25
2026-09-02T11:29:01.057Z [DEBUG] Creating shell snapshot for bash (/bin/bash)
2026-09-02T11:29:01.058Z [DEBUG] Looking for shell config file: /scicore/home/boeluc00/meier0066/.bashrc
2026-09-02T11:29:01.061Z [DEBUG] Snapshots directory: /scicore/home/boeluc00/meier0066/.claude/shell-snapshots
2026-09-02T11:29:01.064Z [DEBUG] Creating snapshot at: /scicore/home/boeluc00/meier0066/.claude/shell-snapshots/snapshot-bash-1788348541061-4bmisg.sh
2026-09-02T11:29:01.064Z [DEBUG] Execution timeout: 10000ms
2026-09-02T11:29:01.066Z [DEBUG] Spawn-env probe captured 72 keys
[process killed here]
Log 2 (from your Sept 3 message, crash after a completed Bash call and the sdk_stream_ended_no_result event):
2026-09-03T10:09:59.207Z [INFO] [Stall] tool_dispatch_start tool=Bash toolUseId=toolu_01X1CpPueAWSRuawvMhUinBe permissionDecisionMs=5
2026-09-03T10:09:59.208Z [DEBUG] Spawning shell without login (-l flag skipped)
2026-09-03T10:09:59.293Z [INFO] [Stall] tool_dispatch_end tool=Bash toolUseId=toolu_01X1CpPueAWSRuawvMhUinBe outcome=ok durationMs=87
2026-09-03T10:09:59.299Z [DEBUG] LSP Diagnostics: getLSPDiagnosticAttachments called
2026-09-03T10:09:59.299Z [DEBUG] LSP Diagnostics: Checking registry - 0 pending
2026-09-03T10:09:59.299Z [DEBUG] Hooks: Found 0 total hooks in registry
2026-09-03T10:09:59.299Z [DEBUG] Hooks: checkForNewResponses returning 0 responses
2026-09-03T10:09:59.301Z [DEBUG] Dynamic tool loading: 0/18 deferred tools included
2026-09-03T10:09:59.302Z [DEBUG] attribution header x-anthropic-billing-header: cc_version=2.1.224.a43; cc_entrypoint=claude-vscode; cch=00000; cc_prev_req=req_011CegKkEedKhMzgp5fYuBuZ;
2026-09-03T10:09:59.303Z [DEBUG] Fast mode unavailable: Fast mode requires usage credits · /usage-credits to turn them on
2026-09-03T10:09:59.305Z [DEBUG] [API:timing] dispatching to firstParty model=claude-opus-5[1m]
2026-09-03T10:09:59.307Z [DEBUG] [API REQUEST] /v1/messages x-client-request-id=704f4d55-c4d2-457e-9c03-d48da6b453fd source=sdk
2026-09-03T10:10:00.724Z [DEBUG] Stream started - received first chunk
2026-09-03T10:10:00.724Z [DEBUG] [API:timing] first byte after 1420ms
2026-09-03 12:10:03.929 [info] Received message from webview: {"type":"request","channelId":"dohskudoin5","requestId":"edbkuvaqve5","request":{"type":"log_event","eventName":"sdk_stream_ended_no_result","eventData":{"had_error":true,"subagent_count":0,"message_count":8}}}
2026-09-03 12:10:03.929 [info] Received message from webview: {"type":"request","requestId":"1bfa8svad17","request":{"type":"update_session_state","sessionId":"14a14ffe-16f9-49a6-bce9-5d7f38bd0d90","state":"idle","title":"Read claude.md in projects01 folder"}}
2026-09-03 12:10:03.949 [warning] Channel not found for logEvent: dohskudoin5
Steps to Reproduce
- Install the Claude Code VS Code extension (v2.1.224) on a local machine (macOS).
- Connect to a remote host via VS Code Remote-SSH (in this case, an HPC cluster login node reachable via SSH with a standard ~/.ssh/config Host entry).
- Open a project folder on the remote host in VS Code.
- Open the Claude Code panel and sign in using a shared/company Anthropic Console (API key) account — not a claude.ai personal sign-in.
- Send a normal prompt that results in Claude Code calling a tool (e.g. asking Claude to run a Bash command, or to read a file that triggers a Bash tool call).
- Observe: in most cases the tool call completes and the conversation continues normally. Intermittently (not on every request), the process crashes with:
Error: Claude Code process terminated by signal SIGKILL
- Check Output → Claude Code logs around the crash timestamp. The stream is observed to start normally (a "Stream started - received first chunk" debug line appears), but then ends abnormally. The following event is logged just before the crash surfaces to the user:
{"type":"log_event","eventName":"sdk_stream_ended_no_result","eventData":{"had_error":true,"subagent_count":0,"message_count":8}}
- This has occurred at two different points in the tool-call lifecycle:
- Once during tool_dispatch_start for a Bash tool call (crash appears to happen while the shell subprocess is being spawned).
- Once after tool_dispatch_end (outcome=ok) for a completed Bash call, during a subsequent API stream.
Note: I could not find a deterministic single-file or single-command reproduction — the crash is intermittent and appears to depend on stream/session state rather than a specific prompt or code file. This matches the pattern described in #59374, #59067, and #59306, suggesting it's a general SDK stream-handling issue rather than something specific to my environment.
Environment-specific details that may be relevant (ruled out as root causes on my end):
- Remote host: HPC login node (not a container/cloud VM), 503GB RAM, 128 cores — no local resource shortage.
- Disk storage: sufficient free space.
- ulimit: no restrictive limits (memory, processes, file size unlimited/generous).
- cgroup memory/pids limits on the user session slice: memory.max=10GiB, but memory.events shows oom_kill: 0 (never triggered).
- SSH connection: confirmed stable throughout via
ssh -O checkshowing an active ControlMaster session; no reconnect/drop observed at crash time.
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
I dont know
Claude Code Version
Claude Code 2.1.198
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
VS Code integrated terminal
Additional Information
_No response_
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗