Claude Certified Architect – Foundations Practice Question 12: Subagent Isolated Context

Claude Certified Architect, Foundations · Test 2 · question 2 of 10

Agent Architecture & Orchestrationmedium

An orchestrator built with the Claude Agent SDK investigates a failing deployment. After the main agent reads the error logs and decides the cause is a missing environment variable in config/prod.yaml, it delegates "fix the problem" to a code-fixing subagent through the Agent tool. The subagent reports back that it cannot tell what problem to fix and starts re-exploring the whole repository. What is the most likely cause, and the right fix?

Select one answer
Show answer and explanation

Answer:

  • C. The subagent starts with a fresh context window, and only the Agent tool's prompt string reaches it; include the file path, error and decision in that prompt

C is correct. A subagent runs in its own isolated context window with no parent conversation. The only content passed from parent to subagent is the Agent tool's prompt string, so the parent must put file paths, error messages and decisions into that prompt. Isolation is a feature: the subagent's intermediate tool calls do not clutter the parent's context, and only its final message returns.

A is wrong because subagents do not share the parent's history (only a fork of the current conversation does, which is a different mechanism), and nothing is corrupted. B is wrong because model size is irrelevant; even the same model cannot see turns that were never given to it. D is wrong because there is no description-keyed result cache that returns empty responses.

Reference: Subagents in the SDK - What subagents inherit

Practice Test 2 ›

Study guides for Claude Certified Architect, Foundations