/resume command hangs with large session history

Resolved 💬 3 comments Opened Jan 31, 2026 by visccyberacct Closed Feb 4, 2026

Description

The /resume slash command causes Claude Code to become completely unresponsive when there is a large amount of session history data. The freeze occurs during autocomplete (before pressing enter), suggesting the session scanner is loading data synchronously.

Environment

  • OS: Linux (Ubuntu)
  • Claude Code Version: Latest
  • Session data size: ~734MB across multiple projects

Steps to Reproduce

  1. Use Claude Code extensively over time, accumulating large session files
  2. Have multiple session .jsonl files in the 30-60MB range
  3. Type /resume in the CLI
  4. Observe the hang

Expected Behavior

  • /resume should load session metadata lazily or with pagination
  • Large session histories should not cause the CLI to become unresponsive
  • At minimum, there should be a timeout or graceful degradation

Actual Behavior

  • CLI freezes after a moment when typing /resume
  • Process becomes completely unresponsive (Ctrl+C does not work)
  • Eventually crashes
  • No error output before the hang

Workaround

Manually deleting old session files resolves the issue:

find ~/.claude/projects/ -name "*.jsonl" -mtime +7 -delete

Suggested Fix

Consider:

  1. Lazy loading session data (only load full content when selected)
  2. Pagination for session lists
  3. Reading only session metadata from index files rather than parsing full .jsonl files
  4. Adding a timeout with graceful error handling
  5. Limiting the number of sessions shown in autocomplete

Additional Context

Session file sizes observed:

  • Multiple files in 30-58MB range
  • Total ~734MB across 11 project directories
  • 12+ session files over 10MB each

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗