You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] Claude Code crashes with SIGABRT during shutdown due to MCP server termination failure #7718
I have searched existing issues and this hasn't been reported yet
This is a single bug report (please file separate reports for different bugs)
I am using the latest version of Claude Code
What's Wrong?
Claude Code crashes with SIGABRT during shutdown when attempting to terminate MCP (Model Context Protocol) servers. The crash occurs during the cleanup phase when the application cannot properly shut down connected MCP servers, leading to a Node.js assertion failure during stdio cleanup.
What Should Happen?
Claude Code should exit cleanly after properly terminating all MCP server processes and cleaning up resources.
Error Messages/Logs
SIGINT failed, sending SIGTERM to MCP server process
Error sending SIGTERM:
SIGTERM failed, sending SIGKILL to MCP server process
Error sending SIGKILL:
Error terminating process:
Error closing client:
Cleanup timeout reached, stopping process monitoring
Process terminates with SIGABRT and generates core dump (261MB core file).
Steps to Reproduce
Start Claude Code with MCP servers configured
Use Claude Code normally (any operations)
Exit Claude Code (Ctrl+C, quit command, or other exit method)
Application crashes during shutdown process with core dump
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
No response
Claude Code Version
1.0.113
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
VS Code integrated terminal
Additional Information
Stack trace analysis:
Crash point: node::ResetStdio() during exit cleanup
Signal: SIGABRT (assertion failure)
Root cause: MCP servers failed to terminate (SIGINT → SIGTERM → SIGKILL all failed)
Node.js cleanup assertion failed when trying to reset stdio during exit
Technical details:
Executable: /usr/bin/node (Claude Code)
Core dump shows uncaught exception during shutdown sequence
MCP server termination timeout reached before clean exit
Claude Code crashed with SIGABRT during error cleanup. This appears to be a Node.js core bug where node::ResetStdio() fires an assertion during legitimate error scenarios.
Environment
Claude Code CLI: @anthropic-ai/claude-code
Node.js: v20.19.5
Platform: Linux x86_64
Signal: SIGABRT (Aborted)
Root Cause
1. Write error (EIO) → stream closed during active output
2. Uncaught exception handler triggered exit
3. Exit cleanup called node::ResetStdio()
4. Assertion failed → SIGABRT
This prevents the EIO error that triggers the problematic exit path.
Note
This may be more appropriate as a Node.js issue rather than Claude Code, since the assertion is in Node.js core code. However, Claude Code could work around it with the defensive checks above.
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.
Activity
navvye commentedon Oct 13, 2025
Facing the same error
kasnet commentedon Oct 14, 2025
The same error
jgspratt commentedon Oct 15, 2025
Claude Code Crash Report
Summary
Claude Code crashed with
SIGABRTduring error cleanup. This appears to be a Node.js core bug wherenode::ResetStdio()fires an assertion during legitimate error scenarios.Environment
@anthropic-ai/claude-codeRoot Cause
Stack Trace (gdb analysis)
The assertion fired twice - once during exit, then again while trying to dump the first assertion failure.
Reproduction
Expected Behavior
Node.js should handle stream closure gracefully during exit, not trigger assertions. Write errors (EIO, EPIPE) are normal when terminals disconnect.
Actual Behavior
Process aborted with SIGABRT and 317MB core dump.
Suggested Fix
Add defensive checks before stream writes:
This prevents the EIO error that triggers the problematic exit path.
Note
This may be more appropriate as a Node.js issue rather than Claude Code, since the assertion is in Node.js core code. However, Claude Code could work around it with the defensive checks above.
MarkDeVerno commentedon Dec 3, 2025
We’ve reproduced this with
setting_sourcesenabled; see detailed analysis in #1935. Also relates to cancel scope bug in #8999github-actions commentedon Jan 4, 2026
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
Handle shutdown signals gracefully in MCP server (#4227)
loneranger98 commentedon Jan 22, 2026
2026-01-22 15:21:14.434 [info] From claude: ============================================================
Bun v1.3.6 (d530ed99) Linux x64 (baseline)
Linux Kernel v6.1.25 | glibc v2.35
CPU: sse42 popcnt
Args: "/home/ashu/.vscode/extensions/anthropic.claude-code-2.1.15-linux-x64/resources/native-binary/claude" "--output-format" "stream-json" "--verbose" "--input-format" "stream-json" "--max-thinking-tokens" "31999" "--model" "defa"...
Features: Bun.stderr(2) Bun.stdin(2) Bun.stdout(2) fetch(47) jsc no_avx2 no_avx spawn(16) standalone_executable
Builtins: "bun:main" "node:assert" "node:async_hooks" "node:buffer" "node:child_process" "node:constants" "node:crypto" "node:domain" "node:events" "node:fs" "node:fs/promises" "node:http" "node:https" "node:module" "node:net" "node:os" "node:path" "node:path/posix" "node:path/win32" "node:perf_hooks" "node:process" "node:querystring" "node:stream" "node:timers/promises" "node:tls" "node:tty" "node:url" "node:util
2026-01-22 15:21:14.703 [info] Closing Claude on channel: hm0ylw07d2j
2026-01-22 15:21:14.706 [error] Error from Claude (on channel hm0ylw07d2j): Error: Claude Code process terminated by signal SIGABRT
2026-01-22 15:21:20.094 [info] Received message from webview: {"type":"request","requestId":"uhqdcl8omc","request":{"type":"open_output_panel"}}
github-actions commentedon Feb 28, 2026
Closing for now — inactive for too long. Please open a new issue if this is still relevant.
github-actions commentedon Mar 7, 2026
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.