attribution: surface session fallback and unreadable session metadata

main

Commit

Soph3mo ago

Two silent-degradation paths in readCheckpointContext gave the user false confidence:

  • When a blamed file matched none of a checkpoint's sessions (e.g. it was renamed after the checkpoint), session selection silently fell back to the first session and presented its agent/prompt as exact. Track whether the match was by file, and when it was a multi-session fallback set a new SessionFallback flag; entire why now prints a "may have been renamed" hint.

  • When a checkpoint's sessions all failed to read (summary present, per-session metadata unreadable), the line kept a confident [AI] tag with blank agent/model/prompt and no indication. Set MetadataMissing in that case so the existing "trailer-level attribution only" hint shows and the why path retries via remote fetch.

Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com Entire-Checkpoint: 7f9d62c609b2

Checkpoints

Attribution Bugs and Refactoring in CLI

Claude CodeOpus 4.8[1m]
View session
Checkpoint 1