Your Claude application runs long agentic workflows where the agent makes many tool calls, and the conversation history grows quickly. After about 20 tool calls, you notice the agent's responses become less focused and sometimes ignore earlier task constraints. How would you address this?
Correct Answer: B
Option B addresses the actual architectural failure: low-value historical material is crowding out the high- signal information required for current reasoning. A larger context window does not guarantee better attention to important constraints. Effective agent architecture actively manages what remains in context as the workflow progresses. Anthropic's Context Editing documentation explicitly provides tool-result clearing for agentic workflows with heavy tool usage. Once Claude has processed an older result, verbose file contents, search output, or API responses may no longer need to remain in full. Older results can therefore be removed while recent and important state remains available. Anthropic also documents compaction, where accumulated history is summarized and replaced with a smaller representation that preserves important task state. A removes an important agent capability rather than solving context growth. C retains all accumulated noise and merely gives it more space. D repeatedly destroys valuable task state and creates artificial workflow boundaries. Therefore, B preserves goals, decisions, unresolved constraints, and necessary results while reducing irrelevant historical content. Relevant Study Guide topics: context engineering, tool-result clearing, compaction, long-running agents, context quality, and task-state preservation.
CCDV-F Exam Question 27
Your Claude agent's hooks are currently triggered for every action, which slows down the agent significantly even when actions pose no risk. The team wants to scope hooks more carefully. How would you scope the hooks?
Correct Answer: A
Option A correctly applies selective enforcement. Claude Code hooks can execute automatically at lifecycle events such as PreToolUse, and matchers or conditions can narrow exactly which operations trigger a hook. Anthropic's hook reference demonstrates this pattern by applying a PreToolUse hook specifically to destructive shell operations rather than indiscriminately processing every command. The documentation notes that if the matcher or conditional expression does not match, the handler is skipped, avoiding unnecessary process-spawn overhead. That architecture is particularly appropriate for costly or security-sensitive checks. High-risk events- destructive file operations, privileged commands, production changes, or access to sensitive resources-can receive deterministic pre-execution enforcement while routine low-risk actions proceed without additional hook latency. B creates an avoidable period in which safeguards disappear entirely. C reduces application availability without addressing the actual source of overhead. D is technically weaker because system-prompt instructions influence model behavior but are not equivalent to deterministic lifecycle interception capable of blocking execution. Therefore, hooks should be scoped using event types, matchers, and conditions according to risk. Relevant Claude Developer topics are Claude Code hooks, agent construction, tool governance, deterministic controls, permission boundaries, safety/performance tradeoffs, and lifecycle interception.
CCDV-F Exam Question 28
The Anthropic API deprecated a request parameter that your Claude application uses in approximately 40 places across the codebase. The deprecation notice gives a six-month window before the parameter is removed and recommends a replacement parameter with slightly different semantics. You would respond to the deprecation by...
Correct Answer: C
The supplied examination source selects C . Because the replacement parameter has different semantics , this is not a mechanical rename. The application must establish what existing behavior is important, encode that behavior in regression tests, and migrate incrementally so deviations can be detected and isolated. Anthropic's deprecation guidance follows the same lifecycle principle. Deprecated components remain temporarily available but receive a retirement deadline and a recommended replacement. Anthropic advises migrating before retirement and thoroughly testing applications against replacements well in advance of the cutoff. Its API versioning documentation also emphasizes compatibility contracts while acknowledging that APIs evolve and deprecated versions eventually become unavailable. Batch migration reduces blast radius. If one migrated group fails regression tests, the team can diagnose the semantic difference before changing remaining call sites. It also avoids concentrating all migration risk near the retirement deadline. A delays risk until the worst possible time. B only hides the dependency and does not complete migration. D changes all 40 usages simultaneously, making regression diagnosis and rollback substantially harder. Relevant Claude Developer topics: API lifecycle, deprecation management, regression testing, incremental migration, compatibility, technical debt, and controlled change management .
CCDV-F Exam Question 29
You are building an agent that needs to call several internal APIs and a database in a structured, repeatable way. Your team has decided to use the Claude Agent SDK rather than build a custom loop. You are setting up the agent's tool definitions and execution loop. How would you set up the tools and execution loop?
Correct Answer: A
The supplied Claude Developer examination source selects A . The purpose of choosing an agent SDK rather than implementing a custom Messages API loop is to consume the SDK's higher-level abstractions. Re- implementing dispatch, iteration, and state handling would discard much of the value provided by the SDK. Anthropic's current documentation distinguishes low-level tool-use loops from higher-level SDK-managed abstractions. With a manually implemented Messages API workflow, application code must inspect stop_reason, execute requested client tools, append tool_result blocks, preserve conversation history, and repeat until Claude completes the turn. Anthropic's higher-level tooling can instead encapsulate this repetitive control flow. Current migration guidance also confirms that Agent SDK @tool functions are automatically dispatched by the SDK and that agents, tools, and sessions are first-class SDK concepts. B is incorrect because structured tool use should not be replaced with informal plain-text calls. C introduces an unnecessary custom state dependency when no external persistence requirement exists. D duplicates control-loop functionality despite the explicit decision to use the SDK. Relevant Claude Developer topics: Agent SDK, tool definitions, dispatch, agentic loops, conversation state, tool execution, and abstraction selection .
CCDV-F Exam Question 30
The team is debating whether to build a new capability as a custom tool or to use an existing built-in tool that nearly covers the use case but lacks one specific feature. How would you decide?
Correct Answer: A
The supplied Claude Certified Developer Foundations material identifies A as the best answer. The decision should begin with the actual capability gap rather than a predetermined preference for built-in or custom tooling. If the existing capability can satisfy the requirement with a small supported extension or composition, using it avoids unnecessary implementation and maintenance. If the missing capability is fundamental, a custom tool becomes justified. Anthropic's tool architecture explicitly supports both categories. Claude provides Anthropic-managed or predefined tools while also allowing developers to define custom tools for operations specific to their application. With a custom client tool, the application defines the contract and executes the operation before returning its result to Claude. A is more complete than C because it evaluates both sides of the boundary : whether the existing mechanism can realistically meet the missing requirement and, if not, whether custom implementation is warranted. B prioritizes precedent over current requirements. D only determines whether the unmodified built-in tool is sufficient and does not address what to do when it is almost-but not entirely-sufficient. Relevant Claude Developer topics: built-in tools, custom tools, capability-gap analysis, tool contracts, maintenance cost, extensibility, and agent construction decisions .