Claude Code freezes on startup with large session history (~468 sessions)
Resolved 💬 2 comments Opened Jan 31, 2026 by andrebreijao Closed Jan 31, 2026
Description
Claude Code completely freezes on the first prompt when a project has accumulated a large number of sessions. The UI shows the thinking indicator ("Thundering...") but never responds. The process must be killed manually.
Reproduction
- Project: TypeScript monorepo (~1.9GB including node_modules)
- Session count: 468 sessions (~264MB in
~/.claude/projects/<project-path>/) - Claude Code version: v2.1.27
- OS: macOS (Darwin 25.2.0)
- Affects: Both VS Code extension and TUI
Steps to reproduce
- Use Claude Code extensively in a single project over time (accumulating hundreds of sessions)
- Launch Claude Code in that project directory
- Type any prompt (e.g., "hi") and press enter
- Observe: thinking indicator appears but response never arrives
Workaround
Moving the session history directory unblocks the issue:
mv ~/.claude/projects/<project-path> ~/.claude/projects/<project-path>.bak
After this, Claude Code starts and responds normally.
Debugging performed
Systematically ruled out:
- Model: Freezes with both Opus 4.5 and Haiku
- Project config: Same
.claude/settings.json, hooks, commands, andCLAUDE.mdwork fine on a VM with fewer sessions - Plugins: Freezes with all plugins disabled
- Global hooks: Freezes with all hooks removed
- MCP servers: None configured
- Git repo:
node_modulesis gitignored, repo itself is ~77MB
The only difference between the working environment (VM) and the frozen one (local) was the number of accumulated sessions in ~/.claude/projects/.
Expected behavior
Claude Code should handle hundreds of sessions without freezing. Session scanning at startup should be async/paginated or capped.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗