[BUG] /context suggestion "reference earlier reads" is not actionable after autocompact

Resolved 💬 2 comments Opened Mar 28, 2026 by rishab-grfid Closed Apr 27, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

The /context command shows this suggestion:

> File reads using 103.1k tokens (10%) → save ~30.9k
> If you are re-reading files, consider referencing earlier reads. Use offset/limit for large files.

The "reference earlier reads" advice is misleading. When autocompact runs during long sessions, earlier messages (including
Read tool results) are compressed, and the file contents are lost from context. Claude cannot reference earlier reads
because they no longer exist. The only actionable part of this suggestion is "use offset/limit for large files."

What Should Happen?

The suggestion should only recommend the actionable optimization:

> File reads using 103.1k tokens (10%) → save ~30.9k
> Use offset/limit parameters to read only the lines you need instead of entire files.

Or if "reference earlier reads" is kept, it should clarify that this only works before autocompact runs, and is not
possible once messages have been compressed.

Error Messages/Logs

No error — this is a misleading UX suggestion, not a crash.

Steps to Reproduce

  1. Start a long conversation that approaches context limits (40%+ usage)
  2. Read several large files (e.g., 500+ line SQL files) throughout the session
  3. Continue working until autocompact compresses earlier messages
  4. Run /context
  5. Observe the suggestion to "reference earlier reads."
  6. The suggestion is not actionable — Claude cannot access compressed Read results

Claude Model

Opus

Is this a regression?

No, this never worked

Last Working Version

_No response_

Claude Code Version

2.1.86 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Warp

Additional Information

_No response_

View original on GitHub ↗

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