Halloween Special 2026! Get Up to 25% OFF Practice Questions! Limited Time - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Anthropic CCAR-F Exam - Topic 4 Question 7 Discussion

Posted by Margot on Oct 01, 2026 at 08:53 PM

You are building developer productivity tools using the Claude Agent SDK. The agent helps engineers explore unfamiliar codebases, understand legacy systems, generate boilerplate code, and automate repetitive tasks. It uses the built-in tools (Read, Write, Bash, Grep, Glob) and integrates with Model Context Protocol (MCP) servers.

An engineer asks your agent to add comprehensive tests to a legacy codebase with 200 files and minimal existing test coverage. The engineer hasn't specified which modules to prioritize.

How should the agent decompose this open-ended task?

Suggested Answer: B

The task is open-ended because neither the critical modules nor the required testing sequence is known in advance. The agent should first use lightweight discovery tools to map the repository, locate existing tests, identify central modules, and determine which components have high fan-in, business significance, complex branching, or extensive external dependencies. It can then produce an initial risk-based testing plan and refine it as new dependency information appears.

Anthropic distinguishes predefined workflows from agents that dynamically control their processes and tool usage. Agents are appropriate when the required steps cannot be reliably hardcoded and must adapt to environmental evidence. During execution, they should obtain ground truth through tool results and use that feedback to determine subsequent actions. (https://www.anthropic.com/research/building-effective-agents) Anthropic also identifies orchestrator-worker designs as suitable for complex coding and search tasks where the necessary subtasks depend on what the investigation reveals. (https://www.anthropic.com/research/building-effective-agents)

Option A assigns effort using directory boundaries rather than risk. Option C exhausts context before delivering value. Option D uses alphabetical order, which has no relationship to impact or coverage priority.

Option B establishes an evidence-driven decomposition: discover, prioritize, test high-impact paths, measure results, and revise the plan as dependencies and uncovered risks emerge.

Official references/topics: Dynamic Task Decomposition; Adaptive Agent Loops; Orchestrator-Workers; Risk-Based Test Planning.


Get Premium CCAR-F Questions as Interactive Web-Based Practice Test or PDF Real Exam Format Detailed Explanations Instant Access Get Your Practice Test
7 comments · newest first
MO
Mollie 2 days ago
Surprised that anyone would consider D; it feels too random!
JA
Jacob 7 days ago
I disagree, A is too rigid for a complex codebase.
VO
Vonda 12 days ago
Option B sounds like the best approach for prioritizing tests.
AL
Allene 17 days ago
I’m leaning towards option D because it seems like a practical approach, but starting alphabetically feels a bit random. Wouldn’t it be better to focus on the most critical modules first?
FR
Fredric 22 days ago
Option C sounds thorough, but reading all 200 files seems overwhelming. I wonder if there’s a more efficient way to get an overview first.
GE
Geraldo 28 days ago
I remember a practice question where we had to prioritize tests based on code complexity. I feel like option A could lead to wasted effort if we don't consider the actual importance of the modules.
VE
Veronika 1 month ago
I think option B makes the most sense since it focuses on prioritizing high-impact areas, but I'm not entirely sure how to effectively use Grep and Glob together.
0/2000 characters

Save Cancel