-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
Windsurf Claude Code Parallel Agent Crash Analysis
Executive Summary
Root Cause: Terminal rendering bug in Windsurf Next triggers language server memory leaks when Claude Code parallel agents update display concurrently, leading to system crashes.
Confirmed Workaround: Debug console view bypasses problematic terminal renderer.
Incident Timeline
Initial Incident
- Symptom: Terminal scroll jumping erratically (top ↔ bottom multiple times/second)
- Trigger: Multiple Claude Code parallel agents running simultaneously
- Duration: Few seconds, then stops
- Frequency: Sporadic when 2+ agents active
Crash Pattern
- First Crash: System under load, blamed on general resource exhaustion
- Second Crash: Occurred while using debug console workaround (confirmed not terminal-related)
- Process Restart: All Windsurf PIDs completely new after crashes
Evidence Analysis
Performance Monitoring Data
Metric | Pre-Crash | Post-Crash | 5 Agents Running |
---|---|---|---|
System Load | 7.95 | 4.56 | 2.74 |
CPU Idle | 57% | 65% | 55% |
Memory Free | 111MB | 315MB | 130MB |
Memory Compressed | 12GB | 10GB | 9.9GB |
Resource Competition Evidence
- Renderer Process 19543: 84% CPU + 1.9GB RAM during first crash
- System Memory: 96% utilization consistently
- Load Spikes: Correlate with agent activity
Root Cause Analysis
Primary Theory: Terminal Rendering Bug + Memory Leak Cascade
Mechanism:
- Claude Code spawns multiple subagents in same terminal
- Each agent dynamically resizes output (2→5→3 lines)
- Concurrent ANSI escape sequences conflict in Windsurf Next terminal
- Renderer processes excessive cursor positioning events
- Language servers accumulate memory from uncleaned event handlers
- Memory pressure triggers system-wide resource exhaustion
Evidence Supporting:
- Memory leak pattern: 1.3GB → 407MB after restart (same PIDs)
- Debug console workaround eliminates scroll jumping AND prevents crashes
- Process 19543 CPU spike (84%) during terminal chaos
- No crashes when using external terminals (documented in Claude Code community)
Secondary Factor: Resource Capacity
System Operating at Limits:
- 24GB RAM with 23GB+ consistently used
- Memory compression at 10GB+ (excessive swapping)
- Multiple heavy applications (Docker, Chrome, virtualization)
Technical Specifications
System Configuration
- Hardware: 24GB RAM, Apple Silicon Mac
- OS: macOS with 1+ day uptime
- Windsurf: Version 1.12.105+next (Next channel)
- Workload: 5 parallel Claude Code subagents
Gr4vity4
Metadata
Metadata
Assignees
Labels
No labels