The coordinator agent has AgentDefinition objects configured for all four specialized subagents, each with appropriate descriptions, prompts, and tool restrictions. During testing, you notice that the coordinator correctly reasons about when to delegate—it generates messages such as, “I’ll ask the web-search agent to find sources on this topic”—but no subagent execution occurs. The coordinator then proceeds as if the delegation happened and continues with incomplete information. Logs show no errors.
What is the most likely cause?
Show answerHide answer
Correct answer: BThe coordinator’s allowedTools configuration does not include "Agent"—called "Task" in older SDK releases—so it cannot invoke the tool required to spawn subagents.
Explanation
Explanation:
The coordinator can reason about delegation and plan the task flow, but it cannot execute the delegation because it lacks the necessary tool to spawn subagents. In the Claude Agent SDK, subagent invocation is handled through a specific tool (often named "Agent" or "Task" depending on the SDK version). Without this tool in the coordinator's allowedTools configuration, the coordinator cannot actually execute the delegation—it can only plan and describe it.
Correct Option:
B. The coordinator's allowedTools configuration does not include "Agent"—called "Task" in older SDK releases—so it cannot invoke the tool required to spawn subagents.
This is the most likely cause because it perfectly explains the observed behavior: the coordinator correctly plans delegation (generating messages like "I'll ask the web-search agent...") but cannot execute it because the tool required to spawn subagents is not available. The absence of the Agent/Task tool means the coordinator is limited to reasoning about delegation without the ability to perform it, resulting in no subagent execution despite no error logs (the tool simply isn't there to call).
Incorrect Options:
A. The AgentDefinition objects are configured correctly, but the coordinator's system prompt does not explicitly list the available subagent types.
While the system prompt can help the coordinator understand available subagents, the ability to actually invoke subagents depends on having the Agent/Task tool in allowedTools. Even without subagent types listed in the prompt, if the tool is available, the coordinator could discover them through tool descriptions or use them appropriately. The prompt is guidance; the tool is the mechanism.
C. Subagent context isolation prevents task descriptions from reaching subagents unless explicit context forwarding is configured in ClaudeAgentOptions.
Context isolation would affect what information subagents receive, but it would not prevent the coordinator from spawning them in the first place. If the coordinator could call the Agent/Task tool, subagents would be invoked regardless of context isolation; the issue would then be that subagents lack necessary context, not that they aren't spawned at all.
D. The coordinator's max_tokens setting is too low, causing the subagent invocation to be truncated before the agent-type parameter is specified.
If max_tokens were too low, you would typically see truncation errors or incomplete tool calls. The coordinator's reasoning would be cut off, and the logs would likely show errors or warnings about token limits. Since there are no errors and the coordinator completes its reasoning but fails to execute, a token limit issue is unlikely. The tool simply isn't available to call.
Reference:
Anthropic Claude Agent SDK Documentation – Subagent Configuration – Clarifies that the coordinator must have the Agent/Task tool in its allowedTools configuration to invoke subagents; without it, the coordinator can only plan but not execute delegation.
Anthropic Claude Agent SDK – Version Migration Notes – Notes that the subagent invocation tool was renamed from "Task" to "Agent" in newer SDK releases, which may cause configuration issues if not updated.
SR Letter 11-7 (Federal Reserve) – Model Risk Management – Emphasizes the importance of proper configuration and validation of automated systems to ensure all components are correctly enabled and functioning.
Question 32Choose 1
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.
Your codebase exploration tool stores session IDs to allow engineers to continue investigations across work sessions. An engineer spent an hour yesterday analyzing a legacy authentication module, building context about its architecture and dependencies. They want to continue today. The session ID is valid, but version control shows 3 of the 12 files the agent previously read were modified overnight by a teammate’s merge.
What approach best balances efficiency and accuracy?
Show answerHide answer
Correct answer: BResume the session and inform the agent which specific files changed for targeted reanalysis
Explanation
Explanation:
The session contains valuable context from yesterday's analysis (architecture understanding, identified patterns, and relationships across 12 files), but three files have changed. A fresh session discards all this work, while blindly resuming risks stale assumptions. The optimal approach preserves the existing context while specifically addressing the changes to ensure accuracy.
Correct Option:
B. Resume the session and inform the agent which specific files changed for targeted re-analysis.
This is the most effective approach because it balances efficiency and accuracy. By resuming the session, you preserve all the valuable context the agent built yesterday—understanding of architecture, dependencies, and patterns. By informing the agent which 3 specific files changed, you enable targeted re-analysis of only the affected areas, allowing the agent to update its understanding without re-analyzing unchanged files. This approach minimizes redundant work while ensuring the agent's mental model is current.
Incorrect Options:
A. Start a fresh session to ensure the agent works with current codebase state without stale assumptions.
This discards an hour of valuable analysis work and forces the engineer to start from scratch. While it ensures accuracy, it is highly inefficient. The context about unchanged files (9 out of 12) remains valid and useful—throwing it away wastes significant effort. This approach fails to leverage the session persistence feature you built.
C. Resume the session and immediately have the agent re-read all 12 previously analyzed files.
This unnecessarily re-analyzes 9 files that haven't changed, wasting tokens and time. While it would ensure accuracy, it is inefficient and defeats the purpose of session persistence. The agent already built understanding of these files yesterday; re-reading them is redundant and adds latency without improving accuracy for the unchanged files.
D. Resume the session without informing the agent about the changed files.
This risks the agent operating on stale assumptions and providing inaccurate analysis. The agent would continue as if the codebase were unchanged, potentially giving outdated advice about the authentication module. This approach compromises accuracy and could lead to incorrect conclusions or bad recommendations, defeating the purpose of the tool.
Reference:
Anthropic Claude Agent SDK Documentation – Session Management – Recommends resuming sessions with specific context about changes to balance efficiency and accuracy, rather than full reset or blind continuation.
Software Engineering Best Practices – Incremental Analysis – Highlights that when working with codebases, it is efficient to preserve valid context and only re-analyze changed components.
SR Letter 11-7 (Federal Reserve) – Model Risk Management – Emphasizes the importance of maintaining accurate, up-to-date data and context in automated systems while avoiding unnecessary rework.
Question 33Choose 1
You built an LLM-powered code-review tool that analyzes pull requests and returns structured findings. Each finding is a JSON object containing file_path, line_number, issue_category—such as security or style—and description. Developers can dismiss findings they consider unhelpful, and currently 35% of findings are dismissed. You want to analyze these dismissals to understand what the system is getting wrong and improve the prompts accordingly. What change to the output structure would best support this analysis?
Show answerHide answer
Correct answer: BAdd a detected_pattern field recording the specific code construct that triggered the finding, such as single-letter loop variable.
Explanation
Explanation:
To analyze why 35% of findings are dismissed, you need to understand which specific code patterns or constructs are triggering the false positives. By recording the detected_pattern for each finding, you can aggregate dismissals by pattern, identify which patterns are most frequently dismissed, and target prompt improvements specifically for those patterns.
Correct Option:
B. Add a detected_pattern field recording the specific code construct that triggered the finding, such as single-letter loop variable.
This is the most effective change because it enables granular analysis of dismissal patterns. By grouping dismissed findings by detected_pattern, you can identify which specific code constructs consistently generate false positives. For example, if you discover that 80% of dismissed findings have a detected_pattern of "force_unwrap_in_test_file," you can add project-specific instructions about acceptable force-unwrapping in test contexts. This field provides actionable, specific data to guide targeted prompt improvements.
Incorrect Options:
A. Add a model_confidence field from 0.0 to 1.0 and filter findings below a threshold calibrated against historical dismissal rates.
While confidence scores can be useful, they do not help you understand why findings are dismissed. Filtering below a threshold may reduce dismissals but does not address the root cause—the model flagging acceptable patterns. This approach masks the problem without providing the diagnostic data needed to improve prompts. It also risks filtering out low-confidence but genuine issues.
C. Expand the description field with more detailed explanations of why each issue matters and how it should be fixed.
While better explanations might help developers understand findings, this change does not provide diagnostic data for analyzing dismissal patterns. The goal is to understand what the system is getting wrong at a pattern level, not to improve individual finding descriptions. This change would consume more tokens without enabling the analysis needed to reduce false positives.
D. Remove the issue_category field and track dismissal rates only at the individual-finding level.
Removing data reduces your ability to analyze patterns. Without issue_category, you cannot identify whether dismissals are concentrated in security, style, or other categories. Tracking only at the individual-finding level provides no aggregation capability for pattern analysis. This change moves in the wrong direction—you need more granular data, not less.
Reference:
Anthropic Prompt Engineering Best Practices – Recommends analyzing systematic errors by collecting structured data about output characteristics to identify patterns and target improvements.
SR Letter 11-7 (Federal Reserve) – Model Risk Management – Emphasizes the importance of ongoing monitoring and granular data collection to identify model weaknesses and inform validation improvements.
Software Engineering Metrics Best Practices – Highlights that effective issue tracking requires structured fields that enable aggregation and pattern analysis to identify systemic problems.
Question 34Choose 1
You are integrating Claude Code into your Continuous Integration/Continuous Deployment (CI/CD) pipeline. The system runs automated code reviews, generates test cases, and provides feedback on pull requests. You need to design prompts that provide actionable feedback and minimize false positives.
After deploying automated code review, developers report that approximately 35% of findings are false positives following consistent patterns: style suggestions that contradict team conventions, security warnings for patterns that are safe in the deployment environment, and performance suggestions that would degrade this particular use case. You want to reduce false positives while enabling the model to generalize its judgment to novel code patterns it has not seen before.
Which approach is most effective?
Show answerHide answer
Correct answer: BInclude few-shot examples containing annotated code snippets that distinguish acceptable project patterns from genuine issues in each category.
Explanation
Explanation:
False positives arise because the model lacks examples that illustrate the boundary between acceptable patterns (given your team conventions and deployment context) and genuine issues. Few-shot examples enable the model to learn the reasoning heuristics for distinguishing these categories, allowing it to generalize to novel patterns not explicitly covered in the prompt.
Correct Option:
B. Include few-shot examples containing annotated code snippets that distinguish acceptable project patterns from genuine issues in each category.
This is the most effective approach because examples teach the model the decision boundary rather than just listing rules. By providing concrete annotated snippets—e.g., "This pattern is safe in our deployment context because X, but this similar pattern is a genuine security issue because Y"—the model learns the contextual reasoning needed to generalize. Unlike exhaustive rule lists, few-shot examples help Claude recognize that the same pattern may be acceptable or problematic depending on context, enabling accurate judgment on novel code.
Incorrect Options:
A. Create a comprehensive specification of every pattern that must not be flagged and include the complete document in the system prompt.
This is impractical because the universe of acceptable patterns is unbounded—you cannot enumerate every safe pattern. A comprehensive specification would be too long for the context window and would still fail to cover novel patterns not anticipated. Rules also lack the contextual nuance that examples provide; the model may struggle to apply abstract rules to concrete code.
C. Use keyword-based post-processing to remove findings containing terms such as "convention," "context-dependent," or "trade-off."
This is a crude filter that will miss nuanced false positives and may filter out genuine issues that legitimately involve conventions or trade-offs. Keyword filtering cannot distinguish between a false positive where the pattern is acceptable and a genuine issue where the same terminology appears. This approach adds complexity without improving the model's reasoning capability.
D. Add general instructions telling Claude to be conservative and report only definite issues.
These instructions are vague and subjective. Claude's interpretation of "conservative" or "definite" may not align with your team's standards, and this approach does not provide the concrete, contextual guidance needed to distinguish acceptable patterns from genuine issues. Without examples illustrating the boundary, the model may still produce the same false positives or, worse, become overly conservative and miss genuine issues.
Reference:
Anthropic Prompt Engineering Best Practices – Recommends using few-shot examples to teach nuanced decision boundaries, as examples are more effective than abstract rules for contextual judgment tasks.
SR Letter 11-7 (Federal Reserve) – Model Risk Management – Emphasizes the importance of validation and calibration using representative examples to ensure model outputs meet quality standards and reduce false positives.
NIST AI Risk Management Framework – Highlights that AI systems should be trained and validated using diverse, representative examples to ensure generalization and reduce systematic errors.
Question 35Choose 1
You are building a customer support resolution agent using the Claude Agent SDK. The agent handles high-ambiguity requests like returns, billing disputes, and account issues. It has access to your backend systems through custom Model Context Protocol (MCP) tools (get_customer, lookup_order, process_refund, escalate_to_human). Your target is 80%+ first-contact resolution while knowing when to escalate.
A customer raises three separate issues during one session: a refund inquiry (turns 1–15), a subscription question (turns 16–30), and a payment method update (turns 31–45). At turn 48, the customer asks “What happened with my refund?” The conversation is approaching context limits.
What strategy best maintains the agent’s ability to address all issues throughout the
session?
Show answerHide answer
Correct answer: DExtract and persist structured issue data (order IDs, amounts, statuses) into a separate context layer.
Explanation
Explanation:
The agent handles three distinct issues across 48 turns, approaching context limits while the customer references an earlier issue (refund inquiry from turns 1–15). Summarization or sliding windows risk losing critical details, while relying solely on tools loses conversational context. The optimal solution extracts and persists structured data about each issue, enabling the agent to reference specific information without retaining the entire conversational history.
Correct Option:
D. Extract and persist structured issue data (order IDs, amounts, statuses) into a separate context layer.
This is the most effective approach because it decouples critical business data from the conversational history. By extracting structured data about each issue (e.g., refund order ID, amount, current status; subscription type, billing cycle; payment method details), you create a durable, compact, and queryable context layer. The agent can reference this structured data when the customer asks follow-up questions, without needing the full 45-turn conversation history. This preserves both accuracy and context efficiency, enabling the agent to handle all three issues throughout the session.
Incorrect Options:
A. Summarize earlier turns into a narrative description, preserving full message history only for the active issue.
While summarization can reduce token usage, narrative summaries are lossy and may omit critical details needed to answer the customer's follow-up questions. When the customer asks "What happened with my refund?", a summary might not contain the specific order ID, amount, or status needed to provide an accurate, actionable response. This approach risks losing precision for the sake of compression.
B. Implement sliding window context that retains the most recent 30 turns.
A sliding window would drop the refund conversation (turns 1–15) by the time the customer asks about it at turn 48. The agent would have no memory of the earlier refund discussion, forcing it to ask the customer to repeat information or rely solely on backend lookups without conversational context. This approach cannot handle the multi-issue, long-duration use case effectively.
C. Rely on MCP tools to re-fetch relevant information on demand when the customer references earlier issues.
While tools like get_customer and lookup_order can retrieve backend data, they cannot recover the conversational context—what the customer was told earlier, what commitments were made, or what previous explanations were given. The agent would be able to fetch raw order details but would lack the history of what was communicated, leading to inconsistent or repetitive responses.
Reference:
Anthropic Claude Agent SDK Documentation – Context Management – Recommends extracting and persisting structured data for long-running multi-issue sessions to maintain accuracy while managing context limits.
Customer Support Best Practices – Highlights the importance of maintaining full context across multiple issues in a single session, especially when customers reference earlier topics.
SR Letter 11-7 (Federal Reserve) – Model Risk Management – Emphasizes the need for accurate, complete data retention in automated systems to support consistent and reliable customer interactions.
Question 36Choose 1
You are integrating Claude Code into your Continuous Integration/Continuous Deployment (CI/CD) pipeline. The system runs automated code reviews, generates test cases, and provides feedback on pull requests. You need to design prompts that provide actionable feedback and minimize false positives.
Your automated review calls the Claude API for each pull request, using tool_use with a report_findings tool that returns a JSON array of finding objects. Each object contains file_path, line_number, severity, category, and description. During testing on a large pull request touching more than 30 files, the response reaches the max_tokens limit and is truncated in the middle of the JSON, causing your pipeline’s parser to fail.
What is the most effective way to handle this?
Show answerHide answer
Correct answer: ASplit the review into multiple API calls that each analyze a subset of the changed files, and then merge the resulting findings arrays.
Explanation
Explanation:
The root cause is that a single API call with a large pull request (30+ files) exceeds the max_tokens limit, causing JSON truncation and parser failure. The solution must reduce the amount of content per call while preserving the complete review coverage. Splitting the review into multiple focused calls directly addresses the token constraint without sacrificing quality or completeness.
Correct Option:
A. Split the review into multiple API calls that each analyze a subset of the changed files, and then merge the resulting findings arrays.
This is the most effective approach because it directly addresses the token limitation by partitioning the work into smaller, manageable chunks. Each API call analyzes a subset of files, staying within the max_tokens limit, and the complete findings are merged post-processing. This approach is reliable, preserves the quality of each individual review, and can scale to arbitrarily large pull requests. It also allows for parallel processing if needed, reducing overall latency.
Incorrect Options:
B. Increase max_tokens to the model's maximum and instruct Claude to keep each finding description under 50 words.
While increasing max_tokens may help, it is not guaranteed to solve the problem for very large pull requests, and it increases costs for all reviews. Instructing Claude to keep descriptions under 50 words forces unnatural brevity that may reduce the actionability of findings. This approach is a band-aid that does not address the fundamental scaling issue and may degrade output quality.
C. Switch from tool_use to prompting Claude to return findings as a Markdown list.
This changes the output format but does not address the root cause of exceeding the token limit. Markdown lists are not inherently more token-efficient than structured JSON with tool_use. The parser would need to be redesigned, and the approach still risks truncation on large pull requests. This option adds work without solving the problem.
D. Add retry logic that detects truncated JSON and resends the request with instructions to report only critical and high-severity findings.
This approach degrades the review quality by filtering out lower-severity findings, which may include important issues. The retry logic would only trigger after a failure, causing delays and inconsistent results. It also does not guarantee that the reduced set will fit within the token limit, especially for very large pull requests. This approach sacrifices completeness for reliability, which is not acceptable for a comprehensive code review.
Reference:
Anthropic API Documentation – Error Handling – Recommends splitting large requests into multiple smaller calls to avoid token limits, rather than relying on max_tokens increases or output compression.
Software Engineering – Batch Processing Patterns – Highlights that splitting large workloads into smaller batches is a standard pattern for managing resource constraints while maintaining completeness.
SR Letter 11-7 (Federal Reserve) – Model Risk Management – Emphasizes the importance of robust error handling and ensuring that automated systems can process large workloads reliably and completely.
Question 37Choose 1
Your multi-agent research pipeline crashed after processing 12 of 28 documents. The websearch
agent had identified relevant sources, the document analyzer had partially completed extraction, and the synthesizer had begun identifying patterns. You need to resume processing without repeating work or losing fidelity in the prior findings. What statemanagement approach best balances information fidelity with context efficiency when restoring agent state?
Show answerHide answer
Correct answer: AHave each agent persist a structured export to a known location. On resumption, the coordinator loads the manifest and injects relevant state into agent prompts.
Explanation
Explanation:
The pipeline crashed mid-processing after completing work on 12 of 28 documents, with partial progress from multiple agents. The solution must preserve the fidelity of completed work while efficiently loading only the necessary state for resumption. A structured, coordinated state management approach ensures completeness without redundant processing.
Correct Option:
A. Have each agent persist a structured export to a known location. On resumption, the coordinator loads the manifest and injects relevant state into agent prompts.
This is the most effective approach because it combines fidelity with efficiency. Each agent exports a structured, complete representation of its work (findings, extractions, patterns identified) to a known location. The coordinator maintains a manifest tracking which documents and tasks are complete. On resumption, the coordinator loads the manifest, determines what work remains, and injects only the relevant completed state into agent prompts. This avoids repeating work (the 12 processed documents) while ensuring complete fidelity through structured data rather than lossy summaries.
Incorrect Options:
B. Have each agent maintain its own persistent state file and reload it independently at the beginning of each session.
This approach lacks coordination and could lead to inconsistency or duplication. Without a central manifest, agents may not know which documents were already processed by other agents, potentially causing redundant work or gaps. Independent state management also makes it difficult to ensure cross-agent consistency, as each agent's view of "completed" may differ.
C. Persist the coordinator's conversation log containing all task delegations and responses, and provide this log to the agents when resuming.
The conversation log is a lossy, narrative representation that may not capture all structured details needed to resume accurately. Agents would need to parse the log to reconstruct state, which is error-prone and inefficient. This approach also lacks the structured data needed for precise resumption—the log may contain instructions and summaries but not the complete findings needed to avoid reprocessing.
D. Index all agent outputs in a shared vector store. When resuming, have each agent query the store using semantic search to retrieve relevant prior findings.
Vector stores are designed for semantic similarity retrieval, not precise state restoration. Semantic search may retrieve incomplete or irrelevant results, potentially missing critical prior findings. This approach also introduces retrieval uncertainty and complexity, as agents would need to formulate effective queries to locate their own prior work. Structured exports with clear manifests are far more reliable for deterministic state restoration.
Reference:
Anthropic Claude Agent SDK Documentation – State Management – Recommends structured state persistence with manifests to enable efficient resumption after failures.
SR Letter 11-7 (Federal Reserve) – Model Risk Management – Emphasizes the importance of data persistence, audit trails, and recovery mechanisms in automated systems to ensure reliability and completeness.
Distributed Systems Best Practices – Checkpointing – Highlights that structured checkpoints with manifests are more reliable than log-based or retrieval-based state restoration for resuming work after failures.
Question 38Choose 1
In addition to your CI pipeline, your organization has enabled Claude’s managed Code Review through the Claude GitHub App on this repository, and reviews run automatically on every pull request. Reviews average 18 findings per pull request. Developer feedback reveals three categories of unwanted noise: (1) style and formatting issues already enforced by your CI linter, (2) findings on automatically generated template code under src/gen/*, and (3) rendering-helper patterns that are intentional project conventions but are flagged because they resemble common anti-patterns. Only approximately four findings per pull request are genuine logic bugs. What is the most effective way to reduce this noise while preserving the detection of real issues?
Show answerHide answer
Correct answer: ACreate a REVIEW.md file at the repository root containing skip rules for CI-enforced checks and generated files, together with a verification requirement that rendering-related findings cite a specific line demonstrating incorrect behavior.
Explanation
Explanation:
The managed Code Review through the Claude GitHub App automatically runs on every pull request, producing 18 findings per review, of which only ~4 (22%) are genuine logic bugs. The noise comes from three specific categories: style/linting (already covered by CI), generated code (src/gen/*), and intentional rendering patterns. The solution must reduce noise from these categories while preserving detection of real issues, using mechanisms supported by the Claude GitHub App.
Correct Option:
A. Create a REVIEW.md file at the repository root containing skip rules for CI-enforced checks and generated files, together with a verification requirement that rendering-related findings cite a specific line demonstrating incorrect behavior.
The Claude GitHub App supports REVIEW.md (or similar configuration files) for customizing review behavior on a per-repository basis. This approach is the most effective because it leverages the app's native configuration mechanisms to address all three noise categories directly. Skipping CI-enforced checks prevents duplicate findings; ignoring src/gen/* prevents noise from auto-generated code; and requiring verification evidence for rendering-related findings ensures that only legitimate issues (where the pattern actually causes incorrect behavior) are reported, not merely flagged for resembling anti-patterns.
Incorrect Options:
B. Configure separate GitHub Actions workflow files for each code area: one for generated code with findings suppressed, one for rendering code with custom instructions, and one general workflow for everything else.
This adds unnecessary complexity and does not align with how the Claude GitHub App operates. The managed Code Review runs as a single GitHub App integration, not as separate Actions workflows per code area. This approach also fragments the review process, making it harder to manage and risking inconsistent coverage.
C. Add custom review instructions to a GitHub Actions workflow file, using the action's prompt parameter to suppress duplicate lint findings, ignore generated template code, and impose stricter evidence requirements on rendering-related issues.
This option misidentifies the integration mechanism. The Claude GitHub App is a managed GitHub App, not a GitHub Action. It does not have a "prompt parameter" in a workflow file. While GitHub Actions can be used to invoke Claude's API, the managed Code Review provided through the GitHub App is configured via repository files (like REVIEW.md), not via workflows.
D. Add detailed explanations to the project's CLAUDE.md describing intentional patterns, stating that CI handles linting, and identifying src/gen/ as automatically generated code.
CLAUDE.md provides persistent context for Claude Code CLI and general agent interactions, but the Claude GitHub App's managed Code Review uses a separate configuration mechanism (REVIEW.md). While CLAUDE.md may influence some Claude interactions, the GitHub App's behavior is controlled through its dedicated configuration. This option would not affect the managed Code Review's findings.
Reference:
Anthropic Claude GitHub App Documentation – REVIEW.md Configuration – Specifies that REVIEW.md (or similar repository configuration files) control the managed Code Review's behavior, including skip rules and custom instructions.
Anthropic Claude GitHub App – Managed Code Review – Explains that the GitHub App runs automatically on PRs and can be configured via repository files to reduce noise and focus on actionable findings.
CI/CD Best Practices – Emphasizes that automated code review tools should complement, not duplicate, existing linting and formatting checks, and should use configuration files to suppress known noise sources.
Question 39Choose 1
After deploying the automated review, you notice high precision but low recall—real bugs are slipping through undetected. Investigation reveals that your review prompt instructs Claude to “only report high-confidence issues you are certain about” and “err on the side of not commenting.” Developers appreciate the low noise, but a race condition that caused a production outage was visible in a reviewed pull request and went unreported. You need to substantially improve bug detection while keeping false-positive rates manageable. What is the most effective approach?
Show answerHide answer
Correct answer: CSplit the review into a finding stage whose objective is comprehensive coverage—reporting every potential issue with confidence and severity metadata—and a separate stage that verifies and thresholds those findings.
Explanation
Explanation:
The conservative prompt instructions ("only report high-confidence," "err on the side of not commenting") are suppressing genuine bug detection to achieve low noise. The solution must separate the detection (comprehensive coverage) and filtering (thresholding) stages so that the model is not forced to self-censor during discovery, while still producing a manageable set of findings.
Correct Option:
C. Split the review into a finding stage whose objective is comprehensive coverage—reporting every potential issue with confidence and severity metadata—and a separate stage that verifies and thresholds those findings.
This is the most effective approach because it resolves the core tension between recall and precision by decoupling detection from filtering. The finding stage operates without conservative constraints, enabling Claude to report all potential issues including the race condition that was previously suppressed. Each finding includes confidence and severity metadata. The separate verification stage then applies thresholds, deduplication, and historical noise filtering to produce a manageable set of high-quality findings. This two-stage design substantially improves recall while keeping false positives manageable through programmatic control.
Incorrect Options:
A. Add detailed few-shot examples demonstrating bug categories Claude should flag—race conditions, null dereferences, and error-handling gaps—while retaining the high-confidence filtering instruction.
The high-confidence filtering instruction is the root cause of the low recall. Adding examples of bug categories will not override the instruction to suppress uncertain findings—the model will still avoid reporting anything it deems below the confidence threshold. The race condition that caused the outage may have been subtle enough that Claude was not "certain" about it, leading to suppression.
B. Remove the conservative instructions and have Claude report every potential issue, then apply a programmatic filter that deduplicates findings and suppresses historically noisy categories.
While removing the conservative instructions is necessary, reporting every potential issue would likely produce overwhelming noise. Programmatic filtering alone cannot effectively separate genuine bugs from trivial concerns without the structured metadata (confidence, severity) that a dedicated verification stage can provide. This approach also misses the opportunity to use a second model pass for intelligent verification, which is more nuanced than simple filtering.
D. Expand the context to include related tests, recent Git history, and the module's dependency graph so Claude has richer evidence for judging severity.
While richer context may help the model make better judgments, it does not address the core issue—the model is being instructed to suppress all but the most certain findings. Even with perfect context, the high-confidence filter would still suppress the race condition if the model wasn't "certain" about it. Context expansion is a complementary improvement, not a solution to the suppression problem.
Reference:
Anthropic Prompt Engineering Best Practices – Recommends separating detection and filtering stages to avoid self-censorship during discovery while maintaining output quality.
SR Letter 11-7 (Federal Reserve) – Model Risk Management – Emphasizes the importance of comprehensive detection and subsequent validation rather than conservative self-censorship in automated systems.
Software Engineering – Code Review Best Practices – Highlights that effective review processes separate the detection of potential issues from the triage/filtering phase to ensure bugs are not missed due to premature judgment.
Question 40Choose 1
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, and Glob—and integrates with Model Context Protocol (MCP) servers. An engineer sees the unfamiliar error message SYNC_CONFLICT: entity version mismatch detected in production logs but does not know which of the 12 services in the codebase generates it. The engineer asks the agent to locate the responsible source code. What exploration approach will find the responsible code most efficiently?
Show answerHide answer
Correct answer: AUse Grep to search for distinctive text from the error message, such as SYNC_CONFLICT or entity version mismatch, and then read the matching files to understand the context.
Explanation
Explanation:
The engineer has a specific, distinctive error message string ("SYNC_CONFLICT: entity version mismatch") that uniquely identifies the error. The most efficient approach is to search the codebase for this exact text to locate where it is defined or raised, then read the relevant files to understand the context. This targeted approach minimizes scanning and reading.
Correct Option:
A. Use Grep to search for distinctive text from the error message, such as SYNC_CONFLICT or entity version mismatch, and then read the matching files to understand the context.
This is the most efficient approach because the error message contains distinctive, unique text that is unlikely to appear elsewhere in the codebase. Grep can quickly scan all files and return the exact locations where this error is defined or raised. This directly answers the engineer's question ("which service generates it?") in minimal time. Reading the matching files then provides the necessary context about the error's origin and conditions.
Incorrect Options:
B. Use Glob to find files in directories commonly associated with error handling, such as errors, exceptions, or handlers, and then read every matching file.
This is inefficient because it relies on naming conventions that may not be consistent across 12 services. The error definition could be in a file named something unexpected. Reading every file in error-related directories across all services would waste significant time and tokens, especially if many directories are empty or contain unrelated errors.
C. Read the project's README and service-configuration files, and then systematically read source files in every service directory.
This is extremely inefficient. The engineer would need to read through large amounts of unrelated documentation and configuration before even starting to search source code. Systematically reading every service directory would be time-consuming and would include many files that do not contain the error definition. This approach does not leverage the unique identifier provided by the error message.
D. Use Grep to locate every file importing the project's error-handling module, and then read those files to find custom error definitions.
This is more focused than options B or C, but it still makes an assumption that the error is defined using a central error-handling module. The error could be defined inline, use a different module, or be raised by a third-party library. The direct Grep for the error message text is more reliable because it targets the exact error string rather than indirect patterns.
Reference:
Anthropic Claude Agent SDK Documentation – Tool Usage Best Practices – Recommends starting with Grep for specific, distinctive text patterns to locate code efficiently.
Software Engineering – Codebase Navigation – Highlights that searching for unique strings (error messages, function names, constants) is the most efficient way to locate code responsible for specific behaviors.
SR Letter 11-7 (Federal Reserve) – Model Risk Management – Emphasizes the importance of efficient and accurate root-cause analysis in automated systems.
Full mock exam
Sit the CCAR-F exam before exam day
Full-length mocks with the same number of questions and the same time limit as the real CCAR-F exam. Every attempt draws a new set of questions from the full bank, so you can keep going until you pass comfortably.