Session history appears in UI but is inaccessible to model after context compression — no user warning or opt-out

Open 💬 1 comment Opened Jul 9, 2026 by adriansavage

Summary

When a session grows long enough to trigger context compression, the model loses access to earlier conversation content. However:

  1. The full history remains visually visible in the UI when scrolling back
  2. The user receives a message saying history is "no longer available" — but no explanation of what that means or how to avoid it
  3. There is no way to opt out of compression or be warned before it happens
  4. Verbatim phrases from earlier in the session cannot be found by searching the JSONL files, suggesting compression may alter or discard stored content — not just what the model receives

Specific example

  • Phrase from early in session ("I'm building a new feature called DMARC Center inside an existing PHP app") — found in JSONL after compression
  • Phrase from later in session ("The smoking gun would be in the raw CSV data Scott uploaded") — not found in any JSONL file despite being visible in the UI scrollback

Expected behaviour

  • The model should either have access to the full history, or the user should be clearly warned before compression occurs with an option to start a new session manually
  • The UI should clearly distinguish between "messages you can see" and "messages the model can access"
  • If compression discards verbatim content from JSONL storage, that should be documented and avoidable

Environment

  • Claude Code desktop app, multiple worktrees in use
  • Sessions stored in ~/.claude/projects/ as JSONL files (per-worktree)
  • Largest session file observed: 103MB

Impact

Loss of context mid-session without warning breaks continuity of complex multi-hour engineering work. Seeing history the model cannot access is actively misleading.

View original on GitHub ↗

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