CCDV-F domain - 14.7% of the exam

Agents and Workflows

Agents and Workflows is 14.7% of the CCDV-F exam. These are the objectives it covers, each with practice questions, with every answer explained.

The domain in numbers

42
Practice questions
3
Objectives
42
Medium

Where people go wrong

  • Ending the agent loop on anything but stop_reason

    The wrong answers decide whether to run another turn from output text, a closing phrase, a block count, a reply length or a fixed turn cap. Prose varies from run to run, and a short reply can still carry a tool request. The response's stop_reason states why generation halted, so the loop continues while it indicates tool use, executes the tool, returns the result, and stops once the turn is complete. A turn cap is only a ceiling against runaway runs.

    See it in a sample question
  • Building a fixed sequence as an agent or supervisor

    When the same steps run in the same order, the wrong answers add a tool-choosing agent, a manager agent or one subagent per step. Each lets a model pick the order, which breaks reproducible routing and makes it impossible to name the failing step. The correct design is a workflow: control flow lives in application code, and Claude is called only at steps needing language judgement. The test is who decides the next step.

    See it in a sample question
  • Fixing context crowding with compaction or caching

    Where raw document text from many independent reads fills one conversation, the wrong answers offer compaction, caching, a larger window or a firmer instruction. Compaction summarises after the bulk has already arrived, and caching only cheapens a stable prefix. Dispatching a subagent per document or file gives each read its own isolated context, so the coordinator holds only short findings. Truncating each source or discarding file output also fails here, because that text is the material the findings depend on.

    See it in a sample question
  • Mistaking the context window for agent memory

    When facts must survive across sessions or past trimmed turns, the wrong answers lengthen the window, load the full history, ask the customer to repeat themselves or rely on a growing summary. The context window is the working set for one run. Durable memory means writing confirmed facts to external storage and reading back only the relevant entries into each new session, which also keeps session start inside a latency budget.

    See it in a sample question

Objectives in this domain

Sample questions from this domain

Free sampleAgents and Workflowsmedium

A migration assistant is built as an agent with a set of tools. Some runs finish after two tool calls and others after fifteen, and the team wants the loop condition expressed in application code rather than guessed from the assistant's output text. What correctly decides whether the agentic loop should run another turn?

  • AThe application counts the tool calls made so far and ends the run once that count reaches a configured ceiling for the migration task
  • BThe application inspects the stop reason on each response and continues only while the model has asked to use a tool, executing it and returning the result Correct
  • CThe application matches the assistant text against a completion phrase agreed in the system prompt, and ends the run when that phrase appears
  • DThe application ends the run when a response arrives whose output token usage is well below the configured limit, indicating nothing further was produced
Terminate an agentic loop on the structured stop reason of each response, not on output wording, length or a call count. The agentic loop continues while the model requests tool use and stops when the response indicates a completed answer. Because that state is reported as structured metadata on the response rather than inferred from the text, reading it gives a deterministic loop condition, while call counts and phrase matching are heuristics layered on top.

Why A is wrong: Tempting because a ceiling is a sensible safety limit, but a cap protects against a runaway run rather than signalling that the model has finished its work.

Why B is correct: Correct because the stop reason is the structured signal describing why generation halted, so it distinguishes a pending tool call from a finished answer without parsing prose.

Why C is wrong: Tempting because instructing a closing phrase seems deterministic, but it depends on the model reproducing wording exactly, which makes termination a prompt behaviour rather than a protocol fact.

Why D is wrong: Tempting because a short reply often does mean completion, but a brief response can still carry a tool request, so usage size cannot decide termination.

Free sampleAgents and Workflowsmedium

A finance team processes invoices through five fixed steps that run in the same order for every invoice: extract fields, validate totals, classify the cost centre, check the amount against an approval threshold, and write a record to the ledger. The steps never vary, the team must be able to point at which step failed for any given invoice, and an audit requirement says the sequence of steps must be reproducible six months later. Which architecture fits these constraints best?

  • AAn agent given the five steps in its system prompt and a set of tools, left to decide the order of tool calls for each invoice as it reasons through the document.
  • BA deterministic workflow that calls Claude at the individual steps that need language understanding, with the ordering, branching and error handling expressed in application code. Correct
  • CA manager agent that delegates each of the five steps to a dedicated subagent and merges their results once every subagent has reported back on the invoice.
  • DA single model call that receives the whole invoice and the five step descriptions and returns the ledger record, with a validation pass over the returned structure.
Choose a coded workflow over an agent when the path is fixed and each step must be individually attributable and reproducible. Agents earn their cost by choosing their own path when the path cannot be known in advance. Here the sequence is known, so putting the control flow in application code makes the ordering deterministic and gives every step its own boundary for logging, retry and audit, while Claude is still used where language understanding is genuinely required.

Why A is wrong: Tempting because a model that can call the same five tools looks equivalent and needs less orchestration code, but the order becomes a model decision that can differ per invoice, which defeats both the per-step failure attribution and the reproducibility requirement.

Why B is correct: Correct: the path is fixed and known in advance, so the control flow belongs in code, and each model call sits at a named step whose input, output and failure are individually observable and repeatable.

Why C is wrong: Tempting because one subagent per step maps neatly onto the five steps, but delegation buys context isolation for open-ended exploration, and here it adds a coordination layer and a nondeterministic ordering decision that the fixed sequence does not earn.

Why D is wrong: Tempting because it is the cheapest thing to build and structured output does catch malformed results, but collapsing five steps into one call leaves nothing to attribute a failure to, and validating the final shape says nothing about which step went wrong.

Free sampleAgents and Workflowsmedium

A research assistant must answer one question by reading across four unrelated internal document stores. A single-agent build currently reads all four in turn, and by the fourth store the context window is dominated by raw document text, with a measured rise in answers that contradict the earlier sources. Each store can be searched independently, and the final answer must reconcile all four. Which change addresses the measured failure?

  • AIncrease the number of search results retrieved per store so the assistant has more supporting passages available before it composes the reconciled final answer.
  • BInstruct the assistant in its system prompt to re-read the earlier sources carefully and to avoid contradicting them when it writes the final reconciled answer.
  • CGive a coordinator agent four subagents, one per store, each searching in its own context and returning a condensed finding, and have the coordinator reconcile the four findings. Correct
  • DKeep the single agent and compact the conversation automatically whenever the context approaches its limit, so older document text is summarised as the search proceeds.
Use subagent context isolation, not more retrieval or stronger wording, when parallel independent searches crowd a single agent's context. The contradictions are a context pressure symptom: raw text from the earlier stores is displaced by the time the fourth is read. Because the four searches share no state, each can run in a separate context and return only its conclusion, so the coordinator reconciles four short findings instead of competing for room with the source material.

Why A is wrong: Tempting because thin retrieval is a common cause of weak answers, but the trace shows the context is already saturated with raw text, so adding passages makes the crowding that produced the contradictions worse rather than better.

Why B is wrong: Tempting because the failure looks like carelessness that wording could correct, but an instruction cannot restore detail that has been crowded out of the window, and prompt wording is advice rather than a structural fix to context pressure.

Why C is correct: Correct: the searches are independent, so isolating each one in its own context keeps raw document text out of the coordinator's window and leaves it holding only the four condensed findings it needs to reconcile.

Why D is wrong: Tempting because compaction genuinely relieves context pressure in long-running sessions, but it summarises after the crowding has occurred and does so lossily, whereas the independent searches here can be kept out of the main window in the first place.

Free sampleAgents and Workflowsmedium

A support agent handles the same customer several times a year in separate sessions. Advisers require it to recall that customer's stated accessibility preferences and past resolutions across those sessions, while each new session must still start well inside its latency budget. Transcripts run to thousands of turns per customer per year. Which memory design meets both requirements?

  • ALoad the customer's full prior transcripts into the system prompt at the start of every session, so the agent has the complete history available before the first adviser question arrives.
  • BRely on a long context window and keep one continuous conversation open per customer for the whole year, so nothing has to be written down or retrieved between the individual sessions.
  • CWrite durable facts such as preferences and resolutions to an external store as they are confirmed, and load only the entries relevant to the current session through a retrieval tool. Correct
  • DSummarise each session into a paragraph at the end and append every paragraph to a growing block that is placed into the system prompt in full at the start of the next session.
Agent memory persists as durable facts in an external store, retrieved selectively, rather than as history replayed into every session. The context window is per session and bounded, so anything that must survive between sessions has to live outside it. Writing confirmed facts to a store and retrieving only the relevant ones gives unbounded retention with a bounded, predictable amount of text loaded at session start, which is what keeps the latency budget satisfiable as the customer history keeps growing.

Why A is wrong: Tempting because full history guarantees nothing is missed, but thousands of turns cost time to load and process at session start, which is the latency the requirement explicitly bounds.

Why B is wrong: Tempting because it avoids building a store at all, but a year-long conversation grows past any window and makes recall depend on an ever-lengthening transcript rather than on durable facts.

Why C is correct: Correct, because agent memory held outside the context window persists across sessions, and retrieving only the relevant entries keeps session start small enough to sit inside the stated latency budget.

Why D is wrong: Tempting because summarising does shrink the raw transcript, but an append-only block still grows without bound across a year and offers no way to load only what the current session needs.

Other domains in this exam

See also the CCDV-F cert hub, the study guide, and the cheat sheet.

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