Resume hangs indefinitely on sessions with large tool outputs

Resolved 💬 8 comments Opened Jan 26, 2026 by blurphanatic Closed Mar 6, 2026

Description

claude --resume hangs indefinitely (shows "resuming" forever) when a session contains large tool outputs. The only fix is manually editing the session JSONL file to truncate the bloated entries.

Steps to Reproduce

  1. Have a session where a tool returned a very large output (in my case, a 648KB HTML dump from a web fetch that got embedded in the session)
  2. Exit the session
  3. Try to resume with claude --resume or claude --continue
  4. UI shows "resuming" and never completes - no timeout, no error, just hangs

Root Cause

Session file ~/.claude/projects/<project>/<session-id>.jsonl contained a 675KB line with a massive tool_result content. The resume process appears to hang during deserialization/rendering of this content.

Interestingly, Claude Code already has a <persisted-output> mechanism that says "Output too large, saved to file" but the full content was STILL embedded in the toolUseResult field, defeating the purpose.

Workaround

Manually edit the session JSONL to truncate the large line:

# Find large lines
awk '{if(length>50000) print NR": "length" bytes"}' session.jsonl

# Then truncate the content in that line

Expected Behavior

  • Resume should not hang indefinitely - either timeout gracefully or skip/lazy-load large entries
  • If a tool output is too large, it should be persisted to disk ONLY (not also embedded in the session)
  • Consider showing a warning like "This session contains large outputs, resume may be slow"
  • Or implement streaming/lazy loading for session history

Environment

  • Claude Code version: 2.1.19
  • macOS Darwin 25.3.0
  • Session had 2557 messages, 3.9MB total, with one 675KB line

Impact

Users lose access to their conversation history with no recourse except manual file surgery. The "resuming" state gives no indication anything is wrong.

View original on GitHub ↗

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