CCAR-F - Context Management & Reliability - Section 5.4

Manage context effectively in large codebase exploration.

Extended sessions degrade in a recognisable way: answers turn inconsistent and the model starts citing typical patterns rather than the specific classes it found earlier. Scratchpad files persist key findings across context boundaries and subagent delegation isolates verbose exploration while the main agent keeps high-level coordination. Candidates should summarise one phase before spawning the next, and design crash recovery around structured state manifests the coordinator reloads on resume.

context degradation in extended sessionsscratchpad filessubagent delegation for verbose explorationstate manifests for crash recoverycompaction during long sessions

Practice question for this objective

Free sampleContext Management & Reliabilityhard

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.
Delegate verbose exploration to a subagent with a bounded return contract rather than absorbing raw search and file output into the main context. Answer quality degrades as the proportion of relevant material in the context falls, so the fix is to reduce what enters the coordinator's transcript. A subagent dispatched through the Task tool runs the Grep and the file reads in its own context window and returns only paths, line numbers and a summary, which leaves the coordinator with a small, high signal working set for synthesis.

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.

See more CCAR-F practice questions, answers explained.

More in this domain

Back to all Context Management & Reliability objectives, or the CCAR-F cert hub.

Examworthy is not affiliated with or endorsed by Anthropic. Original, blueprint-aligned practice material only.