[BUG] Claude over-gathering context

Resolved 💬 3 comments Opened Apr 23, 2026 by BoredDevBrian 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?

I have a significantly large solution, all in C#, which now spans more than 170 projects in total. Whenever I ask Claude to do anything, it over-gathers context to the extent that it cannot even write a single file. It times out or will sit, doing nothing, for hours on end.

I am using version 2.1.118 (Claude Code), Opus 4.7, Sonnet 4.6.

When i look at what it is reading, it breaks out ILDASM in some cases, which is completely unnecessary. It seems that it will consistently gather context, well and truly beyond what it needs, just because.

When asked about why it is going down that path, you get the "that's on me - i over gathered context".

Even when directed and specific projects and specific files, it will eventually go and start gathering the entire solution. It claims that it's objective is to be thorough, but it is impossible to limit how it proceeds as it will constantly.

I instruct it to break everything down into small tasks, and implement it step by step, it surveys absolutely everything and becomes unusable.

I tell it, in a clear session, to create 10 simple, empty files, in a very specific location, not to look at anything else, only to create those 10 files - 1hr and 26mins later and it's created two of the ten files. It will time out and just go crazy with gathering context. Why on earth is it doing this? and ILDASM on System.Net.dll? ILDASM on package DLLs in random areas?

Is it determine to fill up the 1M context? it literally cannot perform anything and will time out constantly. When asking about it, it will tell me the context is large, writing these 40 lines of code is comprehensive, i should instruct it to write more clearly etc etc

I instructed it to write "here is some random text" into a MarkDown file... 58 minutes and it still hadn't done in, in a new session. What on earth is going on with Claude Code?

What Should Happen?

Claude should literally do only what it is instructed to do, not go into deep rabbit holes.

Error Messages/Logs

Steps to Reproduce

  1. Open up Claude Code in the repo of the solution
  2. Instruct Claude to do something which requires writing or editing a file, in a specific location
  3. sit back and wait for it to gather the entire solution into context, then go into rabbit holes using ILDASM

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.118 (Claude Code)

Platform

Anthropic API

Operating System

Other

Terminal/Shell

WSL (Windows Subsystem for Linux)

Additional Information

_No response_

View original on GitHub ↗

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