Claude Certified Architect – Foundations Practice Question 81: Subagent Model Selection
Claude Certified Architect, Foundations · Test 9 · question 1 of 10
A team builds a code-audit agent with the Claude Agent SDK. The main agent plans the audit and writes the final report, and it delegates repository exploration (reading files, grepping for patterns) to a subagent that never edits anything. Exploration generates most of the token volume, and the team wants to cut cost and latency without weakening the main agent's reasoning. What is the best approach?
Show answer and explanation
Answer:
C is correct. An agent definition accepts an optional model field (an alias such as sonnet, opus or haiku, a full model ID, or inherit) that overrides the model for that subagent only. Read-only exploration is a good fit for a small, fast model, while the main agent keeps the more capable one for planning and the final report.
A is wrong because changing the main query's model downgrades the planning and reporting agent too, which is exactly what the team wants to avoid. B is wrong because lowering max_tokens only truncates output; it does not make exploration cheaper per token and risks cutting off useful findings. D is wrong because removing the subagent puts all the exploration output into the main agent's context window, increasing cost and polluting context, and the main agent would still run on the expensive model.
Reference: Subagents in the SDK - Claude Agent SDK