the context window is definitely hitting a wall on larger builds. i've noticed it starts hallucinating imports once the file tree gets too deep to map efficiently. try using a
.claudignore
file to prune out build artifacts, node_modules, and heavy assets before the agent scans the directory. reducing the noise helps it focus on the
actual logic flow rather than getting lost in boilerplate. if you're running into massive failures, check if your current prompt is forcing it to read every single file in a subfolder instead of just targeting specific modules.
the issue usually isn't the model's reasoning but the sheer volume of tokens being wasted on non-essential files. are you providing a specific map of the architecture or just letting it crawl from the root?