claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[Bug] Unnecessary File Reload During Continuation Causing Context Duplication

Open KJ7LNW opened this issue 2 months ago • 5 comments

Bug Description ● Update(/some/file.md) ⎿  Error: File has not been read yet. Read it first before writing to it.

But this is a claude -c continuation. The file has not changed!

I realize the current state is not aware of it, but if the file has not changed, it should not force it to load it back into the context because it already exists in the context. Duplicating the context causes the models to perform poorly. So you need to be able to make sure that the content is actually different instead of just telling it to read the file because that is a bad practice.

Environment Info

  • Platform: linux
  • Terminal: vte-based
  • Version: 2.0.8
  • Feedback ID: b2703c8e-5baf-4187-a56a-ed0e574f009c

Errors

[]

KJ7LNW avatar Oct 16 '25 02:10 KJ7LNW

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/9388
  2. https://github.com/anthropics/claude-code/issues/3232
  3. https://github.com/anthropics/claude-code/issues/8625

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

github-actions[bot] avatar Oct 16 '25 02:10 github-actions[bot]

Those do not consider restarts

KJ7LNW avatar Oct 16 '25 04:10 KJ7LNW

Also having this issue for some time now. This closed issue post explains it even better: https://github.com/anthropics/claude-code/issues/10533

stavarc avatar Nov 11 '25 12:11 stavarc

This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.

github-actions[bot] avatar Dec 12 '25 10:12 github-actions[bot]

This is still a problem. One of the Anthropic developers needs to look at this.

KJ7LNW avatar Dec 12 '25 20:12 KJ7LNW