Subdomain 1.2: Agent Construction with Claude
1.A code-review agent needs to read through 40 files, but the team wants the main conversation to stay short so later turns aren't paying for tokens spent on every file that was opened during the review. Which architecture keeps the main agent's context lean?
- A.Delegate the review to a subagent defined with an AgentDefinition; its tool calls and file contents stay in its own context, and only a final summary returns to the parent.
- B.Increase max_turns on the main query so Claude has enough budget to read all 40 files directly in the main conversation without the loop stopping early.
- C.Set effort to "low" on the main query so each turn that reads a file consumes fewer reasoning tokens, even though all 40 files still load fully into the shared main conversation.
- D.Enable include_partial_messages so file contents stream back to the main conversation incrementally as text deltas instead of arriving all at once.
Show answer & explanation
Correct answer: A — Delegate the review to a subagent defined with an AgentDefinition; its tool calls and file contents stay in its own context, and only a final summary returns to the parent.
- A. Correct. A subagent starts with a fresh context; intermediate tool calls and file contents stay inside the subagent, and only its final message returns to the parent, so the main conversation's context does not grow by the full subtask transcript.
- B. Raising max_turns only permits more tool-use round trips; it does nothing to prevent the contents of all 40 files from accumulating directly in the main conversation's context.
- C. Lower effort reduces reasoning tokens spent per turn, but the file contents themselves are still read directly into the main conversation and accumulate exactly as before.
- D. Partial message streaming changes how output is delivered in real time; it does not change whether tool results accumulate in the conversation's context window.