-
Notifications
You must be signed in to change notification settings - Fork 244
Open
Description
Summary
Orphaned sessions accumulate silently and cause severe performance degradation:
- RAM:
entire hooks claude-code stopprocesses consuming 1.7GB+ each (two concurrent = 3.4GB) - Commit speed:
entire hooks git post-committakes 2 minutes 44 seconds per commit (synchronous, blocking) - Session accumulation: 76 orphaned sessions accumulated over 18 days without any warning
Impact
This went unnoticed for weeks. Real cost:
- Every git commit blocked for ~3 minutes
- With 6 commits per session, that is ~16 minutes of dead time per session
- Two concurrent session stops consumed 3.4GB RAM on a dev laptop
entire statusshowed 60+ "active" sessions that were actually dead
Root Cause
Sessions from Claude Code subagents (spawned via Agent tool) are not properly cleaned up when the parent session ends. These zombie sessions remain in Entire's state and are re-processed on every commit hook and session stop.
The condensation pipeline loads full JSONL transcripts into memory. With large transcripts (up to 15MB each) and 76 sessions to process, memory balloons.
Reproduction
- Use Claude Code with frequent subagent spawning over several days
- Run
entire status- observe dozens of "active" sessions from days/weeks ago - Make a git commit - observe multi-minute blocking
- Check RAM:
ps aux | grep entireshows 1.5GB+ per process
Workaround
# Fix stuck sessions (needs ACCESSIBLE=1 for non-interactive use)
ACCESSIBLE=1 entire doctor
# Clean orphaned sessions
entire clean --force
# Verify
entire statusThis brought my session count from 60+ down to 12, and commit times back to normal.
Suggestions
- Auto-cleanup: Expire sessions that have been idle for >24h (or configurable threshold)
- Memory cap: Stream/chunk transcript processing instead of loading full JSONL into memory
- Async post-commit: The
post-commithook should run in the background. A 2m44s synchronous hook on every commit is not acceptable - Visibility: Warn when orphaned session count exceeds a threshold (e.g. >10)
- Subagent awareness: Detect when a Claude Code session spawns subagents and auto-close their Entire sessions when the parent ends
Environment
- Entire CLI:
entire version(installed via Homebrew) - OS: macOS 15.4 (Apple Silicon)
- Agent: Claude Code (Opus 4.6)
- Strategy:
manual-commit - Repo transcript count: 374 JSONL files, 323MB total
- Largest single transcript: 15MB
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels