A platform team ships an internal Claude Agent SDK tool that helps engineers understand an unfamiliar 380,000 line monolith. A typical question such as where order pricing is calculated makes the agent Grep the repository and then Read eleven files in full, so a single request averages 74,000 tokens before the agent writes its first sentence of explanation. Engineers report that later answers in a session contradict files the agent read earlier in that same session, and a review of 200 answers finds that 31 percent cite a symbol at a path where it no longer exists. Which change most effectively addresses the reported symptom?
- AMove the session to a configuration with a much larger context window so that all eleven files and the whole conversation fit at once, on the basis that nothing is displaced when the window is big enough.
- BDelegate the search and the full file reads to a subagent through the Task tool, briefed to return only the matching paths, line numbers and a short summary, so the verbose output stays out of the coordinator's context. Correct
- CAdd an instruction to the project CLAUDE.md requiring the agent to re-read a file immediately before citing any symbol it contains, so that every citation is backed by a fresh read of the current source.
- DCache the Grep output in an MCP server keyed by query string and have the agent read from that cache, so that repeated searches inside one session do not consume tokens a second time.
Why A is wrong: Tempting because the symptom looks like material being pushed out of the window, but the failure is attention dilution rather than eviction: a larger window holds more low value tokens and the share of relevant material falls further.
Why B is correct: Correct because the subagent holds its own isolated context for the noisy work and hands back a small, high signal result, so the coordinator reasons over a compact transcript instead of 74,000 tokens of raw file text.
Why C is wrong: Tempting because it targets the citation step directly, but prompt guidance is probabilistic compliance and each extra full read adds thousands more tokens to the very context that is already too crowded.
Why D is wrong: Tempting because caching reduces duplicated work, but repeated searching is not what fills the transcript here: the eleven full file reads are, and a cache still returns their contents into the same conversation.