[BUG] claude --continue broken after using claude --resume - history.jsonl not updated

Resolved 💬 3 comments Opened Oct 21, 2025 by diegocconsolini Closed Jan 8, 2026

Bug Report: claude --continue broken after using claude --resume

Environment

  • Version: Claude Code 2.0.24
  • Platform: WSL2 Ubuntu 24.04.3 LTS (Noble Numbat)
  • Node.js: v22.17.1
  • Terminal: Windows Terminal

Issue Summary

claude --continue starts a new session instead of continuing the most recent conversation when that conversation was resumed using claude --resume (interactive selector).

Steps to Reproduce

  1. Start a Claude Code session: claude
  2. Have a conversation, then exit
  3. Resume the session using interactive selector: claude --resume (select from list)
  4. Continue the conversation for multiple messages
  5. Exit the session
  6. Try to continue: claude --continue

Expected: Resume the session from step 3
Actual: Starts a completely new session with "Warmup" greeting

Root Cause Analysis

When a session is resumed via claude --resume interactive selector, it does NOT update ~/.claude/history.jsonl.

  • claude --continue relies on history.jsonl to find the "most recent conversation"
  • Resumed sessions write to their session JSONL file (~/.claude/projects/-<project>/<session-id>.jsonl)
  • But they don't write entries to history.jsonl
  • Therefore --continue cannot find them and starts a new session

Evidence:

  • Session file: ~/.claude/projects/-home-diegocc/7fe87110-1039-456c-8009-9f5720ee0886.jsonl (300+ messages, 530KB)
  • Last history.jsonl entry for that session: timestamp 1761071167344
  • Session continued for 2+ hours after that with no history updates
  • After manually adding a history entry, --continue worked correctly

Workaround

Manually append an entry to ~/.claude/history.jsonl:

echo '{"display":"Session resumed","pastedContents":{},"timestamp":'$(date +%s%3N)',"project":"'$(pwd)'"}' >> ~/.claude/history.jsonl

Expected Behavior

Resumed sessions should update history.jsonl for each user message, just like freshly started sessions do, so that --continue can find them.

Additional Notes

  • claude --resume interactive selector works correctly (no arrow key navigation issues)
  • claude --resume <session-id> returns "No conversation found" for active sessions (expected)
  • Only the history tracking is broken

Impact

  • Medium/High: Users cannot use --continue after resuming sessions
  • Workaround exists but requires manual intervention

View original on GitHub ↗

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