📊
Managing Multiple Claude Code Sessions
Learn how to effectively manage and monitor multiple concurrent Claude Code sessions without overwhelming your system.
SessionsMulti-projectManagement
Quick Command
$ claude-trace -v!The Problem
Running Claude Code in multiple projects simultaneously causes system slowdown, confusion about which session is which, or resource exhaustion.
?Common Causes
- •Each Claude session runs multiple Node.js processes
- •No visibility into aggregate resource usage
- •Hard to tell which project each process belongs to
- •Sessions accumulate when switching between projects
🔍How to Diagnose
Get a complete picture of all Claude activity:
```bash
# See all processes with project names
claude-trace -v
# Aggregate stats
claude-trace -j | jq '.totals'
# Group by project
claude-trace -j | jq 'group_by(.project) | map({project: .[0].project, count: length, total_cpu: (map(.cpu_percent) | add)})'
```✓Solution
1. **Use Claude Trace's aggregate view**: The menu bar shows total CPU/memory across all sessions 2. **Identify which projects are active**: ```bash claude-trace -v | head -20 ``` 3. **Close sessions for inactive projects**: Use the menu bar app to kill specific processes 4. **Set up notifications**: Configure Claude Trace to alert when aggregate resources exceed thresholds
🛡Prevention
- Close Claude sessions when switching projects - Use Claude Trace's aggregate thresholds (e.g., alert when total CPU > 200%) - Regularly audit running sessions with `claude-trace -v` - Consider whether you really need Claude active in all open projects
Monitor Claude Code in Real-Time
Get Claude Trace for instant visibility into every Claude process.
Get Claude Trace