Account switch reverts active session .jsonl transcript and silently stops disk writes

Open 💬 1 comment Opened Jul 3, 2026 by cchoeg

Summary

After switching Claude Max accounts within Claude Code, an active session's local transcript file (~/.claude/projects/<project>/<uuid>.jsonl) was reverted to an older snapshot and then stopped receiving further writes entirely, despite the session continuing to run interactively in-context for roughly two more weeks. No error or warning was shown to the user or the model.

Impact

  • All conversation content generated after the revert point exists only in the model's active context, never persisted to disk.
  • claude --resume <uuid> after a crash loads the stale snapshot, giving no indication that a large chunk of session history is missing.
  • The .jsonl file's last-modified timestamp stopped updating, but this is not surfaced anywhere. A user has no way to detect "my session stopped saving" without manually diffing file line counts / timestamps against expected activity.

Reproduction context (approximate)

  1. Long-running Claude Code session, transcript grew to ~35 MB / ~15,000 lines.
  2. User performed a Claude Max account switch mid-session.
  3. Claude Code created a pre-switch backup at ~/.claude.backup-before-account-switch-<uuid>.jsonl.
  4. After the switch, the active project .jsonl was found reverted to an earlier date, with no further writes afterward despite ongoing use for roughly two more weeks.

Requested fix / mitigation

  • On account switch, do not touch or replace the active project transcript file — any backup mechanism should be additive only, never mutate the live file.
  • Detect and warn (in-CLI) if the transcript file's on-disk state stops advancing relative to an active session (e.g., a periodic write-health check comparing expected vs. actual last-write time).
  • Consider surfacing transcript file size as a soft warning before any resume-related risk zone (~20-30 MB), since large files already carry known resume-crash risk that compounds this issue.

Workaround currently in use

Added a Stop hook that copies the transcript to a separate backup directory after every turn, to have an independent recovery point outside the mechanism that failed.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗