[BUG] Agent loses context mid-task when working with moderately-sized documents (~660 lines). Repeated failures across multiple attempts/agents.
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?
What happened: Agent loses context mid-task when working with moderately-sized documents (~660 lines). Repeated failures across multiple attempts/agents.
Reproduction: Ask Claude Code to apply a list of corrections to a ~660 line markdown file. Agent stalls, loses context, or fails to complete the write.
Environment: Claude Opus 4.6 (1M context), VS Code extension, macOS
What Should Happen?
Complete the planning task. I keep getting the message 'Not responding'.
Error Messages/Logs
Steps to Reproduce
The context window shouldn't be an issue for a document this size — this sounds like a bug in how conversation state or tool results are being managed, not an actual token limit problem.
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.17
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗