CertifyDeck
Free complete guide

Study guide — CCAR-F

The official Claude Certified Architect – Foundations syllabus, organized by domain. Check off each point as you review it.

5 domains126 skills~189 min720/1000
Progreso general0/126 · 0%

Inicia sesión para guardar tu progreso entre sesiones.

Design and implement agentic loops for autonomous task execution

  • Ver resumen

    In a hand-written loop on the Messages API, stop_reason drives the flow: while it is tool_use, run the tools, send back tool_result blocks and call the API again; end_turn means the response is final. Other values need their own handling: max_tokens means truncation and pause_turn requires resending the conversation. In the Claude Agent SDK the loop runs automatically and the end is read from the ResultMessage subtype.

    How tool use works ↗Stop reasons and fallback ↗

  • Ver resumen

    Between iterations, append the assistant response unchanged to the history, then a user message with one tool_result block per tool_use, matched by tool_use_id, including when the tool fails (with is_error). The tool_result blocks go together in a single message and before any text. This is how Claude incorporates the new information and decides its next step.

    Handle tool calls ↗Parallel tool use ↗

  • Ver resumen

    Loop termination should rest on stop_reason, not on the model's text. Matching phrases such as task complete, treating any text block as the final answer, or using a fixed iteration cap as the main stopping rule causes early exits or unfinished answers, because a tool_use response can carry text. Turn or spend caps are only a safety net.

    How tool use works ↗How the agent loop works ↗

Orchestrate multi-agent systems with coordinator-subagent patterns

  • Ver resumen

    An effective coordinator analyzes each query and decides which subagents it needs instead of always running the whole pipeline. Anthropic recommends scaling effort to complexity (one agent for a simple fact, several for broad comparisons), and in the Agent SDK Claude picks a subagent from its description field. Limits such as maxBudgetUsd bound spend deterministically.

    How we built our multi-agent research system ↗Subagents in the SDK ↗

  • Ver resumen

    To avoid duplication and gaps, the coordinator splits the scope into non-overlapping parts (by subtopic, period, region or source type) and gives each subagent an objective, an output format, guidance on tools and sources and clear boundaries. Anthropic saw vague instructions make several subagents run the same searches. In the Agent SDK, tools and mcpServers restrict each subagent's sources.

    How we built our multi-agent research system ↗Subagents in the SDK ↗

  • Ver resumen

    In a refinement loop, the coordinator evaluates the synthesis against what the user asked for, turns each gap into targeted queries for the search and analysis subagents, and re-invokes synthesis until coverage is sufficient. It works when there are clear evaluation criteria and feedback improves the result; a cap on rounds is only a safeguard.

    How we built our multi-agent research system ↗Building effective agents ↗

  • Ver resumen

    Routing all communication through the coordinator gives it a single point to observe every handoff, apply the same policy to errors or partial results, and decide what information each subagent receives. In the Agent SDK, a subagent returns only its final message to the parent and receives only the Agent tool prompt; SubagentStart and SubagentStop hooks let you audit each delegation.

    Subagents in the SDK ↗Create custom subagents ↗

Configure subagent invocation, context passing, and spawning

  • Ver resumen

    A subagent that is not a fork starts with a fresh context: it does not see the coordinator's conversation or tool results and receives only the Agent tool prompt. The coordinator must therefore put the complete findings of earlier agents in that prompt (search results, analyses, file paths, errors and decisions), without summaries that lose detail.

    Subagents in the SDK ↗

  • Ver resumen

    When passing context between agents, separate content from its metadata (URL, document name, page) with a structured format: XML tags such as document, source and document_content, records with their own fields, or search_result blocks with source and title, which enable automatic citations. Each agent then keeps attribution without having to infer it from the text.

    Prompting best practices ↗Search results ↗

  • Ver resumen

    To run subagents in parallel, the coordinator emits several calls to the Agent tool (formerly named Task) in a single response, so the total time is that of the slowest subagent rather than the sum. It only suits independent, self-contained subtasks; when one stage depends on another, such as synthesis on the searches, it is spawned once their results arrive.

    Subagents in the SDK ↗How we built our multi-agent research system ↗

  • Ver resumen

    The coordinator should give subagents the goal, its context and the quality criteria (which sources count, what a good answer contains) instead of a step-by-step procedure. Anthropic found that in research, where the path cannot be predicted, heuristics work better than rigid rules, and that clear success criteria help a subagent know when to stop.

    How we built our multi-agent research system ↗Prompting best practices ↗

Implement multi-step workflows with enforcement and handoff patterns

  • Ver resumen

    When one step must always precede another, the guarantee cannot rest on the prompt: a PreToolUse hook on the downstream tool can return permissionDecision "deny" while the prerequisite is missing, and Claude reads the permissionDecisionReason to change course. A PostToolUse hook can read the earlier tool's tool_response and record the verified value per session_id.

    Intercept and control agent behavior with hooks ↗Hooks reference ↗

  • Ver resumen

    A request with several problems is split into independent items that are investigated in parallel and resolved in one reply. Claude can emit several tool_use blocks in one turn; all tool_result blocks go back together in a single user message. A subagent starts without the parent's history: the Agent tool prompt is all it receives, so it must carry the already verified facts.

    Parallel tool use ↗Subagents in the SDK ↗

  • Ver resumen

    If the person receiving the escalation cannot see the conversation, the handoff must stand on its own: an escalation tool whose input_schema requires customer_id, root cause, amount and recommended action. With strict: true the input always matches the schema (required fields and types), and detailed parameter descriptions steer the content; a PreToolUse hook can check figures against the system of record.

    Strict tool use ↗Define tools ↗

Apply Agent SDK hooks for tool call interception and data normalization

  • Ver resumen

    A PostToolUse hook receives tool_input and tool_response and can return updatedToolOutput to replace the result before Claude sees it, which unifies Unix and ISO 8601 dates or numeric status codes from different MCP servers. decision "block" and additionalContext only add text next to the original result. MCP tools are matched with mcp__<server>__.*.

    Hooks reference ↗Intercept and control agent behavior with hooks ↗

  • Ver resumen

    A PreToolUse hook reads tool_input before the tool runs and can return "deny" with a permissionDecisionReason that Claude reads and uses to take another route, such as escalating to a person. When hooks disagree the most restrictive wins: deny, then defer, ask and allow. With "defer" the turn ends with stop_reason "tool_deferred" and the pending call can resume after an external approval.

    Intercept and control agent behavior with hooks ↗Hooks reference ↗

  • Ver resumen

    Prompts, CLAUDE.md and skills are non-deterministic instructions: Claude usually follows them, with no guarantee. Hooks, deny rules and managed settings are applied by the harness every time. A rule with zero exceptions belongs in a command, http or mcp_tool hook (a prompt or agent hook lets another model decide) with onFailure "block" if the hook can fail; preferences stay in CLAUDE.md.

    Best practices for Claude Code ↗Intercept and control agent behavior with hooks ↗

Design task decomposition strategies for complex workflows

  • Ver resumen

    Prompt chaining splits a task into fixed steps, each call processes the previous output, and programmatic checks can sit between steps; it trades latency for accuracy. When the subtasks cannot be predicted, the orchestrator-workers pattern lets a central model decide them from the input, delegate them and synthesize the results. The recommendation is the simplest solution that works.

    Building effective agents ↗

  • Ver resumen

    Context is a finite resource: the more tokens, the less accurately a model recalls and relates information. Large reviews work better as a local pass per file, focused on one thing, plus a separate integration pass that receives condensed summaries (issues and changed interfaces) to catch cross-file problems. Each subagent receives only the Agent tool prompt and returns only its final message.

    Effective context engineering for AI agents ↗Subagents in the SDK ↗

  • Ver resumen

    An open-ended task such as adding tests to legacy code starts by exploring the structure, identifying the highest-impact areas and writing a prioritized plan that changes with what is discovered. Exploration can be delegated to a subagent and the plan reviewed in plan mode before any edit. For multi-session work, a task file with a status field and progress notes helps.

    Common workflows ↗Effective harnesses for long-running agents ↗

Manage session state, resumption, and forking

  • Ver resumen

    Claude Code saves every conversation; claude --continue reopens the most recent one in the directory, while naming a session with claude -n or /rename lets you return with claude --resume <name> or /resume <name>. An ambiguous name opens the picker. Resuming does not restore flags such as --mcp-config, --add-dir or --allowedTools, which must be passed again; the default display name is not a resume handle.

    Manage sessions ↗CLI reference ↗

  • Ver resumen

    In the Agent SDK, resume with fork_session=True (forkSession in TypeScript) creates a new session that starts from a copy of the original history; the fork gets its own session_id and the original stays unchanged. Forking copies the conversation, not the files: one branch's edits are real in the directory. In the CLI you fork with /branch or with --resume/--continue plus --fork-session.

    Work with sessions ↗Manage sessions ↗

  • Ver resumen

    Resuming a session (resume by ID, continue for the most recent one) gives the agent its whole history back, tool results included; use it when that context is still valid, for example after hitting a turn limit. If the queried data has changed, start a fresh session seeded with a summary of the conclusions. Fork copies the history to try another path without touching the original.

    Work with sessions ↗Manage sessions ↗

  • Ver resumen

    A session stores the conversation, not the filesystem: when resumed, the agent keeps its old file reads as past results and does not know they changed. For targeted re-analysis, the resume prompt should name the modified files and ask the agent to re-read them and revise only the affected findings, instead of re-exploring everything or rewinding with file checkpointing.

    Work with sessions ↗

Ready to test what you learned?

Practice by official domain and review every answer.

Start practicing