[BUG] Claude Code crashes with OOM when manipulating terminal splits during active generation
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?
Claude Code crashes with an Out of Memory (OOM) error when manipulating terminal splits while actively generating output. This causes the entire Ghostty window to close (all tabs and splits lost).
Steps to reproduce:
- Open Ghostty
- Create 3-4 splits (e.g., 1-2 on left, 1-2 on right)
- Run Claude Code in multiple splits (3-4 instances)
- Start tasks that cause Claude Code to generate output
- While Claude Code is actively working, press Cmd+Enter (zoom split), Cmd+Shift+Enter, or Cmd+D/Cmd+Shift+D (new split)
- Result: Entire Ghostty window closes immediately
Crash log analysis:
macOS crash reports (~/Library/Logs/DiagnosticReports/node-*.ips) show V8 JavaScript heap OOM:
"exception": {"type":"EXC_CRASH","signal":"SIGABRT"}
node::OOMErrorHandler -> v8::internal::V8::FatalProcessOutOfMemory -> v8::internal::Heap::CollectGarbage
Key observations:
- Only happens when Claude Code is actively generating (never when idle)
- Multiple instances running (3-4 sessions in splits)
- Multiple crash reports generated simultaneously
- Not macOS jetsam - this is V8's internal OOM handler calling abort()
Related issues: #16578, #4953, #1555, #1495
What Should Happen?
Terminal split manipulation (zoom, new split) should work without crashing Claude Code, even during active generation. The TUI should handle terminal resize events gracefully without excessive memory allocation.
Error Messages/Logs
"exception": {"type":"EXC_CRASH","signal":"SIGABRT"}
"termination": {"indicator":"Abort trap: 6"}
"asi": {"libsystem_c.dylib":["abort() called"]}
Stack trace:
node::OOMErrorHandler(char const*, v8::OOMDetails const&)
v8::internal::V8::FatalProcessOutOfMemory(...)
v8::internal::Heap::FatalProcessOutOfMemory(...)
v8::internal::Heap::CollectGarbage(...)
v8::internal::HeapAllocator::AllocateRawWithRetryOrFailSlowPath(...)
Full crash reports at: ~/Library/Logs/DiagnosticReports/node-*.ips
Steps to Reproduce
- Open Ghostty terminal
- Create 3-4 splits (Cmd+D or Cmd+Shift+D) - arrange as 1-2 on left, 1-2 on right
- Run
claudein multiple splits (3-4 instances simultaneously) - Start tasks in each that cause Claude Code to generate output (e.g., code generation, file editing, tool calls)
- While Claude Code is actively working/generating, press one of:
- Cmd+Enter (zoom/toggle split fullscreen)
- Cmd+Shift+Enter
- Cmd+D or Cmd+Shift+D (create new split)
- Result: Entire Ghostty window closes immediately - all tabs and splits are lost
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
2.0.76
Claude Code Version
2.1.5 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Other
Additional Information
Terminal: Ghostty 1.2.3 stable (also reproduced on tip build)
Key observations:
- Only happens when Claude Code is actively generating output - never when idle
- Running 3-4 Claude Code instances in terminal splits
- Split manipulation (zoom, new split) triggers the crash - possibly TUI re-render during resize causes memory spike
- Multiple crash reports generated simultaneously (3-4 node processes crash together)
- This is V8's internal OOM handler calling abort(), not macOS jetsam
Crash log location: ~/Library/Logs/DiagnosticReports/node-*.ips
Related issues (for reference):
- #16578 - Terminal rendering breaks in long conversations
- #4953 - Memory leak growing to 120+ GB RAM
- #1555 - Claude Code crashes due to OOM (closed)
- #1495 - TUI rendering glitching with terminal resizing
This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗