360 questions · instant answer feedback · concise explanations · free
Question 1 of 360Scenario: Developer Productivity with Claude. 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 built-in tools (Read, Write, Bash, Grep, Glob) and integrates with MCP servers. In your CI pipeline, a Claude Code job proposes unit tests for pull requests touching legacy modules. Developers report that many suggestions are superficial, duplicate scenarios already covered elsewhere, or ignore reusable factories and fixtures described only in scattered onboarding notes. What change would most effectively improve the usefulness of generated tests across the team?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Document team testing standards, high-value test criteria, and reusable fixtures in project CLAUDE.md consumed by the CI job.
Project-level context files like CLAUDE.md are the correct place to define team-wide testing standards and available fixtures, ensuring consistent CI guidance. Relying on individual developer prompts or increasing test volume does not solve the underlying context gap and will still produce superficial or duplicate tests.
Question 2 of 360Scenario: Developer Productivity with Claude. 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 built-in tools (Read, Write, Bash, Grep, Glob) and integrates with MCP servers. Your team added a CI step that reviews code produced by an internal Claude-powered scaffolding workflow. The review job currently resumes the same named Claude session that generated the branch, then asks it to critique the resulting pull request. Human reviewers report that the automated review misses subtle design issues and often defends choices made during generation. What change would most improve review quality?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Run the review in a separate Claude Code invocation with the PR diff, repository context, and review criteria only.
Running the review in a separate Claude Code invocation provides a clean perspective focused solely on the diff and repository criteria, avoiding confirmation bias. Reusing the generation session makes the model defend its prior reasoning, which blinds it to subtle architectural flaws.
Question 3 of 360Scenario: Developer Productivity with Claude. 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 built-in tools (Read, Write, Bash, Grep, Glob) and integrates with MCP servers. A team has built a Claude-powered helper that updates legacy configuration files to a new format. Initial generations look reasonable in code review, but repeated runs keep breaking different corner cases: missing optional sections, duplicate keys, and large files with thousands of entries. Developers have been sending follow-up prompts like "fix the migration bugs" and receiving inconsistent improvements. What refinement approach should they use next?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Share the failing test names, inputs, expected versus actual outputs, and stack traces, then iterate on minimal fixes.
Sharing specific failing test names, inputs, and expected versus actual outputs turns vague feedback into a concrete, test-driven loop. Subjective prompts like asking the model to be more careful do not provide actionable targets, leading to inconsistent fixes and unrelated code rewrites.
Question 4 of 360Scenario: Developer Productivity with Claude. 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 built-in tools (Read, Write, Bash, Grep, Glob) and integrates with MCP servers. Your internal agent is generating repository-specific data adapter classes from interface definitions. In pilots, the first drafts compile, but later reviews find unhandled null fields, incorrect retry behavior, and slow processing on large fixtures. Engineers can state expected outcomes and edge cases before implementation, but prose-only instructions have produced uneven results. Which workflow should you add?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Create tests for expected behavior, edge cases, and performance constraints first, then iterate by sending Claude failing results.
Defining tests for expected behavior and edge cases before implementation creates objective acceptance criteria that catch subtle bugs early. Feeding specific failing test outputs back to the model ensures precise, incremental corrections instead of the uneven results caused by long prose specifications.
Question 5 of 360Scenario: Developer Productivity with Claude. 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 built-in tools (Read, Write, Bash, Grep, Glob) and integrates with MCP servers. In a developer productivity workflow, Claude has generated a helper that scaffolds new internal SDK integrations. Review shows three failures: retry handling conflicts with your error-normalization helper, generated config duplicates an existing block, and the naming fix proposed for one path breaks another path using the same template. Each attempted single-issue fix has reintroduced one of the other failures. What is the best next refinement step?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. Send one detailed refinement request describing all observed failures, shared constraints, and expected behavior across the affected call paths.
When interacting failures share constraints across the same template, submitting one detailed refinement request gives the model the full context needed to avoid regressions. Fixing issues sequentially in separate sessions blinds the model to dependencies, often reintroducing previously resolved bugs.
Question 6 of 360Scenario: Developer Productivity with ClaudeYou 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 built-in tools (Read, Write, Bash, Grep, Glob) and integrates with MCP servers.During a legacy payment module analysis, the coordinator first assigns one subagent to map database tables and another to trace API callers. Both return useful findings. The coordinator then invokes a planning subagent to propose a migration strategy, but the plan ignores the database constraints and caller list already discovered, recommending changes that would break known integrations. What should you change to make this orchestration more reliable?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Have the coordinator maintain shared investigation state and include relevant prior findings in each subsequent subagent prompt.
The correct answer makes the coordinator responsible for passing shared context into each subagent prompt. For the exam, remember that subagents do not automatically inherit prior conversational state, so the orchestrator must explicitly provide it.
Question 7 of 360Scenario: Customer Support Resolution AgentYou 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 backend systems through 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 starts a chat with: "I don't want to go through a bot. Put me through to a person about order 8421." The message includes enough details that your normal automation would probably resolve the delayed-shipment issue in one or two tool calls.You are tuning the escalation policy and want to avoid both unnecessary deflection and unnecessary automation. What should the agent do next?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Call escalate_to_human with the order context and brief summary, without attempting autonomous lookup or replacement processing first.
The correct choice honors an explicit human request by transferring immediately with context. Avoid the tempting autonomous lookup option, because forcing automation when a user explicitly requests a person breaks trust and violates core escalation policy design principles.
Question 8 of 360Scenario: Structured Data ExtractionYou are building a structured data extraction system using Claude. The system extracts information from unstructured documents, validates output using JSON schemas, and maintains high accuracy. It must handle edge cases gracefully and integrate with downstream systems.Your extraction QA pass reviews Claude's JSON outputs before downstream ingestion. Reviewers dismiss many findings because the QA prompt flags harmless differences: inferred date formats, optional fields absent from the source, and wording variations that do not change extracted values. The current prompt says, "Check the extraction for accuracy and report any problems."What change would most effectively improve precision?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Rewrite the QA prompt to define reportable errors, acceptable variations, and skip conditions with concrete examples for each category.
Defining explicit reportable errors with concrete examples directly fixes high false positive rates. Vague instructions to be conservative fail because the model lacks objective boundaries for acceptable variations versus actual extraction mistakes.
Question 9 of 360Scenario: Multi-Agent Research SystemYou are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports.During production evaluation, reviewers find that first drafts are coherent and cited but often incomplete. For example, a report on AI regulation includes strong EU coverage, weak Asia-Pacific coverage, and unresolved contradictions between two market statistics. The current workflow sends the first synthesis directly to the report generator whenever all subagents return successfully.What change would most effectively improve report completeness without abandoning the coordinator-subagent architecture?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Add a coordinator review loop that checks synthesis coverage, redelegates targeted follow-ups, and reruns synthesis until quality criteria are met.
Adding a coordinator review loop actively identifies gaps and triggers targeted follow-ups before report generation. Fixed iteration caps fail because they stop blindly regardless of remaining coverage gaps, while hiding low-coverage sections obscures rather than resolves the issue.
Question 10 of 360Scenario: Multi-Agent Research System You are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports. Your coordinator's document-analysis subagent depends on an internal library-catalog MCP server. It works in your local Claude Code session, but two teammates who cloned the repository cannot access the catalog tools, so their runs fall back to weaker web searches. Separately, one researcher is testing an experimental notes server that should not affect the team. What should you change?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Move the required catalog server into project-scoped .mcp.json, and keep the experimental notes server in user-scoped ~/.claude.json.
Shared team servers belong in project-scoped configuration so they sync automatically via source control. User-scoped configuration isolates experimental tools, whereas manual setup commands or user-scoped files invite drift and configuration inconsistency across the team.
Question 11 of 360Scenario: Multi-Agent Research System You are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports. During a run, the document-analysis subagent asks a source retrieval MCP tool for the full text of a licensed market report. The backend rejects the request because the license permits summaries and short excerpts only. Today the tool returns "access denied," causing the coordinator to retry with paraphrased requests and then mark the source as unavailable. What change would best let the agents handle this case correctly?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Return isError true with errorCategory business, isRetryable false, and guidance to request summaries or short excerpts instead.
Returning a non-retryable business error with actionable guidance tells the coordinator to change its approach. Treating this as transient or a credential failure wastes tokens on retries since the license restriction is a permanent business rule, not a technical fault.
Question 12 of 360Scenario: Developer Productivity with Claude 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 built-in tools (Read, Write, Bash, Grep, Glob) and integrates with MCP servers. A senior engineer reports that Claude Code consistently follows your team's codebase exploration notes, legacy module warnings, and boilerplate conventions. New engineers who clone the repository see generic behavior instead, and no repository files changed when the senior engineer originally added those notes. What is the most effective way to make this guidance consistent for the team?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Move the shared conventions into a project-level CLAUDE.md file and commit it so every clone loads them.
Committing a project-level configuration file guarantees that all cloned repositories receive the shared conventions automatically. Relying on manual copying or user memory files breaks consistency, while slash commands require manual invocation that engineers might forget.
Question 13 of 360Scenario: Developer Productivity with ClaudeYou 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 built-in tools (Read, Write, Bash, Grep, Glob) and integrates with MCP servers.Engineers often ask the agent to generate new scheduled jobs with brief prompts like "add cleanup for expired sessions." The generated code compiles, but reviewers repeatedly find missing decisions around idempotency, tenant scoping, observability naming, data retention exceptions, and operational rollback. These requirements vary across teams and are not reliably documented in one place.What refinement approach should you apply before the agent begins implementation?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. Have Claude ask targeted clarification questions about operational constraints, ownership assumptions, and edge cases before proposing implementation changes.
Having the agent ask targeted clarification questions resolves hidden requirements before any code is written. Relying on code review to catch missing constraints is inefficient, and adding global instructions creates rigid rules that conflict with team-specific variations.
Question 14 of 360Scenario: Multi-Agent Research SystemYou are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports.After a pilot, the system assigns high confidence to most report claims and the team wants to auto-publish those claims. Later customer audits find citation mismatches concentrated in regulatory topics and newly added source types, even though overall quality dashboards remain strong.What review strategy should you implement before further reducing reviewer coverage?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. Randomly sample high-confidence claims across topic, source type, and report section, then track errors and new patterns by stratum.
Stratified random sampling exposes hidden error rates in specific topics or source types that aggregate metrics hide. Reviewing only low-confidence claims is risky because overconfidence in niche segments can let systematic defects reach production undetected by overall dashboards.
Question 15 of 360Scenario: Multi-Agent Research System You are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports. During testing, a report on remote work productivity cites two recent, credible studies with different productivity statistics. The synthesis agent currently chooses the higher number because it appears in a larger sample study, and the report presents it as the single definitive result. Reviewers note that both studies are methodologically credible but measure productivity differently. What change would most improve the reliability of the final report?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Preserve both statistics with source attribution, methodology notes, and a conflict annotation for the report generator to present transparently.
Preserving both statistics with methodology notes allows transparent reporting instead of forcing a false consensus. Averaging conflicting metrics is mathematically invalid when underlying definitions differ, and suppressing the smaller study hides critical context from readers.
Question 16 of 360Scenario: Multi-Agent Research SystemYou are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports.During testing, the document analysis subagent receives coordinator-selected PDFs and reports from an approved catalog, but it has a generic URL retrieval tool. It sometimes follows links inside documents to blogs, login pages, or duplicate HTML summaries, then cites those pages instead of the approved sources.You need to reduce these citation and scope errors while preserving access to approved source material. What change best addresses this?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. Replace fetch_url with a load_document tool that accepts catalog document IDs or approved URLs and validates before fetching.
Replacing the generic tool with a constrained one directly prevents the subagent from fetching arbitrary URLs. Relying on prompt instructions to avoid links is a weaker safeguard because the model may still attempt to retrieve unapproved resources.
Question 17 of 360Scenario: Developer Productivity with Claude 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 built-in tools (Read, Write, Bash, Grep, Glob) and integrates with MCP servers. During a legacy billing-module analysis, a coordinator launches separate subagents to trace API handlers, database writes, and scheduled jobs. Each subagent returns useful narrative findings, but the final architecture brief often attaches claims to the wrong file or omits the line ranges engineers need for verification. What change best improves handoff reliability between the subagents and the final synthesizer?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Require each subagent to return structured handoff records separating findings, file paths, symbols, line ranges, and evidence snippets.
Structured handoff records preserve attribution by separating findings from the metadata needed to verify them. Asking the synthesizer to reconstruct missing file paths from prose is unreliable because lost context cannot be recovered deterministically.
Question 18 of 360Scenario: Developer Productivity with Claude 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 built-in tools (Read, Write, Bash, Grep, Glob) and integrates with MCP servers. An engineer asks the agent to investigate a production stack trace from an unfamiliar legacy service. The trace contains the message "InvalidInventoryTransition" and references a helper named validateTransition, but the repository has hundreds of source files and inconsistent directory naming. What should the agent do first to find the relevant implementation and usage sites efficiently?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Use Grep to search file contents for the error string and function names, then Read the matching files.
Using Grep to search file contents is the correct first step because it efficiently targets the specific error string and function names. Reading files upfront or using Glob wastes context and ignores the actual file contents.
Question 19 of 360Scenario: Developer Productivity with Claude 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 built-in tools (Read, Write, Bash, Grep, Glob) and integrates with MCP servers. The same agent now handles two request types. Dependency license reviews follow a stable rubric with known checks, while production bug investigations in unfamiliar services vary based on discovered call paths, logs, and failing tests. The current single-pass prompt misses checklist items during reviews and wastes effort during investigations. Which decomposition strategy is most appropriate?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Use a fixed prompt chain for stable review rubrics, and let the agent adapt subtasks during open-ended investigations.
Stable workflows benefit from fixed prompt chains, while open-ended investigations require adaptive task planning. Using a single rigid checklist for both is an anti-pattern because bug discovery dictates subsequent steps.
Question 20 of 360Scenario: Developer Productivity with Claude 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 built-in tools (Read, Write, Bash, Grep, Glob) and integrates with MCP servers. An engineer asks the agent to add a caching layer around a legacy authorization module. The codebase has multiple tenants, audit logging, and inconsistent invalidation behavior, and the team has little domain knowledge. Past attempts produced working code that later failed on stale permissions and compliance edge cases. What should the engineer do before asking Claude to modify files?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Have Claude first ask targeted questions about invariants, invalidation triggers, audit requirements, and failure modes before proposing implementation.
Using the interview pattern surfaces hidden constraints and invalidation rules before implementation begins. Immediately writing code is a high-risk anti-pattern because Claude might fill compliance gaps with incorrect defaults.
Question 21 of 360Scenario: Structured Data ExtractionYou are building a structured data extraction system using Claude. The system extracts information from unstructured documents, validates output using JSON schemas, and maintains high accuracy. It must handle edge cases gracefully and integrate with downstream systems.Your extraction pipeline uses tool use with a strict schema, so outputs are syntactically valid. However, downstream semantic validators reject some invoices because the extracted line-item totals do not match the stated invoice total, and because a due date was placed in the invoice_date field.The current retry simply sends the document again with "fix the extraction," and the same fields often remain wrong. What change would most effectively improve recoverable correction quality?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. Send a follow-up request containing the document, failed extraction, and exact validation errors for targeted self-correction.
Providing the exact validation errors alongside the failed extraction gives Claude the context needed for targeted self-correction. Blindly retrying the original prompt or lowering temperature fails because the model lacks the specific feedback required to fix semantic mistakes.
Question 22 of 360Scenario: Developer Productivity with Claude 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 built-in tools (Read, Write, Bash, Grep, Glob) and integrates with MCP servers. Your CI job already invokes Claude Code successfully and posts a single pull request summary comment. The team now wants automated inline comments for each finding, but the integration frequently breaks because Claude sometimes adds prose, changes field names, or formats findings as markdown. What change best supports reliable automation?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Run Claude Code with –output-format json and –json-schema, then map validated findings to inline PR comments.
Using explicit JSON output formats with a schema forces Claude to produce reliable, machine-readable data. Relying on regex parsing over markdown is a brittle anti-pattern because natural language formatting varies unpredictably across runs.
Question 23 of 360Scenario: Structured Data Extraction You are building a structured data extraction system using Claude. The system extracts information from unstructured documents, validates output using JSON schemas, and maintains high accuracy. It must handle edge cases gracefully and integrate with downstream systems. Production review shows inconsistent routing: documents with unreadable required values and unfamiliar layouts sometimes flow into downstream systems, while routine invoices missing optional purchase-order numbers are sent for manual review. The extraction schema already permits nullable fields for data that is absent from the source. What change would most effectively improve routing decisions?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Add explicit human-review criteria with few-shot examples distinguishing absent optional fields, unreadable required fields, and unsupported document types.
Adding explicit human-review criteria with few-shot examples clarifies the decision boundaries between absent optional fields and unreadable required values. Global confidence thresholds fail because they cannot distinguish between structurally missing data and extraction errors.
Question 24 of 360Scenario: Multi-Agent Research System You are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports. Quality audits show that reports covering 25 or more source documents have uneven validation quality. Early sources receive detailed citation checks, later sources receive superficial checks, and the same evidence weakness is sometimes accepted in one source but rejected in another. What task decomposition change would most effectively improve review consistency?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Run focused document-level evidence checks first, then perform a separate cross-document consistency pass before synthesis and reporting.
Splitting the workflow into focused document-level checks followed by a cross-document consistency pass prevents attention dilution. Processing all sources in a single prompt causes lost-in-the-middle effects, leading to uneven validation quality.
Question 25 of 360Scenario: Structured Data Extraction You are building a structured data extraction system using Claude. The system extracts information from unstructured documents, validates output using JSON schemas, and maintains high accuracy. It must handle edge cases gracefully and integrate with downstream systems. Your product has two document queues: customer onboarding forms that must populate an eligibility screen while an operations specialist is waiting, and 40,000 archived contracts used for a dashboard due next week. Finance asks whether the lower-cost processing path should replace the current real-time calls for both queues. What should you recommend?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Keep synchronous calls for onboarding forms, and use the Message Batches API for historical contracts with latency-tolerant processing.
Matching the API to the latency requirement means keeping synchronous calls for real-time onboarding screens. The Message Batches API is perfect for historical contracts because it reduces costs for asynchronous, latency-tolerant workloads.
Question 26 of 360Scenario: Developer Productivity with ClaudeYou 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 built-in tools (Read, Write, Bash, Grep, Glob) and integrates with MCP servers.Your repository's root CLAUDE.md has grown to 1,200 lines covering testing, API conventions, migration rules, deployment checks, and review norms. Engineers complain that small standards changes cause frequent merge conflicts, and Claude sometimes appears distracted by unrelated guidance. The team wants shared, version-controlled instructions, but needs a more maintainable layout without relying on developers to remember extra steps.What should you do?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Split the guidance into focused topic files under .claude/rules/, such as testing.md, api-conventions.md, and deployment.md.
Organizing topic-specific guidance in .claude/rules/ preserves shared repository-level configuration while avoiding a single oversized file. This directly addresses maintainability and review concerns without requiring developers to manually invoke commands or copy personal settings.
Question 27 of 360Scenario: Developer Productivity with ClaudeYou 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 built-in tools (Read, Write, Bash, Grep, Glob) and integrates with MCP servers.An engineer asks the agent to explain how the "user export" capability works in a legacy repository. The final answer confidently covers REST controllers and serializers, but misses scheduled exports, admin-triggered jobs, and CLI invocations. Logs show every subagent completed successfully; their prompts were "inspect export controller," "trace export API request," and "summarize export endpoint tests."What should you change first to improve coverage on similar broad codebase questions?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Revise coordinator planning to identify plausible entry points, then delegate distinct code areas to subagents before synthesis.
The symptoms show that subagents completed their assigned work, but the assignments covered only the HTTP path. Improving the coordinator's initial planning helps ensure broad codebase questions are decomposed across relevant entry points before synthesis begins.
Question 28 of 360Scenario: Structured Data ExtractionYou are building a structured data extraction system using Claude. The system extracts information from unstructured documents, validates output using JSON schemas, and maintains high accuracy. It must handle edge cases gracefully and integrate with downstream systems.Your invoice extractor currently asks Claude to "return valid JSON" with fields for vendor, invoice_date, line_items, and total_amount. In production, a small but persistent share of responses include markdown fences, explanatory text, or malformed commas, causing downstream parsers to reject otherwise correct extractions.What change would most effectively improve structured output reliability?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Define an extraction tool with a JSON schema for target fields, then consume the structured tool_use input directly.
Tool use with a JSON schema is the most reliable way to obtain schema-compliant structured output from Claude. Instead of parsing generated text, the application reads the structured input from the tool_use block, eliminating common JSON syntax failures like markdown fences or trailing commentary.
Question 29 of 360Scenario: Multi-Agent Research SystemYou are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports.Your web search MCP tool occasionally times out. Today it returns a content block reading "Search provider timeout, try again later" as if the call succeeded. The synthesis subagent sometimes treats that text as a source note, and the report generator includes unsupported citations.What tool response change best prevents the model from confusing failures with valid research content?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Return failed tool calls with isError set true, plus concise diagnostic content the subagent can use for recovery.
MCP tools should distinguish failed executions from successful content using the isError pattern. This lets the agent treat the response as a tool failure rather than as research material, enabling retries, alternative searches, or coverage-gap annotations.
Question 30 of 360Scenario: Developer Productivity with ClaudeYou 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 built-in tools (Read, Write, Bash, Grep, Glob) and integrates with MCP servers.A team asks the agent to update every test fixture file ending in `.fixture.json` across a monorepo before reading only those files. In trials, the agent searches for the word "fixture" in file contents, producing noisy matches from comments and missing fixture files with sparse content.Which tool-use strategy should you adopt?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Use Glob with patterns like <code>**/*.fixture.json</code> to enumerate matching paths, then Read only the files that require inspection.
Glob is the appropriate built-in tool when the selection criterion is based on file names, extensions, or path patterns. It returns matching paths directly, reducing noise and allowing the agent to read only the relevant files.
Question 31 of 360Scenario: Structured Data ExtractionYou are building a structured data extraction system using Claude. The system extracts information from unstructured documents, validates output using JSON schemas, and maintains high accuracy. It must handle edge cases gracefully and integrate with downstream systems.In validation runs, 18% of supplier contracts return null for effective_date and renewal_terms even though human reviewers find the information present. The misses cluster in documents where dates and renewal language appear in cover letters, footnotes, or table captions rather than standard contract header sections. Outputs are otherwise schema-valid, and downstream systems can accept null only when the source truly omits the field.What change would most improve extraction accuracy?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Add targeted few-shot examples showing the fields extracted from cover-letter text, footnotes, and table captions with brief rationale.
Targeted few-shot examples are the best fit when extraction failures cluster around varied document structures. Showing examples where fields appear in cover letters or footnotes teaches Claude the intended judgment pattern, whereas forcing non-null values would encourage hallucinated data.
Question 32 of 360Scenario: Structured Data ExtractionYou are building a structured data extraction system using Claude. The system extracts information from unstructured documents, validates output using JSON schemas, and maintains high accuracy. It must handle edge cases gracefully and integrate with downstream systems.Your QA prompt reviews a 90-page vendor onboarding packet and its extracted records in one call. It catches detailed field errors in the first few forms, but misses mismatched tax IDs in middle attachments and contradicts itself about required signatures.Which review architecture would best improve reliability?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Run focused review passes on each packet section, then run a separate consistency pass across cross-section fields.
Running focused review passes on each packet section reduces attention dilution and improves coverage of local field errors. A separate consistency pass then focuses on relationships across sections, such as matching tax IDs and signatures, without competing with local checks.
Question 33 of 360Scenario: Multi-Agent Research SystemYou are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports.Over the weekend, several source documents were revised, a search index was refreshed, and two previously collected subagent outputs now cite superseded versions. The coordinator still has a saved investigation session containing the earlier web results, document analyses, and synthesis notes.What is the most reliable way to continue the research without contaminating the final report with outdated evidence?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Start a fresh session with a structured summary of still-valid findings, then re-run targeted searches and analyses for changed sources.
Starting fresh avoids carrying stale tool outputs and outdated subagent observations forward as if they were still authoritative. Injecting a structured summary preserves useful context while forcing updated evidence to be gathered where source validity has changed.
Question 34 of 360Scenario: Customer Support Resolution Agent. 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 backend systems through MCP tools (get_customer, lookup_order, process_refund, escalate_to_human). Your target is 80%+ first-contact resolution while knowing when to escalate. During rollout, the agent frequently spends its first several turns probing the support knowledge server with broad queries such as "what policies exist for billing disputes?" and "which return exceptions are available?". These exploratory calls consume context, sometimes miss relevant policy documents, and delay straightforward resolutions before any customer-specific action occurs. What design change would best improve the agent's visibility into available support information while preserving tools for customer-specific actions?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Expose the support policy index and knowledge-base catalog as MCP resources, while keeping tools for selected record actions.
MCP resources are the correct tool for exposing read-only reference catalogs, giving the agent immediate context without wasting turns on exploratory tool calls. A practical exam cue is to match static data to resources and dynamic state changes to tools, avoiding bloated system prompts or mandatory startup calls.
Question 35 of 360Scenario: Developer Productivity with Claude. 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 built-in tools (Read, Write, Bash, Grep, Glob) and integrates with MCP servers. A senior engineer asks Claude to replace a legacy permissions layer across API handlers, CLI tools, shared middleware, tests, and documentation. The team has not chosen between adapting existing interfaces or introducing a new authorization boundary, and incorrect sequencing could break unrelated workflows. What should you have Claude do first?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Use plan mode to explore dependencies, compare viable migration strategies, and produce an implementation plan before modifying files.
Using plan mode allows Claude to explore dependencies and design an implementation strategy before modifying files, which is critical for broad architectural changes. Jumping straight to execution risks breaking unrelated workflows because the model lacks a structured blueprint for complex multi-file migrations.
Question 36 of 360Scenario: Customer Support Resolution Agent. 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 backend systems through MCP tools (get_customer, lookup_order, process_refund, escalate_to_human). Your target is 80%+ first-contact resolution while knowing when to escalate. Production traces show that mixed requests such as "I moved and need to return the charger from order 8831" alternate unpredictably between get_customer and lookup_order as the first call. In some sessions Claude passes an order number to get_customer; in others it passes a customer name to lookup_order. The current tool catalog exposes only terse autogenerated summaries, and no backend errors are occurring. What change should you make first to improve tool selection reliability?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. Rewrite each MCP tool description to specify purpose, accepted identifiers, returned fields, edge cases, and boundaries versus related tools.
Rewriting MCP tool descriptions to clarify their purpose, accepted inputs, and boundaries is the most direct fix for unreliable model-driven tool selection. Relying on hardcoded keyword routers or merging tools obscures functionality and defeats the purpose of granular, descriptive tool architecture.
Question 37 of 360Scenario: Developer Productivity with Claude. 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 built-in tools (Read, Write, Bash, Grep, Glob) and integrates with MCP servers. Your codebase migration assistant has access to tools for repository metadata extraction, dependency graph analysis, and migration plan generation. Evaluation runs show it sometimes begins dependency analysis or plan generation before collecting canonical package manager and framework versions, producing plans with incorrect assumptions. What change would most reliably enforce the intended first step while preserving model-driven follow-up behavior?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Force the metadata extraction tool with tool_choice for the first request, then continue subsequent analysis in follow-up turns.
Forcing a specific tool call using tool choice is the most reliable way to guarantee a required initial step executes before subsequent model-driven analysis. Prompting alone is probabilistic, and setting tool choice to any does not ensure the correct prerequisite tool is selected.
Question 38 of 360Scenario: Customer Support Resolution Agent. 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 backend systems through MCP tools (get_customer, lookup_order, process_refund, escalate_to_human). Your target is 80%+ first-contact resolution while knowing when to escalate. Production logs show misdirected refunds and privacy disclosures when users provide common names and partial addresses. In these cases, get_customer returns several plausible profiles, and the agent chooses one using recent order activity or name similarity. What change best improves reliability without unnecessarily routing routine cases to humans?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. Treat multiple customer matches as unresolved identity and request a disambiguating identifier before any order or refund operations.
Treating multiple customer matches as an unresolved identity forces the agent to request a disambiguating identifier before taking sensitive actions, safely preventing account mixups. Routing all duplicate records to humans breaks automation goals, while probabilistic heuristics remain too risky for refunds.
Question 39 of 360Scenario: Structured Data Extraction. You are building a structured data extraction system using Claude. The system extracts information from unstructured documents, validates output using JSON schemas, and maintains high accuracy. It must handle edge cases gracefully and integrate with downstream systems. Your extraction pipeline includes a QA pass that flags possible mistakes in supplier contract records before they enter the downstream procurement system. Over the last month, procurement analysts accepted many findings about missing renewal clauses but overturned most findings involving informal pricing language. Current logs store only document ID, field name, confidence, and finding text, making it difficult to prioritize prompt and validator improvements. What change should you make first?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Add a structured detected_pattern field to each QA finding, then analyze acceptance rates by pattern and document type.
Adding a structured detected pattern field captures the specific trigger for each finding, making the feedback loop analyzable. Segmenting outcomes by pattern and document type reveals exactly which prompts or validators need refinement, whereas globally raising confidence thresholds suppresses useful categories indiscriminately.
Question 40 of 360Scenario: Customer Support Resolution Agent 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 backend systems through MCP tools (get_customer, lookup_order, process_refund, escalate_to_human). Your target is 80%+ first-contact resolution while knowing when to escalate. During billing disputes, the agent creates condensed case notes before responding or escalating. Human reviewers report that notes sometimes say things like "refund approved" or "customer was promised free return shipping," but they cannot tell whether each claim came from the customer, an order record, a policy document, or the agent's inference. In several escalations, customer allegations were treated as verified backend facts. What change would most effectively reduce this reliability risk?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Require summaries and handoffs to carry structured claim-source mappings with source type, excerpt or tool field, timestamp, and verification status.
Structured claim-source mappings preserve provenance as information moves through summarization and escalation, ensuring facts are distinguished from inferences. Relying on shorter narratives or confidence filtering increases provenance loss and hides uncertainty, making it an anti-pattern for multi-source workflows.
Question 41 of 360Scenario: Developer Productivity with Claude 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 built-in tools (Read, Write, Bash, Grep, Glob) and integrates with MCP servers. A coordinator agent delegates codebase exploration to subagents before asking an implementation subagent to generate migration scaffolding. In reviews, engineers find the final proposal often mixes findings from different packages, cites helper functions without file locations, and cannot explain which search result or source file supports a recommended change. The individual subagents found useful facts, but their handoffs were free-form summaries. What change would best improve downstream reliability while preserving attribution?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Require subagents to return structured handoff records with findings separated from file paths, symbols, line ranges, commands, and source excerpts.
Structured handoff records preserve both discovered content and the metadata needed to verify it later. Separating facts from attribution metadata helps subagents use findings accurately without losing file locations, whereas stripping source details or relying on narrative summaries degrades downstream reliability.
Question 42 of 360Scenario: Multi-Agent Research System. You are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports. A user requests a report comparing how proposed AI copyright rules affect music licensing, model training data, and independent film production across the same jurisdictions and dates. Logs show the coordinator routes the entire request to one document analysis pass, then asks the report agent to write separate sections. The final report deeply covers licensing, barely addresses training data, and gives recommendations that conflict across sectors. What workflow change would most effectively improve the result?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. Split the request into distinct concern threads, investigate them in parallel with shared constraints, then synthesize one unified cross-sector report.
Splitting the request into distinct concern threads ensures balanced coverage while keeping shared constraints consistent across the investigation. A final unified synthesis step resolves contradictions before report generation, avoiding the attention dilution and conflicting recommendations caused by single-pass sequential processing.
Question 43 of 360Scenario: Multi-Agent Research System You are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports. In pilot runs on fast-changing market topics, reviewers find final reports often make accurate individual claims but misstate whether evidence is current, peer-reviewed, or based on a small regional sample. When they ask the report generator to add citations, it sometimes cites the correct document but cannot identify the page, publication date, or study basis from earlier handoffs. What change would most effectively improve downstream synthesis reliability?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Update each subagent's output contract to attach dates, source locations, and methodological notes to every extracted finding.
Updating output contracts to attach dates, source locations, and methodological notes preserves critical context at the finding level. This prevents important qualifiers from being lost during handoffs, whereas passing full transcripts risks attention problems and cleanup passes might hallucinate missing provenance.
Question 44 of 360Scenario: Customer Support Resolution Agent. 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 backend systems through MCP tools (get_customer, lookup_order, process_refund, escalate_to_human). Your target is 80%+ first-contact resolution while knowing when to escalate. In a compliance review, you find several transcripts where the agent called process_refund immediately after a customer claimed an order was damaged. In those cases, lookup_order later showed the order was past the return window or the refund amount differed from the customer's estimate. The current system prompt says to verify customers and check order eligibility before refunds. What change best reduces this risk?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Add a prerequisite gate that rejects process_refund until verified customer, eligible order, and computed refund amount are present in state.
Adding a prerequisite gate creates a deterministic control point for workflow ordering, preventing financially risky actions until state requirements are met. Relying on system prompts or few-shot examples remains probabilistic, whereas a hardcoded gate guarantees compliance regardless of model reasoning.
Question 45 of 360Scenario: Structured Data Extraction You are building a structured data extraction system using Claude. The system extracts information from unstructured documents, validates output using JSON schemas, and maintains high accuracy. It must handle edge cases gracefully and integrate with downstream systems. A labeled validation run reports 97.2% aggregate extraction accuracy across NDAs, invoices, insurance forms, and purchase orders. Leadership wants to bypass human review for any record where Claude returns high confidence, but pilot complaints suggest errors cluster in specific document families and fields. What should you do before reducing reviewer coverage?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Analyze accuracy by document type and extracted field, then automate only segments meeting validated thresholds while routing others to review.
Analyzing accuracy by document type and field exposes weak performance clusters that strong aggregate scores hide. Segment-level validation lets you safely automate reliable areas while preserving human review for underperforming slices, avoiding the false confidence of relying strictly on global metrics.
Question 46 of 360Scenario: Customer Support Resolution Agent 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 backend systems through MCP tools (get_customer, lookup_order, process_refund, escalate_to_human). Your target is 80%+ first-contact resolution while knowing when to escalate. Production logs show several distinct backend problems all being returned to the agent as the same text: "Operation failed." Examples include an invalid order ID, a temporary billing service timeout, an expired permission token, and a refund blocked by policy. The agent wastes turns retrying non-retryable failures, asks customers to re-enter valid information after timeouts, and escalates cases it could have resolved. What change would most directly improve recovery behavior?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Return structured MCP errors with categories, retryability, and user-safe details so the agent can choose recovery, clarification, or escalation.
Returning structured MCP errors with categories and retryability gives the agent the exact context needed to choose appropriate local recovery steps. Uniform failure text forces the model to guess, causing unnecessary escalations and frustrating retries on non-retryable failures.
Question 47 of 360Scenario: Developer Productivity with Claude 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 built-in tools (Read, Write, Bash, Grep, Glob) and integrates with MCP servers. A team asks the productivity agent to add a "cancel renewal" workflow to a legacy subscription service. The initial implementation point is unclear because cancellation behavior appears split across command-line scripts, web handlers, and scheduled jobs. In earlier similar tasks, immediate edits repeatedly targeted the wrong abstraction and had to be rolled back after tests exposed broken shared behavior. Which workflow should the tool recommend first?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Use plan mode to map relevant flows and compare implementation points before allowing file modifications.
Using plan mode lets the agent map complex flows and identify the correct abstraction layer before modifying files. Proceeding with direct execution relies on trial and error, which risks breaking shared dependencies and causes avoidable rollback work on legacy systems.
Question 48 of 360Scenario: Structured Data Extraction You are building a structured data extraction system using Claude. The system extracts information from unstructured documents, validates output using JSON schemas, and maintains high accuracy. It must handle edge cases gracefully and integrate with downstream systems. You are about to process 80,000 archived vendor contracts overnight. A new extraction prompt and schema passed a few hand-picked examples, but historical documents vary by template, scanned OCR quality, and contract addenda. Reprocessing failures delays a downstream migration. What should you do next?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Run a representative pilot batch, analyze validation failures and null patterns, refine the prompt, then submit the full workload.
Running a representative pilot batch exposes real formatting variations and failure modes before they impact the full workload. Refining the prompt based on pilot validation results maximizes first-pass success, whereas bulk submission or increasing max_tokens ignores underlying template issues.
Question 49 of 360Scenario: Structured Data Extraction You are building a structured data extraction system using Claude. The system extracts information from unstructured documents, validates output using JSON schemas, and maintains high accuracy. It must handle edge cases gracefully and integrate with downstream systems. Your invoice extraction pipeline already returns syntactically valid structured objects, but semantic validators reject about 7% of documents because line-item totals do not sum to the stated total or normalized dates fail business rules. Most rejected documents contain the needed values, but the model placed or formatted them incorrectly. What should you change to recover these cases while preserving validation rigor?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Send a follow-up request containing the source document, failed extraction, and precise validator messages for targeted correction.
Targeted correction feeds specific validator feedback back to the model, directly addressing the defect. Loosening the schema weakens validation, while blind retries lack the context needed to fix semantic errors.
Question 50 of 360Scenario: Customer Support Resolution Agent 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 backend systems through MCP tools (get_customer, lookup_order, process_refund, escalate_to_human). Your target is 80%+ first-contact resolution while knowing when to escalate. Production logs show get_customer returns ISO 8601 timestamps and numeric loyalty tiers, while lookup_order returns Unix timestamps and numeric status codes. The agent sometimes miscomputes return windows or mislabels order status after otherwise successful tool calls. You cannot change upstream MCP servers this quarter, but you need consistent reasoning across cases. What change best addresses the reliability issue?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Add a PostToolUse hook that converts each tool result into canonical dates, status labels, and tier fields before Claude sees it.
A PostToolUse hook deterministically normalizes tool outputs before the model reasons over them. Relying on prompt instructions to translate formats is fragile and risks hallucinations during complex support cases.
Question 51 of 360Scenario: Multi-Agent Research System You are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports. Your document-analysis subagent receives 45 reports and policy papers in a single pass before synthesis. The final outputs cite many sources but miss source-specific caveats, merge incompatible methodologies, and sometimes contradict earlier extracted facts. What workflow change would most effectively improve reliability?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Analyze each source in a focused pass with structured findings, then run a separate cross-source integration pass before reporting.
Separating local analysis from cross-source synthesis uses prompt chaining to reduce attention dilution. A dedicated integration pass resolves contradictions and preserves caveats before report generation begins.
Question 52 of 360Scenario: Structured Data Extraction You are building a structured data extraction system using Claude. The system extracts information from unstructured documents, validates output using JSON schemas, and maintains high accuracy. It must handle edge cases gracefully and integrate with downstream systems. During evaluation, the extraction pipeline handles supplier contracts by first asking Claude to infer document-specific extraction rules, then asking the same conversation to review the resulting field values. Human auditors find that the review step often misses subtle errors introduced by the inferred rules, such as treating renewal notice dates as contract end dates. You need to improve review effectiveness without changing the extraction schema. What architecture should you use?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. Run a separate Claude review instance with the source document, extracted fields, and rubric, excluding the original extraction reasoning.
A separate review instance prevents the model from inheriting assumptions from the original extraction rationale. Self-critique in the same conversation often reinforces prior reasoning instead of objectively catching subtle placement errors.
Question 53 of 360Scenario: Structured Data Extraction You are building a structured data extraction system using Claude. The system extracts information from unstructured documents, validates output using JSON schemas, and maintains high accuracy. It must handle edge cases gracefully and integrate with downstream systems. Your extraction QA pass produces JSON records that validate successfully, but reviewers report the findings are hard to act on. Some records describe vague problems like "date issue," others omit where the problem appears, and suggested fixes vary between full sentences, fragments, and empty strings. The downstream ticketing system accepts the records, but reviewers spend significant time interpreting them. What change would most effectively improve consistency?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Add targeted examples showing complete actionable findings with document location, affected field, issue description, severity, and suggested correction.
Targeted few-shot examples teach the exact structure and specificity required for actionable reviewer notes. General instructions alone fail because they lack the concrete formatting needed to ensure consistent downstream ticketing.
Question 54 of 360Scenario: Structured Data Extraction You are building a structured data extraction system using Claude. The system extracts information from unstructured documents, validates output using JSON schemas, and maintains high accuracy. It must handle edge cases gracefully and integrate with downstream systems. A coordinator splits each document into sections and sends them to extraction subagents for fields such as parties, dates, totals, and obligations. During testing, one subagent sometimes loses access to a section-level source system for a few minutes. The current implementation either returns an empty section extraction marked as successful or aborts the entire document extraction, causing downstream systems to misinterpret the document state. What should you change?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Have subagents report unresolved failures with attempted section, failure type, partial fields, and recovery suggestions for coordinator handling.
Reporting failures with recovery suggestions lets the coordinator handle errors without discarding successful partial work. Returning empty objects is an anti-pattern because it falsely masks unresolved failures as successful extractions.
Question 55 of 360Scenario: Structured Data ExtractionYou are building a structured data extraction system using Claude. The system extracts information from unstructured documents, validates output using JSON schemas, and maintains high accuracy. It must handle edge cases gracefully and integrate with downstream systems.Reviewers are dismissing many extraction warnings after checking the source documents. Your logs capture the final JSON output, confidence score, document type, and reviewer disposition, but your team cannot tell whether false positives cluster around handwritten totals, scanned tables, ambiguous dates, or other recurring source patterns.What change would best support systematic improvement of the extraction workflow?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Add a detected_pattern field to each structured finding, then analyze dismissal rates by pattern during feedback review.
A structured pattern field preserves the specific source construct or extraction trigger behind each finding. When reviewers dismiss findings, the team can aggregate by pattern and identify which prompts, schemas, or validations need improvement.
Question 56 of 360Scenario: Customer Support Resolution AgentYou 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 backend systems through MCP tools (get_customer, lookup_order, process_refund, escalate_to_human). Your target is 80%+ first-contact resolution while knowing when to escalate.During development, you resume yesterday's named investigation session about refund errors. In that session, Claude had read `refund_policy.md`, the `process_refund` tool schema, and `escalation_rules.md`, and most of its analysis is still relevant. Since then, a teammate changed the refund threshold rules and updated `process_refund` parameter names. You need Claude to continue designing the fix without repeating the whole investigation or relying on stale assumptions.What is the best next step?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Resume the session, identify the changed policy and tool files, and request targeted re-analysis before continuing implementation decisions.
Resuming the session preserves useful investigation context while explicitly invalidating parts likely to be stale. Targeted re-analysis lets Claude refresh its understanding of the changed policy and tool schema before continuing implementation decisions.
Question 57 of 360Scenario: Customer Support Resolution Agent 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 backend systems through 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 writes: "I was charged twice, my return label never arrived, and I cannot sign in to check the order." The coordinator currently launches billing, returns, and account subagents with the same prompt: "Investigate this customer issue and recommend a resolution." Logs show each subagent calls overlapping tools for the same order, repeats the same facts, and sometimes recommends conflicting next steps. What orchestration change would most effectively improve reliability and efficiency?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Assign each subagent a distinct issue boundary and shared case facts, then synthesize their non-overlapping findings centrally.
Assigning distinct boundaries and shared facts leverages parallel specialization without redundancy. On the exam, remember that uncontrolled subagent messaging or broad prompts cause overlapping loops and conflicting recommendations.
Question 58 of 360Scenario: Customer Support Resolution Agent 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 backend systems through MCP tools (get_customer, lookup_order, process_refund, escalate_to_human). Your target is 80%+ first-contact resolution while knowing when to escalate. Production logs show that lookup_order and process_refund both return the same failure text, "Operation failed." The agent retries declined refunds, tells customers to try again later when they provided invalid order IDs, and escalates temporary timeout cases that would likely succeed on retry. What change would best improve the agent's recovery decisions?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. Return MCP tool errors with isError plus category, retryability, and safe messages distinguishing transient, validation, business, and permission failures.
Categorized tool errors give the agent signals to choose appropriate recovery paths like retrying timeouts or clarifying invalid inputs. Generic error messages fail because they force the model to guess recovery steps blindly.
Question 59 of 360Scenario: Customer Support Resolution Agent 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 backend systems through MCP tools (get_customer, lookup_order, process_refund, escalate_to_human). Your target is 80%+ first-contact resolution while knowing when to escalate. During evaluation, the coordinator first verifies the customer and retrieves two recent orders, then delegates a billing-dispute investigation. The delegated investigator often asks for the order status again or analyzes the wrong order when the customer mentioned several purchases. You want the coordinator to preserve accuracy without giving the investigator all support tools. What should you change?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. Include verified customer identity, relevant order records, prior findings, and exact investigation goal in each subagent prompt.
Passing verified identity, relevant data, and the exact goal directly in the prompt gives subagents the context they need to act accurately. Subagents do not automatically inherit the parent conversation history or prior tool results.
Question 60 of 360Scenario: Multi-Agent Research System You are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports. In staging, final reports occasionally include polished sections with missing or unverifiable citations. Traces show the coordinator sometimes invokes the report-generation subagent after receiving web-search and document-analysis outputs, while the synthesis subagent is still pending or has returned an error. What change would most effectively prevent these invalid reports?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. Add a coordinator-side prerequisite that blocks report-generation Task calls until synthesis returns a structured citation manifest and success status.
Enforcing a deterministic prerequisite ensures the report agent cannot start until synthesis provides a structured manifest. Relying on the report agent to guess if synthesis completed creates fragile workflows and risks generating incomplete reports.
Question 61 of 360Scenario: Customer Support Resolution AgentYou 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 backend systems through MCP tools (get_customer, lookup_order, process_refund, escalate_to_human). Your target is 80%+ first-contact resolution while knowing when to escalate.During integration testing, a billing-dispute case starts well: Claude requests get_customer, your service executes it successfully, and the tool returns a verified customer record. The next user-facing message, however, is generated by your application from that raw tool payload, so no order lookup, refund decision, or escalation decision occurs.What change best fixes the control-flow design?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Run an agentic loop that inspects stop_reason, executes requested tools, appends tool results, and repeats until end_turn.
Implementing the core agentic loop lets Claude inspect the stop reason, execute requested tools, and append results until the turn naturally ends. Templatized responses fail because they bypass the model's reasoning capabilities over newly acquired tool context.
Question 62 of 360Scenario: Structured Data ExtractionYou are building a structured data extraction system using Claude. The system extracts information from unstructured documents, validates output using JSON schemas, and maintains high accuracy. It must handle edge cases gracefully and integrate with downstream systems.A nightly extraction job processes supplier contracts into a structured record for downstream procurement systems. Validation now rejects many records because renewal dates are earlier than start dates, currency codes are copied into amount fields, and a required payment_terms field is filled with plausible but unsupported values. The current retry prompt says only, "Fix the invalid fields and return the corrected record."Which change would most effectively improve recoverable retry quality?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. Retry with the source document, rejected extraction, and exact validator messages, instructing Claude to produce a corrected record only.
Providing the source document, the rejected extraction, and exact validator messages supports targeted self-correction. Asking the model to fix errors without the original text forces it to guess the correct values, leading to plausible but unsupported hallucinations.
Question 63 of 360Scenario: Code Generation with Claude Code You are using Claude Code to accelerate software development. Your team uses it for code generation, refactoring, debugging, and documentation. You need to integrate it into your development workflow with custom slash commands, CLAUDE.md configurations, and understand when to use plan mode vs direct execution. Your /migrate-to-new-logger command uses a coordinator that launches subagents to scan packages and propose edits. In a dry run, the final plan says the legacy logger appears only in billing and notifications. Later, reviewers discover the auth package was never scanned because a subagent hit a path permission error, while the search subagent for reporting scanned successfully and found no matches. The coordinator received both results as "no findings." What change would most improve reliability of future migration plans?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Have subagents report successful empty searches separately from access failures, including attempted paths, queries, partial results, and suggested next steps.
The correct answer ensures subagents explicitly differentiate between a successful search with no matches and a failed search due to access errors. A practical exam cue is to select the option that maximizes error visibility and context recovery, avoiding silent failures where missing data mimics clean results.
Question 64 of 360Scenario: Claude Code for Continuous Integration You are integrating Claude Code into your 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. A CI job generates test recommendations on every pull request. Developers report that many comments propose tests already present, such as empty-cart checkout and expired-token login cases. The job currently sends Claude only the PR diff and modified source files, then posts every suggested test as a comment. What change would best reduce these duplicate recommendations while preserving useful gap detection?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Pass the relevant current test files into the review context and ask Claude to target only uncovered behaviors.
Providing existing test files gives Claude the necessary context to identify actual coverage gaps instead of suggesting redundant tests. Adding a prompt rule without context fails because Claude cannot know existing coverage without seeing the tests.
Question 65 of 360Scenario: Customer Support Resolution Agent 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 backend systems through MCP tools (get_customer, lookup_order, process_refund, escalate_to_human). Your target is 80%+ first-contact resolution while knowing when to escalate. You added an order-investigation subagent that checks identity and order state before the coordinator decides whether to refund or escalate. Production traces show many escalations where the only subagent output is <code>{"status":"failed","message":"backend unavailable"}</code>. Manual review finds some cases had a verified customer record, a timeout on only one order lookup, and cached order summaries that could have supported a safe response. What change would best enable the coordinator to recover more intelligently?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Return error details that include failure type, attempted order lookup, partial customer data, cached summaries, and suggested fallback actions.
Returning detailed error context enables the coordinator to distinguish isolated failures from total outages, allowing safe usage of cached data. Converting timeouts to empty results is a strong distractor because it masks actual errors and risks processing incomplete backend states.
Question 66 of 360Scenario: Code Generation with Claude Code You are using Claude Code to accelerate software development. Your team uses it for code generation, refactoring, debugging, and documentation. You need to integrate it into your development workflow with custom slash commands, CLAUDE.md configurations, and understand when to use plan mode vs direct execution. Your nightly CI job asks Claude Code to propose tests for changed modules. Suggestions are consistently low value: duplicating brittle snapshots, mocking helpers your repository already provides, and ignoring team rules that prioritize behavior tests over implementation details. Developers run the job from ephemeral runners, so ad hoc local preferences are not present. What change would most effectively improve the quality and consistency of generated test suggestions?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Commit project-level CLAUDE.md guidance describing valuable test criteria, fixture conventions, and reusable helpers for CI-invoked Claude Code.
Committing project-level guidance ensures Claude Code consistently loads team preferences from ephemeral CI runners. Local configurations are a strong distractor because ephemeral environments lack access to maintainer laptops, making prompt-only adjustments ineffective for persistent context.
Question 67 of 360Scenario: Customer Support Resolution Agent 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 backend systems through MCP tools (get_customer, lookup_order, process_refund, escalate_to_human). Your target is 80%+ first-contact resolution while knowing when to escalate. You add an MCP server with policy_search and case_history_search tools that use backend ranking, policy metadata, and customer-safe summaries. In evaluation runs, Claude frequently searches raw policy markdown files instead and sometimes returns outdated refund rules. The MCP tools are connected and return better results when explicitly called, but they are rarely chosen spontaneously. What is the most effective first change?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Rewrite the MCP tool descriptions to detail support-specific capabilities, accepted identifiers, returned fields, and when to use them instead of generic search.
Rewriting MCP tool descriptions gives Claude the precise context needed to prefer specialized tools over generic file searches. Disabling generic file search is a strong distractor because it removes useful agent flexibility instead of addressing the underlying tool selection signal.
Question 68 of 360Scenario: Code Generation with Claude Code You are using Claude Code to accelerate software development. Your team uses it for code generation, refactoring, debugging, and documentation. You need to integrate it into your development workflow with custom slash commands, CLAUDE.md configurations, and understand when to use plan mode vs direct execution. A developer asks Claude Code to replace a legacy logging library across 18 packages. There are two viable migration paths, several unknown wrapper modules, and likely mechanical edits after the team chooses one approach. What workflow best balances careful discovery with efficient implementation?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Use plan mode to investigate dependencies and choose the migration path, then switch to direct execution for the agreed edits.
The correct answer uses plan mode to map dependencies safely before switching to direct execution for mechanical edits. When tackling workflow questions, remember that staying in plan mode for mechanical execution wastes time, while direct execution risks costly rework during discovery.
Question 69 of 360Scenario: Customer Support Resolution Agent 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 backend systems through MCP tools (get_customer, lookup_order, process_refund, escalate_to_human). Your target is 80%+ first-contact resolution while knowing when to escalate. A prototype uses specialized subagents for identity verification, billing investigation, return eligibility, and account-risk review. Engineers want billing and returns subagents to pass partial findings directly to each other to resolve linked refund disputes faster. In tests, directly exchanged findings sometimes bypass escalation notes and leave the final customer response missing why one subagent retried a failed lookup. What architecture change best improves reliability without eliminating specialization?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Route all subagent requests and results through the coordinator, which records context, errors, and final resolution inputs.
Routing communication through the coordinator preserves specialization while giving one component responsibility for observability, error handling, and final aggregation. This directly addresses the missing retry rationale and bypassed escalation notes because all handoffs become visible to the coordinator.
Question 70 of 360Scenario: Customer Support Resolution Agent 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 backend systems through MCP tools (get_customer, lookup_order, process_refund, escalate_to_human). Your target is 80%+ first-contact resolution while knowing when to escalate. In testing, complex customer messages with several concerns take too long. For example, "refund the damaged item, explain a duplicate charge, and update my locked account email" causes the returns, billing, and account subagents to each retrieve the customer profile and inspect the same order history before producing overlapping summaries. Some issues are still missed because each subagent spends context on the entire case rather than its specialty. What orchestration change best addresses this?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Have the coordinator assign each subagent a distinct concern and shared verified facts, then combine findings into one customer response.
Having the coordinator assign distinct concerns and shared facts keeps subagents focused on their specialization without redundant tool calls. Allowing direct messaging bypasses centralized observability, which often leads to missed issues and overlapping summaries during complex investigations.
Question 71 of 360Scenario: Structured Data Extraction You are building a structured data extraction system using Claude. The system extracts information from unstructured documents, validates output using JSON schemas, and maintains high accuracy. It must handle edge cases gracefully and integrate with downstream systems. Your nightly run submits 30,000 document extraction requests. The result processing job must update the correct downstream record for each successful extraction and resubmit only the documents that failed validation or exceeded context limits. During testing, engineers notice that relying on the result file's line order creates occasional mismatches after retries and partial failure handling. What design should you use?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Assign a stable custom_id derived from each document record, persist it with request metadata, and reconcile results using that identifier.
Message Batches support request and response correlation through custom_id values. Persisting a stable identifier with the submitted request lets the ingestion job map results correctly, whereas relying on output ordering fails when responses are processed after retries or partial failures.
Question 72 of 360Scenario: Customer Support Resolution Agent 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 backend systems through MCP tools (get_customer, lookup_order, process_refund, escalate_to_human). Your target is 80%+ first-contact resolution while knowing when to escalate. During testing, a customer says they were charged twice and want a refund. The first model response contains a brief customer-facing sentence plus a request to call get_customer, but your loop displays the sentence and exits, so no tool runs. After a later patch, some conversations continue calling tools even after Claude has produced a complete customer response. Which implementation change best addresses both failure modes?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Drive the loop from stop_reason, execute requested tools when it is tool_use, and return only when it is end_turn.
The agentic loop should be driven by stop_reason, executing tools when it equals tool_use and returning when end_turn occurs. Stopping the loop based on natural language text is fragile because Claude often outputs text alongside tool calls before actually finishing.
Question 73 of 360Scenario: Claude Code for Continuous IntegrationYou are integrating Claude Code into your 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.A CI review job recently added strict accessibility guidance intended only for React UI files. After deployment, Claude starts flagging backend route handlers and migration scripts for missing ARIA labels because the guidance is loaded on every review. You need the guidance to apply automatically only when relevant changed files are in scope.What should you change?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. Move the accessibility guidance into a .claude/rules/ file with YAML frontmatter paths matching React component globs.
Path-specific rule files allow Claude Code to load guidance only when file paths match the declared glob patterns. Using generic root instructions or manual commands fails because it relies on the model correctly guessing file contexts rather than applying deterministic system rules.
Question 74 of 360Scenario: Customer Support Resolution AgentYou 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 backend systems through MCP tools (get_customer, lookup_order, process_refund, escalate_to_human). Your target is 80%+ first-contact resolution while knowing when to escalate.You added returns, billing, and account subagents. In test cases involving a damaged item plus a disputed late fee, the billing subagent asks the returns subagent about refund eligibility, the returns subagent replies directly, and the coordinator only sees the final billing summary. Audits now show missing rationale for why fees were waived, duplicate customer messages, and inconsistent escalation decisions.What orchestration change would best address this?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. Route every subagent handoff and result through the coordinator, which aggregates state, applies escalation rules, and delegates follow-up work.
A coordinator-controlled hub-and-spoke pattern preserves observability, consistent error handling, and controlled information flow across specialized subagents. Letting subagents communicate directly bypasses central escalation rules and creates blind spots in the execution trace.
Question 75 of 360Scenario: Customer Support Resolution AgentYou 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 backend systems through MCP tools (get_customer, lookup_order, process_refund, escalate_to_human). Your target is 80%+ first-contact resolution while knowing when to escalate.In production, escalated cases often bounce back because human support agents ask customers to repeat order numbers, refund amounts, and prior troubleshooting details. The escalation review console shows only fields submitted through the escalate_to_human tool, not the original chat transcript or tool results.What change best improves escalation handoff quality?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Populate escalate_to_human with a structured handoff including customer ID, verified facts, root cause, amounts, attempted actions, and recommended next steps.
Structured escalation handoffs are essential when the human reviewer lacks access to the original conversation or tool outputs. The agent should send a compact, explicit payload including identifiers, verified facts, and recommended next steps. Relying on transcript links fails when reviewers lack system access.
Question 76 of 360Scenario: Customer Support Resolution AgentYou 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 backend systems through MCP tools (get_customer, lookup_order, process_refund, escalate_to_human). Your target is 80%+ first-contact resolution while knowing when to escalate.During testing, the coordinator sends refund-investigation subagents long prompts that prescribe exact tool sequences and conditional branches. These subagents work on standard returns, but they fail or ask for unnecessary escalation when a customer describes unusual evidence, missing order numbers, or mixed billing and delivery concerns.What change would most improve subagent performance while preserving coordinator control?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. Rewrite delegated prompts to state the support objective, known context, quality criteria, constraints, and required structured return format.
Subagents perform better when they understand the objective, constraints, and required return format rather than following brittle procedural scripts. Expanding step-by-step branches fails because it cannot anticipate every edge case, whereas goal-oriented prompts allow dynamic tool adaptation.
Question 77 of 360Scenario: Customer Support Resolution AgentYou 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 backend systems through MCP tools (get_customer, lookup_order, process_refund, escalate_to_human). Your target is 80%+ first-contact resolution while knowing when to escalate.You split the support system into a coordinator plus specialized subagents for intake, order investigation, and refund-policy evaluation. Production traces show the refund-policy subagent needs order delivery dates and return-window status in most refund cases, but only the coordinator can currently call lookup_order, adding multiple round trips. The lookup_order tool is read-only, while process_refund changes backend state and escalate_to_human creates a handoff.What change best balances latency reduction with reliable control of sensitive actions?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Grant the refund-policy subagent scoped access to lookup_order, while keeping process_refund and escalation routed through the coordinator.
Granting scoped read-only tool access to specialized subagents reduces latency without compromising safety or central oversight. Giving the subagent state-changing tools would violate least privilege principles and bypass the coordinator's ability to handle sensitive actions reliably.
Question 78 of 360Scenario: Structured Data ExtractionYou are building a structured data extraction system using Claude. The system extracts information from unstructured documents, validates output using JSON schemas, and maintains high accuracy. It must handle edge cases gracefully and integrate with downstream systems.Your extraction schema classifies vendor contract clauses using a required enum: termination, indemnity, liability, confidentiality, payment. In validation logs, unusual clauses are being forced into the nearest allowed category, while genuinely ambiguous clauses are returned with confident but inconsistent labels. Downstream analytics need stable categories without losing information from unexpected clause types.What schema adjustment best handles these edge cases?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Add enum values for ambiguous cases and a fallback category paired with a required free-text detail field.
Adding fallback enum values alongside a required free-text detail field preserves stable machine-readable categories without forcing inaccurate classifications. Unrestricted strings break downstream analytics, while closed enums force inaccurate predictions when handling unexpected inputs.
Question 79 of 360Scenario: Structured Data ExtractionYou are building a structured data extraction system using Claude. The system extracts information from unstructured documents, validates output using JSON schemas, and maintains high accuracy. It must handle edge cases gracefully and integrate with downstream systems.In a pilot, 6% of procurement packet extractions fail semantic validation because the required approval date is missing. Reviewer audit shows the provided PDFs say "approval letter on file," but the approval letters were not included in the model input. Retrying the same documents often produces plausible but unsupported dates.Which adjustment best improves extraction reliability?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Detect source absence after validation, stop automated retries, mark extraction incomplete, and request the missing approval letter.
Retries cannot recover facts that are absent from the provided source context. Marking the extraction incomplete and requesting the missing approval letter prevents unsupported hallucinations from entering downstream systems, which is a core architectural principle.
Question 80 of 360Scenario: Code Generation with Claude CodeYou are using Claude Code to accelerate software development. Your team uses it for code generation, refactoring, debugging, and documentation. You need to integrate it into your development workflow with custom slash commands, CLAUDE.md configurations, and understand when to use plan mode vs direct execution.A three-month pilot dashboard reports 96% reviewer acceptance for Claude Code generated artifacts. Review notes show most accepted outputs are README edits and changelogs, while rejected outputs cluster around OpenAPI response schemas and database migration rollback notes. Leadership wants to stop manual review for any output where Claude reports confidence above 0.9.What is the most reliable next step?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Break down validation results by artifact category and generated field, then reduce review only for consistently reliable segments.
Aggregate acceptance rates can mask weak performance in specific artifact categories or fields. Segmenting validation results by artifact type allows you to reduce human review safely only where consistency is proven, rather than trusting uncalibrated global confidence scores.
Question 81 of 360Scenario: Structured Data Extraction You are building a structured data extraction system using Claude. The system extracts information from unstructured documents, validates output using JSON schemas, and maintains high accuracy. It must handle edge cases gracefully and integrate with downstream systems. During consolidation of extracted obligations from 60 supplier contracts, the final dataset correctly groups duplicate obligations across documents. However, auditors cannot determine which contract clauses support each normalized obligation, and reviewers must reopen every source file to verify disputed entries. What change would best improve reliability without preventing consolidation?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. Require each extracted obligation to carry source identifiers and excerpts, then merge duplicates while retaining every supporting reference.
The correct answer preserves data provenance by attaching source identifiers and excerpts to each extracted obligation, enabling safe consolidation. A strong exam cue is to always look for the option that maintains verifiable audit trails while allowing downstream data merging. Batch-level metadata lacks granular tracing.
Question 82 of 360Scenario: Claude Code for Continuous Integration You are integrating Claude Code into your 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 rollout, automated pull request reviews generate many comments about naming preferences, import ordering, and subjective refactoring suggestions. Developers now skim past the bot's feedback, and important correctness issues are sometimes overlooked in the noise. What should you change first?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Rewrite the review prompt to report demonstrable bugs, security risks, and test gaps, while skipping stylistic preferences without documented impact.
The correct answer aligns the prompt with objective issues like bugs and security risks, successfully filtering out subjective noise. When tackling CI integration questions, always prioritize options that narrow the evaluation scope to actionable, demonstrable problems over mere threshold adjustments.
Question 83 of 360Scenario: Code Generation with Claude Code You are using Claude Code to accelerate software development. Your team uses it for code generation, refactoring, debugging, and documentation. You need to integrate it into your development workflow with custom slash commands, CLAUDE.md configurations, and understand when to use plan mode vs direct execution. Your frontend repo has component files under src/ui, packages/admin/widgets, and legacy/screens. The same accessibility and Storybook conventions were copied into several local instruction files, but updates drift and Claude misses conventions when editing new component folders. What should you change?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. Create a repository rule file with YAML path globs matching component and story files, then remove duplicated directory instructions.
The correct answer uses path-scoped repository rules to apply conventions dynamically based on file globs, eliminating drift from duplicated files. Root configurations require manual slicing, whereas custom commands fail if developers forget to invoke them during active development.
Question 84 of 360Scenario: Structured Data Extraction You are building a structured data extraction system using Claude. The system extracts information from unstructured documents, validates output using JSON schemas, and maintains high accuracy. It must handle edge cases gracefully and integrate with downstream systems. During a month-long effort to improve your extraction pipeline, Claude Code has explored parsers, JSON schema definitions, validation utilities, fixture documents, and downstream mapping code. After several long sessions, it starts giving answers based on generic extraction patterns rather than specific files it already inspected, and teammates joining later cannot reliably recover the earlier discoveries. What should you do to make later exploration and follow-up changes more reliable?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Have Claude maintain a repository scratchpad file recording discovered schemas, validators, edge cases, and file paths for future reference.
The correct answer uses a persistent scratchpad file to retain key architectural discoveries outside the volatile session context. When evaluating context degradation fixes, avoid relying on conversation compression tools, as these often omit critical implementation details needed for later success.
Question 85 of 360Scenario: Customer Support Resolution Agent. 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 backend systems through MCP tools (get_customer, lookup_order, process_refund, escalate_to_human). Your target is 80%+ first-contact resolution while knowing when to escalate. During a maintenance task, Claude must update refund eligibility rules that may live in several packages. Recent attempts used broad repository reads, filling context with unrelated source files before finding the relevant configuration and test fixtures. The files follow naming conventions such as refund-policy.yaml, return-policy.json, and *.refund.test.ts, but their directories vary across services. What should you have Claude do first?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. Use Glob with targeted filename patterns to list candidate policy and refund test files, then Read only the relevant matches.
Glob is the appropriate built-in tool when the selection criterion is a file path or filename pattern rather than file contents. Listing candidate paths first keeps context focused and avoids loading unrelated files before Claude knows which files matter.
Question 86 of 360Scenario: Customer Support Resolution Agent. 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 backend systems through MCP tools (get_customer, lookup_order, process_refund, escalate_to_human). Your target is 80%+ first-contact resolution while knowing when to escalate. A debugging session named "refund-escalation-tuning" previously inspected the support agent's system prompt, refund policy file, process_refund tool schema, and production traces. Before you continue, a teammate changed only the refund policy file and the process_refund tool schema. You want to keep useful prior analysis without letting outdated assumptions drive the next changes. What should you do?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. Resume the named session, identify the changed policy and tool-schema files, and request targeted revalidation before implementing fixes.
Resuming the session while revalidating changed files preserves useful investigation context and explicitly corrects stale assumptions. Asking for a single confidence score is a fragile cue because it lacks deterministic file verification, which might lead to implementing fixes based on outdated schemas.
Question 87 of 360Scenario: Customer Support Resolution Agent 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 backend systems through MCP tools (get_customer, lookup_order, process_refund, escalate_to_human). Your target is 80%+ first-contact resolution while knowing when to escalate. After adding regional order backends, production traces show the agent sometimes misreads raw lookup_order payloads: one region returns status_code: 3, another returns state: "RETURN_PENDING", and a third includes nested timestamps. The agent's final responses are inconsistent, even though each backend response is technically valid. What change best improves reliability without modifying every MCP tool implementation?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Add a PostToolUse hook that transforms lookup_order outputs into a canonical support-case structure before Claude receives them.
A PostToolUse hook intercepts tool results and transforms them into a canonical structure before the model reasons over them. Expanding the system prompt with regional mappings relies on probabilistic model compliance and increases context burden, whereas the hook centralizes normalization deterministically.
Question 88 of 360Scenario: Structured Data Extraction. You are building a structured data extraction system using Claude. The system extracts information from unstructured documents, validates output using JSON schemas, and maintains high accuracy. It must handle edge cases gracefully and integrate with downstream systems. Reviewers receive structured QA findings about extracted contract fields before downstream loading. After two weeks, audits show that most categories are useful, but findings labeled "ambiguous payment terms" are dismissed in 68% of reviews because the source wording is often acceptable. Reviewers have started ignoring the entire QA feed, including accurate findings about unsupported totals and missing effective dates. What should you do next?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. Temporarily suppress the ambiguous payment terms category while refining its criteria and examples before re-enabling it.
Temporarily suppressing the noisy category targets the specific issue damaging reviewer trust without weakening accurate finding categories. Raising global confidence thresholds or adding broad conservative instructions reduces the visibility of accurate findings, worsening overall system reliability.
Question 89 of 360Scenario: Customer Support Resolution Agent. 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 backend systems through MCP tools (get_customer, lookup_order, process_refund, escalate_to_human). Your target is 80%+ first-contact resolution while knowing when to escalate. During a pilot, the agent often spends its first two turns asking backend tools what refund policies, return reason codes, and escalation queues exist. These lists are read-only, change weekly, and help the agent choose the right customer-specific actions, but the extra calls increase latency and sometimes consume context before order lookup. Which MCP integration change best addresses this issue?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. Expose the read-only policy, reason-code, and queue catalogs as MCP resources, while keeping customer-changing operations as tools.
MCP resources are appropriate for read-only catalogs that provide context about available data or policy options. This reduces exploratory tool calls while preserving tools for model-driven actions such as looking up orders, processing refunds, or escalating cases.
Question 90 of 360Scenario: Customer Support Resolution Agent 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 backend systems through MCP tools (get_customer, lookup_order, process_refund, escalate_to_human). Your target is 80%+ first-contact resolution while knowing when to escalate. You added AgentDefinition entries for billing-investigator and returns-investigator specialists, but production traces show the coordinator never starts them. The coordinator is configured with allowedTools containing only get_customer, lookup_order, process_refund, and escalate_to_human. What change best enables the intended delegation without unnecessarily broadening each specialist's permissions?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Add Task to coordinator allowedTools and invoke specialists through it, while keeping backend MCP tools scoped to appropriate agents.
In the Agent SDK, a coordinator invokes subagents through the Task tool, so allowedTools must include Task. Prompting the coordinator to mention specialist names is only natural-language guidance, not a real subagent invocation, and granting broad tool permissions breaks least privilege.
Question 91 of 360Scenario: Claude Code for Continuous IntegrationYou are integrating Claude Code into your 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 CI review recently started producing noisy feedback after you added a database migration checklist to shared instructions. Pull requests that only modify TypeScript handlers now receive warnings about lock duration and rollback scripts, but SQL migration pull requests still need those checks. Migration files appear under both `services/*/db/migrations/*.sql` and `packages/*/migrations/*.sql`. You want the guidance to apply automatically during review only when those files are edited, without adding CI path-routing logic.What should you do?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Create a focused rule file with YAML frontmatter paths for both migration globs, containing only the migration review checklist.
Using a focused rule file with YAML frontmatter path globs ensures instructions load only for matching files. Path-scoped rules prevent irrelevant warnings in TypeScript reviews while keeping automated guidance active for SQL migrations.
Question 92 of 360Scenario: Customer Support Resolution Agent 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 backend systems through MCP tools (get_customer, lookup_order, process_refund, escalate_to_human). Your target is 80%+ first-contact resolution while knowing when to escalate. Production traces show that when customers provide photos and an order number, the agent sometimes calls process_refund immediately after get_customer succeeds, before lookup_order confirms item status, purchase date, and refundable amount. Several refunds were issued for final-sale items that backend policy would have rejected. What change would most effectively prevent this failure while preserving autonomous resolution for eligible cases?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Add a tool-call gate that rejects process_refund until get_customer and lookup_order return matching, refund-eligible records.
A programmatic tool-call gate deterministically enforces the required validation sequence before refunds execute. Relying solely on system prompt instructions is risky for business-critical safety, whereas a gate guarantees eligibility checks without blocking valid cases.
Question 93 of 360Scenario: Claude Code for Continuous Integration You are integrating Claude Code into your 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. A senior engineer created a /pr-feedback workflow that applies your team's review checklist and suppresses known false-positive categories. It works on their laptop, but clean CI runners and new contributors report "command not found" unless they manually copy files from that engineer's home directory. You want the same command to be available from a fresh repository checkout and reviewed alongside workflow changes. What should you do?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Store the command markdown under .claude/commands/ in the repository, then commit it with the CI workflow changes.
Storing custom commands inside the project's dot-Claude directory ensures they are version-controlled and available from a fresh checkout. Keeping them in a user's home directory prevents standard CI runners and new contributors from accessing the workflow.
Question 94 of 360Scenario: Customer Support Resolution Agent 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 backend systems through MCP tools (get_customer, lookup_order, process_refund, escalate_to_human). Your target is 80%+ first-contact resolution while knowing when to escalate. During a week-long investigation into regressions in billing dispute handling, the coordinator has already explored order lookup flows, refund policy files, and escalation handlers. It then launches subagents to inspect refund calculation and account-status branches. The subagents produce inconsistent findings, miss constraints discovered earlier, and repeat searches that were already completed. What change would most effectively improve reliability across the next exploration phase?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Before launching each new investigation wave, create a structured findings brief and include it in every subagent's initial prompt.
Providing a structured findings brief in each subagent prompt explicitly passes accumulated context across isolated boundaries. Relying on subagents to rediscover earlier constraints wastes effort and risks inconsistent conclusions, so explicit context passing is essential.
Question 95 of 360Scenario: Customer Support Resolution Agent 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 backend systems through MCP tools (get_customer, lookup_order, process_refund, escalate_to_human). Your target is 80%+ first-contact resolution while knowing when to escalate. Production reviews show inconsistent tool choices when customers use colloquial requests such as "I was charged twice," "where is my replacement," and "I want my money back." The agent sometimes calls process_refund before confirming refund eligibility, uses lookup_order with emails that only get_customer accepts, and escalates duplicate-name matches without asking for order details. What is the most effective tool-interface change to improve selection reliability without hard-coding a decision tree?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Revise each tool description to state accepted identifiers, example customer phrases, edge cases, and boundaries versus similar tools.
Clear tool descriptions provide the necessary context for the model to select the right tools during ambiguous conversations. Hard-coded decision trees or keyword routers are brittle, whereas detailed descriptions help the model distinguish overlapping features naturally.
Question 96 of 360Scenario: Customer Support Resolution Agent 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 backend systems through MCP tools (get_customer, lookup_order, process_refund, escalate_to_human). Your target is 80%+ first-contact resolution while knowing when to escalate. After verified customer, order, and policy facts are already collected for a difficult billing dispute, two plausible resolution paths remain. In previous tests, exploring both paths in one conversation caused later analysis to inherit assumptions from earlier analysis, while starting from scratch created inconsistent fact bases and extra backend calls. What is the best way to compare the two paths?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Use fork_session from the verified case baseline, explore each resolution path independently, then compare branch summaries before deciding.
Forking a verified session preserves the shared factual baseline while exploring divergent reasoning paths in isolated contexts. Exploring multiple paths in a single conversation causes assumptions to bleed between branches, leading to flawed comparisons.
Question 97 of 360Scenario: Customer Support Resolution Agent 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 backend systems through MCP tools (get_customer, lookup_order, process_refund, escalate_to_human). Your target is 80%+ first-contact resolution while knowing when to escalate. During refund testing, four backend failure modes are collapsed into the same MCP tool result: payment-service timeout, malformed refund_amount from the agent, an order outside the return window, and the tool account lacking refund permissions. Production simulations show the agent gives the same apology for all failures, retries cases that cannot succeed, and hides access problems as policy denials. What change would most improve the tool contract?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Return distinct structured categories for transient, validation, business, and permission failures, with retryability flags and customer-safe recovery guidance.
Returning distinct structured categories for each failure type gives the model actionable context to choose the right recovery path. Collapsing all errors into a single result prevents the agent from distinguishing transient timeouts from hard policy denials.
Question 98 of 360Scenario: Claude Code for Continuous Integration You are integrating Claude Code into your 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 review job emits structured findings that always pass JSON parsing and required-field checks. However, production logs show some findings reference line numbers outside the pull request diff, classify test-only issues as production blockers, or include remediation text that contradicts the reported issue. What change would most effectively improve reliability before posting comments to pull requests?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Keep tool-based structured output, then add semantic validation against diff metadata, severity rules, and finding consistency before publishing comments.
Semantic validation against pull request diff metadata ensures that model outputs meet actual review policies before publishing. Structured JSON schemas only enforce formatting compliance, so logic checks are still needed to catch invalid line numbers or logical contradictions.
Question 99 of 360Scenario: Customer Support Resolution Agent 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 backend systems through MCP tools (get_customer, lookup_order, process_refund, escalate_to_human). Your target is 80%+ first-contact resolution while knowing when to escalate. Production QA finds final replies often address refunds and returns but overlook shipping address corrections or unresolved account-lock evidence. Logs show subagents return partial findings successfully, but the coordinator accepts the first synthesized reply. Which change best improves completeness without escalating every multi-concern case?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Have the coordinator compare the draft resolution with the original request, assign targeted follow-up subagent work, then rerun synthesis.
An explicit coordinator review step compares draft resolutions against original requests to identify incomplete answers. This allows targeted follow-up queries to subagents, ensuring completeness without unnecessarily escalating complex cases to humans.
Question 100 of 360Scenario: Structured Data ExtractionYou are building a structured data extraction system using Claude. The system extracts information from unstructured documents, validates output using JSON schemas, and maintains high accuracy. It must handle edge cases gracefully and integrate with downstream systems.A QA prompt flags extraction problems before records reach reviewers. In pilot results, most total-mismatch and missing-signature findings are confirmed, but a new "possible payment-term ambiguity" category is usually dismissed. Reviewers now skim the entire finding feed and miss confirmed total mismatches.What should you change first?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. Separate findings by category and severity, tighten criteria for noisy checks, and prioritize high-precision issues in reviewer queues.
Separating findings by category and severity directly fixes reviewer fatigue by preventing noisy alerts from burying high-precision flags. Tightening criteria for ambiguous categories ensures reviewers maintain trust and focus on critical confirmed mismatches.
Question 101 of 360Scenario: Code Generation with Claude CodeYou are using Claude Code to accelerate software development. Your team uses it for code generation, refactoring, debugging, and documentation. You need to integrate it into your development workflow with custom slash commands, CLAUDE.md configurations, and understand when to use plan mode vs direct execution.Your team added a custom review workflow that summarizes generated code changes into structured records containing modified files, test coverage, security impact, rollback risk, and reviewer recommendation. Each record currently has one overall confidence score. In pilot runs, high-scoring records often have accurate file lists and test summaries but occasionally miss rollback or security concerns, which are the highest-risk fields. What change would best support safe routing of low-risk records while preserving reviewer attention for uncertain areas?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Require confidence per critical record field, then calibrate routing thresholds using a labeled set of previously reviewed changes.
Field-level confidence scores expose hidden uncertainty in high-risk areas like rollback and security. Calibrating routing thresholds against labeled review data prevents a high overall score from masking critical blind spots, whereas a single aggregate score lacks the needed precision.
Question 102 of 360Scenario: Code Generation with Claude Code You are using Claude Code to accelerate software development. Your team uses it for code generation, refactoring, debugging, and documentation. You need to integrate it into your development workflow with custom slash commands, CLAUDE.md configurations, and understand when to use plan mode vs direct execution. Your monorepo stores database migration files in several unrelated locations, including service folders, package folders, and an importer tool. All migration files must follow the same rollback, idempotency, and naming conventions. The team tried local instruction files near some migration folders, but new locations are frequently missed; placing the guidance in the root instructions makes Claude apply migration-specific advice during unrelated edits. What is the most maintainable configuration?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Create a .claude/rules/ migration file with paths matching all migration patterns so guidance loads only for those files.
Path-scoped rule files are ideal for enforcing conventions by file pattern rather than directory hierarchy. This setup keeps migration guidance automatic for matching files across the monorepo while preventing irrelevant context from loading during unrelated edits.
Question 103 of 360Scenario: Customer Support Resolution Agent 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 backend systems through MCP tools (get_customer, lookup_order, process_refund, escalate_to_human). Your target is 80%+ first-contact resolution while knowing when to escalate. Production logs show that when customers describe several related problems in one message, the agent often gives a detailed answer for the first issue, misses later issues, and sometimes recommends a refund without reconciling other charges on the same account. The workflow is predictable: each order or charge must be assessed, then the overall account resolution must be checked before the customer receives a response. What design should you use?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Use a prompt chain that reviews each order or charge independently, then runs a final account-level consistency pass.
A prompt chain matches this predictable workflow by isolating each local item before running a final account-level synthesis. Separating per-item review from broader reconciliation reduces attention dilution and catches interactions across issues before responding.
Question 104 of 360Scenario: Code Generation with Claude Code You are using Claude Code to accelerate software development. Your team uses it for code generation, refactoring, debugging, and documentation. You need to integrate it into your development workflow with custom slash commands, CLAUDE.md configurations, and understand when to use plan mode vs direct execution. Your repository has separate frontend, backend, and data packages. Each package has a maintainer-owned standards document that changes monthly, and Claude Code currently receives a copied, 900-line root instruction file covering every package. Developers report inconsistent behavior because irrelevant conventions appear in context, and standards drift when copied sections are not updated. What is the most maintainable configuration change?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Use small package-level CLAUDE.md files that reference the relevant standards documents with @import, keeping shared root guidance minimal.
Using small package-level files with @import keeps package guidance close to the code while avoiding copied instruction drift. This allows maintainers to load only relevant content, reducing context bloat and ensuring standards remain canonical and updatable.
Question 105 of 360Scenario: Claude Code for Continuous Integration You are integrating Claude Code into your 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 pull request review workflow exposes two structured tools: extract_pr_metadata and generate_review_findings. Recent CI logs show that on documentation-heavy pull requests, Claude sometimes calls generate_review_findings first, so findings lack required repository area, file ownership, and review policy metadata. The metadata must be captured before later review and enrichment steps run. What change best improves reliability?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Configure tool_choice to force extract_pr_metadata on the first request, then run review findings in a follow-up turn.
Forcing a specific tool choice is the safest mechanism when a structured extraction must happen before later steps. It guarantees the first response calls the metadata tool, allowing the pipeline to use those results in a follow-up request for generating findings.
Question 106 of 360Scenario: Customer Support Resolution Agent 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 backend systems through MCP tools (get_customer, lookup_order, process_refund, escalate_to_human). Your target is 80%+ first-contact resolution while knowing when to escalate. Production logs show that during short order-service outages, customers with valid orders are sometimes told that no matching order exists. The same tool response shape is currently used when a search completes with zero matches and when the order backend cannot be reached. What change would best improve the agent's recovery behavior?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Return successful empty results only for completed searches, and structured retryable errors when order lookup cannot access the backend.
Separating valid empty results from access failures provides the necessary state for correct control flow. Distinguishing between a completed search with zero matches and a backend outage prevents false denials and enables proper retry logic or escalation.
Question 107 of 360Scenario: Customer Support Resolution Agent 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 backend systems through MCP tools (get_customer, lookup_order, process_refund, escalate_to_human). Your target is 80%+ first-contact resolution while knowing when to escalate. During a multi-hour investigation of the refund workflow, the agent correctly identifies several important files, policy branches, and edge cases. Later in the same session, it starts contradicting earlier findings, references generic support-system patterns, and asks to rediscover classes it already inspected. What change would best improve reliability across the rest of the investigation?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Have agents maintain concise scratchpad files with key findings, file paths, and decisions, then reference them in later prompts.
Persistent scratchpad files preserve important discoveries outside the model's shifting conversation context. Referencing these files in later prompts helps counteract context degradation and keeps the investigation grounded in previously verified facts.
Question 108 of 360Scenario: Customer Support Resolution Agent 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 backend systems through MCP tools (get_customer, lookup_order, process_refund, escalate_to_human). Your target is 80%+ first-contact resolution while knowing when to escalate. In the repository for this support agent, a regression appears only in test fixture files whose filenames end with .policy-case.json. These fixtures are scattered across multiple service packages, and you want Claude Code to identify the affected files before inspecting their contents. Which approach is most appropriate?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Use Glob with **/*.policy-case.json, review the matched paths, then Read only the relevant fixture files.
Using Glob is the most direct approach when the selection criterion is a filename pattern rather than file contents. Reviewing matched paths before reading keeps the context focused and avoids unnecessary token usage from loading irrelevant files.
Question 109 of 360Scenario: Claude Code for Continuous Integration You are integrating Claude Code into your 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. Recent PR review runs produce noisy findings when a pull request touches only Markdown docs or CSS files. Claude still applies backend transaction rules, API error-handling rules, and database migration standards, which increases context size and creates irrelevant comments. What configuration change best reduces this noise while keeping review guidance automatic?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Move specialized guidance into .claude/rules/ files with YAML paths globs so only rules relevant to changed files load.
Path-scoped rule files load conditionally based on matching file paths, keeping irrelevant guidance out of the active context. This directly reduces token usage and false positives while preserving automatic rule application during continuous integration review.
Question 110 of 360Scenario: Claude Code for Continuous Integration You are integrating Claude Code into your 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 CI workflow lets Claude Code generate fixes for failing checks, then immediately review the resulting pull request in the same continuing conversation. Audits show the review often overlooks defects tied to assumptions made during implementation, such as trusting a helper API it introduced without validating edge cases. The review prompt already has explicit severity criteria and a consistent finding format. What change would most improve defect detection?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Run the review as a separate Claude Code invocation using only the diff, repository context, and review criteria.
A separate review invocation prevents the model from carrying forward implementation reasoning that might make it less likely to question its own choices. Providing the diff and repository context preserves necessary information without inheriting generator assumptions.
Question 111 of 360Scenario: Claude Code for Continuous IntegrationYou are integrating Claude Code into your 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.Developers repeatedly ask Claude Code to run the same pre-PR test-gap analysis. The workflow needs a reusable checklist, should prompt for a target diff or file pattern when omitted, and must avoid tools unrelated to reading files and writing the generated test plan. Which configuration best supports this workflow?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Create a project skill in .claude/skills/test-gap-review/SKILL.md, configuring argument-hint and allowed-tools frontmatter, then include the reusable checklist.
A project skill packages reusable task-specific workflows directly in the repository. Frontmatter elements like argument-hint and allowed-tools control execution behavior, making this approach superior to slash commands or relying on generic CLAUDE.md rules for constrained tool access.
Question 112 of 360Scenario: Structured Data ExtractionYou are building a structured data extraction system using Claude. The system extracts information from unstructured documents, validates output using JSON schemas, and maintains high accuracy. It must handle edge cases gracefully and integrate with downstream systems.A pilot processes 30 contracts per run. Accuracy is high on early documents but declines later: clauses copied from earlier contracts appear in later extractions, and page references from middle documents are dropped. Trace logs show raw outputs from OCR, table parsing, and validation tools dominate the request history, including coordinates, styling data, alternate OCR hypotheses, debug IDs, and validator traces. Downstream extraction only uses clause text, page number, document ID, confidence, and validation status. The operations team also needs original tool responses available for traceability.What change best addresses the reliability problem?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Add a preprocessing layer that stores full tool outputs externally and appends only schema-relevant fields and provenance to conversation history.
Storing full tool outputs externally and appending only schema-relevant fields to the context prevents verbose data from degrading model performance. This approach solves context bloat and lost-in-the-middle effects, whereas simply increasing max tokens or using prose summaries fails to fix the architectural issue.
Question 113 of 360Scenario: Customer Support Resolution AgentYou 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 backend systems through MCP tools (get_customer, lookup_order, process_refund, escalate_to_human). Your target is 80%+ first-contact resolution while knowing when to escalate.Production logs show inconsistent tool selection for billing-related messages. Routine refund requests are sometimes escalated, while requests requiring policy review are sometimes sent directly to process_refund. There are no backend errors, and the tool registry shows broad descriptions with little detail about side effects, eligible inputs, or boundaries between refund handling and human escalation.What is the best first change to improve reliability?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Rewrite the affected tool descriptions to specify purposes, required inputs, side effects, examples, and boundaries between refund and escalation workflows.
Rewriting tool descriptions to specify boundaries, required inputs, and side effects directly addresses inconsistent tool selection. Claude relies heavily on these descriptions to differentiate between similar actions, making explicit boundaries far more reliable than adding brittle keyword routers or merging distinct workflows.
Question 114 of 360Scenario: Customer Support Resolution AgentYou 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 backend systems through MCP tools (get_customer, lookup_order, process_refund, escalate_to_human). Your target is 80%+ first-contact resolution while knowing when to escalate.During intake testing, when a customer provides enough identifying details but asks, "Can you just check this?", the agent sometimes replies with generic guidance instead of using any backend tool. You do not know in advance whether get_customer, lookup_order, or escalate_to_human is appropriate, but every production response must be grounded in at least one backend action.What configuration best addresses this behavior?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. Configure tool_choice to any so Claude must call one available tool while retaining model-driven selection among applicable tools.
Configuring tool_choice to any guarantees the agent will execute a backend action rather than returning generic text. This setting enforces tool usage while still allowing the model to select the most contextually appropriate tool, avoiding the brittleness of forcing a specific hardcoded tool.
Question 115 of 360Scenario: Claude Code for Continuous IntegrationYou are integrating Claude Code into your 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 CI job invokes Claude Code in non-interactive mode to produce structured PR review findings. The output always passes JSON Schema validation, but your PR-comment step sometimes fails or posts misleading comments: a finding cites line 220 in a 90-line file, uses a file path not present in the diff, or places the vulnerable snippet inside the remediation field.What should you change in the review pipeline?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. Keep tool_use schema enforcement, add deterministic checks for line ranges and file membership, then retry with those failures included.
Adding deterministic checks for file membership and line ranges catches semantic inconsistencies that JSON schema validation alone misses. Including these specific failures in a targeted retry provides actionable feedback to the model, which is much more effective than running blind retries or tightening schema enums.
Question 116 of 360Scenario: Customer Support Resolution AgentYou 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 backend systems through MCP tools (get_customer, lookup_order, process_refund, escalate_to_human). Your target is 80%+ first-contact resolution while knowing when to escalate.Pilot logs show that process_refund returns the same short failure text for processor timeouts, expired refund windows, missing staff permissions, and malformed amounts. The agent responds inconsistently: it retries policy denials, escalates simple input mistakes, and gives customers vague explanations when permission is missing.What change would most directly improve the agent's recovery decisions?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Update each MCP tool to return categorized failures with retryability and customer-safe guidance tailored to the specific backend condition.
Updating tools to return categorized failures with retryability and customer-safe guidance gives the agent the context needed to choose correct recovery paths. This allows the agent to distinguish between temporary timeouts and permanent policy denials, which generic error messages or hard-coded retry loops cannot do.
Question 117 of 360Scenario: Code Generation with Claude CodeYou are using Claude Code to accelerate software development. Your team uses it for code generation, refactoring, debugging, and documentation. You need to integrate it into your development workflow with custom slash commands, CLAUDE.md configurations, and understand when to use plan mode vs direct execution.A CI review job already runs non-interactively and completes, but the script that posts inline pull request comments frequently fails because Claude's findings vary between markdown bullets, paragraphs, and code fences. Sometimes severity labels are missing or line ranges are formatted differently, so valid findings are dropped or posted to the wrong lines.What change would best make the review results reliable for automated consumption?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Run Claude Code with –output-format json and –json-schema defining required fields for each pull request finding.
Using structured JSON output with an explicit schema gives the CI script a stable contract for parsing findings. Relying on regex to parse markdown is a brittle anti-pattern, whereas structured JSON directly enforces required fields like severity and line ranges for reliable automation.
Question 118 of 360Scenario: Customer Support Resolution AgentYou 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 backend systems through MCP tools (get_customer, lookup_order, process_refund, escalate_to_human). Your target is 80%+ first-contact resolution while knowing when to escalate.Production logs show simple requests like "Can you resend my tracking link?" take nearly as long as multi-issue cases because every request runs through all specialist subagents. The extra passes sometimes introduce irrelevant refund or policy details into final responses, even when no refund is requested. Complex cases still require multiple specialists and a unified customer-facing answer.What change best improves the orchestration design?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Have the coordinator assess request scope, delegate only to relevant specialist subagents, then aggregate their findings into one response.
Having the coordinator assess scope and delegate only to relevant specialists eliminates unnecessary work for simple requests. This pattern preserves multi-specialist aggregation for complex cases while avoiding the fragility of keyword routing and the anti-pattern of subagents messaging each other directly.
Question 119 of 360Scenario: Customer Support Resolution AgentYou 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 backend systems through MCP tools (get_customer, lookup_order, process_refund, escalate_to_human). Your target is 80%+ first-contact resolution while knowing when to escalate.After the coordinator verifies a customer and retrieves two recent orders, it invokes a refund-policy subagent to assess eligibility. In production, the subagent often ignores the verified customer ID and latest order status, then asks for details already present in the coordinator's transcript. Logs show the Task prompt only says, "assess refund eligibility for this customer."What change best addresses this reliability issue?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Populate each Task prompt with the verified customer facts, relevant order records, prior findings, and needed decision criteria.
Subagents operate with isolated context and cannot automatically view the coordinator's transcript. Populating the Task prompt with verified facts and decision criteria ensures the subagent has the necessary information, preventing duplicate tool calls and redundant questions to the customer.
Question 120 of 360Scenario: Claude Code for Continuous IntegrationYou are integrating Claude Code into your 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 pull request reviewer often flags issues such as "possible confusing naming" and "maybe incomplete validation" that developers dismiss as speculative. The current prompt already says "be conservative" and "only report high-confidence findings," but dismissal rates have not improved across three sprints.What prompt change is most likely to improve precision without eliminating useful findings?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. Replace vague confidence guidance with concrete reportable and non-reportable categories, severity definitions, and code examples for each finding type.
Replacing vague confidence guidance with concrete categories and severity definitions gives the model operational boundaries for deciding what to report. A 95% certainty threshold is too restrictive and eliminates useful findings, whereas specific examples calibrate the reviewer effectively.
Question 121 of 360Scenario: Customer Support Resolution Agent 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 backend systems through MCP tools (get_customer, lookup_order, process_refund, escalate_to_human). Your target is 80%+ first-contact resolution while knowing when to escalate. During a staging test, backend logs show that get_customer returns a verified customer record and lookup_order returns two eligible orders. On the next model request, the agent again asks the customer for the same identifiers and sometimes repeats the same lookup instead of deciding whether to refund or escalate. The tool executor is successfully calling the MCP tools and recording their outputs in server-side logs. What change most directly fixes this loop behavior?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Append each executed tool result to the conversation history using the matching tool_use_id before sending the next model request.
Claude can only reason over information explicitly included in the messages sent on the next request. Appending each tool result with its matching tool use ID bridges the context gap, whereas keeping data solely in application state leaves the model blind.
Question 122 of 360Scenario: Multi-Agent Research System You are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports. A researcher adds an internal corpus MCP server that exposes tools for searching licensed journals and exporting citation metadata. The coordinator uses it successfully on that researcher's laptop, but teammates running the same workflow see only the default tools and produce reports with weaker public web citations. The server needs to be part of the team's reproducible research setup without exposing credentials. What should you change?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Define the shared server in the repository's .mcp.json, using environment variable placeholders for credentials rather than committed secrets.
Defining the server in the repository .mcp.json file makes shared tooling travel with the codebase. Using environment variable placeholders allows secure local credential injection, whereas documenting manual local setup steps breaks reproducibility for the team.
Question 123 of 360Scenario: Customer Support Resolution Agent. 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 backend systems through MCP tools (get_customer, lookup_order, process_refund, escalate_to_human). Your target is 80%+ first-contact resolution while knowing when to escalate. Production review finds the agent routes many frustrated but straightforward damage-replacement cases to escalate_to_human. The tickets usually include phrases like "this is ridiculous" and photos matching your standard replacement policy, but not an explicit request for a human. Which change best improves escalation calibration while preserving customer preference handling?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. Update guidance to acknowledge frustration, proceed with supported resolution steps, and escalate only if the customer again asks for a human.
Frustration alone is not a reliable signal that a case requires human escalation. When the issue is within the agent's capability and the customer has not explicitly requested a human, the agent should attempt the supported resolution while remaining ready to escalate if the customer states that preference.
Question 124 of 360Scenario: Customer Support Resolution Agent. 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 backend systems through MCP tools (get_customer, lookup_order, process_refund, escalate_to_human). Your target is 80%+ first-contact resolution while knowing when to escalate. A coordinator delegates complex billing disputes to a case-investigation subagent. Logs show that when order data contains unusual combinations, such as a partial return plus a delayed replacement, the subagent follows the coordinator's embedded seven-step checklist exactly and returns incomplete conclusions instead of adapting. What change would most improve the delegation design?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. Rewrite delegated Task prompts to state the support objective, constraints, case facts, and resolution quality criteria, leaving investigation paths flexible.
This approach improves reliability by giving the subagent the context and success criteria needed to adapt its investigation to unusual case details. The coordinator still defines the goal and quality bar, but it avoids over-constraining the subagent with brittle procedural steps.
Question 125 of 360Scenario: Claude Code for Continuous Integration You are integrating Claude Code into your 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 pilot review for database migration pull requests produces uneven feedback. Claude catches obvious syntax issues, but misses risks such as rollback safety, data retention, backward compatibility, and fixture setup because the team has not yet clarified what a good review should cover. You need to improve the workflow before enabling required CI checks. What should you do next?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Run an interview-style refinement pass where Claude asks maintainers targeted questions, then fold clarified criteria into the CI review prompt.
An interview-style refinement pass is the best next step because the core problem is underspecified requirements, not just prompt wording. Having the model ask maintainers targeted questions surfaces hidden criteria and domain-specific risks before the workflow becomes mandatory.
Question 126 of 360Scenario: Multi-Agent Research System You are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports. In a multi-agent research pipeline with a coordinator and specialized search, analysis, synthesis, and report agents, a prototype allows subagents to call one another whenever they need clarification. After several runs, audit logs are incomplete, retries are handled differently by each agent, and report outputs sometimes include findings the coordinator never reviewed. What architectural change would best improve reliability and observability?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Route subagent messages, errors, and follow-up requests through the coordinator, which manages delegation, recovery, and information flow.
A coordinator-centered pattern gives one agent responsibility for routing information, tracking failures, and deciding what should happen next. This improves observability because every handoff, retry, and aggregation step passes through a single control point, unlike a peer-to-peer mesh.
Question 127 of 360Scenario: Customer Support Resolution Agent. 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 backend systems through MCP tools (get_customer, lookup_order, process_refund, escalate_to_human). Your target is 80%+ first-contact resolution while knowing when to escalate. During a billing-dispute pilot, get_customer correctly verifies the caller, and lookup_order sometimes returns an order tied to a different customer ID because family members share names. The required workflow says refunds must only be issued when the verified customer ID matches the order owner, otherwise the case goes to a human. Logs show Claude usually follows this, but occasionally calls process_refund after a persuasive customer message. What change best improves reliability?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Add a stateful prerequisite gate that blocks process_refund unless verified customer and order owner IDs match, then escalates mismatches.
Adding a stateful prerequisite gate creates a deterministic control point outside the model's probabilistic reasoning. Since the required workflow depends on verified state from prior tool results, the gate directly prevents the unsafe downstream action when the prerequisite condition is not satisfied.
Question 128 of 360Scenario: Multi-Agent Research System. You are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports. During evaluation, the document analysis subagent sometimes initiates new web searches instead of analyzing the assigned PDFs, while the report generator occasionally rewrites evidence summaries before formatting them. Engineers added the extra tools to reduce coordinator round trips, but citation quality and role consistency have declined. What change best addresses the design issue?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. Restrict each subagent to role-relevant tools, adding only narrow cross-role utilities for frequent simple checks like source metadata lookup.
Scoped tool access keeps each subagent focused on its specialization and reduces tool selection confusion. Allowing only narrow cross-role utilities for common simple needs preserves efficiency without letting subagents take over responsibilities better handled by other agents or the coordinator.
Question 129 of 360Scenario: Structured Data Extraction You are building a structured data extraction system using Claude. The system extracts information from unstructured documents, validates output using JSON schemas, and maintains high accuracy. It must handle edge cases gracefully and integrate with downstream systems. Your pipeline extracts obligations from vendor contracts, policy memos, and meeting notes into a consolidated compliance matrix. Reviewers find that when two sources support the same obligation with slightly different wording, final rows contain a polished obligation statement and a bibliography list, but no row-level evidence trail. Auditors reject several rows because they cannot verify which excerpts were merged into each statement. What should you change?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Require each extracted obligation to carry source excerpts and locations, then preserve and merge that evidence into each synthesized matrix row.
Multi-source synthesis needs provenance that survives every handoff. The system should require each extracted obligation to include its supporting excerpt and location metadata, then merge those records into the final matrix row, rather than relying on a final bibliography or reconstructing citations later.
Question 130 of 360Scenario: Claude Code for Continuous Integration You are integrating Claude Code into your 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 pull request review job has become noisy after teams added security audit steps, release-note checks, dependency migration guidance, and test generation procedures to the repository's main Claude instructions. Simple documentation-only PRs now receive irrelevant warnings, while specialized jobs still need the detailed procedures when explicitly run. What configuration approach best balances consistency with focused context?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Keep universal review principles in project CLAUDE.md, and move specialized CI workflows into project skills invoked by relevant jobs.
Separating always-applicable guidance from task-specific procedures reduces irrelevant context during routine reviews. Use project CLAUDE.md for universal standards, and move specialized workflows into project skills invoked only by relevant jobs, preventing false positives on documentation-only pull requests.
Question 131 of 360Scenario: Customer Support Resolution Agent. 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 backend systems through MCP tools (get_customer, lookup_order, process_refund, escalate_to_human). Your target is 80%+ first-contact resolution while knowing when to escalate. During a production incident review, logs show the message "Refund approval token missing" appears only after escalation handoffs. You need Claude Code to inspect the repository and identify every code path that emits or handles this message before changing anything. Which approach should you take first?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. Use Grep to search repository contents for the exact error string and refund handler names, then Read matching files.
Grep is the optimal tool to locate exact error strings and handler names across a repository. Glob only matches filenames, while reading entire directories wastes context and risks missing the targeted error message.
Question 132 of 360Scenario: Claude Code for Continuous Integration You are integrating Claude Code into your 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 CI job asks Claude Code to review each pull request and then posts findings as inline comments. The posting step intermittently fails because some runs return markdown tables, others return bullet lists, and field names like file path, line number, severity, and remediation are phrased inconsistently. The team wants a low-maintenance fix that lets the pipeline reliably validate findings before posting them. What should you do?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Configure Claude Code to emit structured JSON matching a schema containing required fields for inline review comments.
Configuring structured JSON output creates a predictable contract for reliable downstream automation. Markdown and raw text are fragile formats that require complex parsing, which inevitably breaks when wording slightly changes.
Question 133 of 360Scenario: Customer Support Resolution Agent 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 backend systems through MCP tools (get_customer, lookup_order, process_refund, escalate_to_human). Your target is 80%+ first-contact resolution while knowing when to escalate. Production logs show two failure patterns in refund handling: intermittent gateway timeouts that often succeed on the next attempt, and permanent failures such as refund window expired or missing permission. Today the MCP tool sets <code>isError</code> and returns the same short failure message for both, so the agent sometimes repeats impossible operations and sometimes gives up on recoverable ones. What change best improves recovery behavior?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Add errorCategory and isRetryable fields to tool failures, retrying only failures marked retryable and preserving user-facing explanations.
Adding explicit error categories and retry flags gives the agent structured semantics for correct recovery routing. Relying on keyword parsing is brittle, and blanket escalation undermines the goal of automated first-contact resolution.
Question 134 of 360Scenario: Claude Code for Continuous Integration. You are integrating Claude Code into your 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. A pilot of your pull request reviewer shows developers dismiss most performance findings. The current review prompt says: "Only report actionable issues you are highly confident about. Be conservative and avoid nitpicks." The dismissed findings are usually speculative comments like "this loop might be slow" without evidence about input size, hot paths, or repeated work. What prompt change would most effectively improve review precision?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. Define reportable evidence thresholds for performance findings, including unbounded input growth, hot paths, or repeated database calls inside loops.
Defining concrete evidence thresholds replaces vague caution with specific conditions the model can evaluate. Asking the model for longer reasoning or higher confidence scores fails to eliminate speculative findings because it lacks measurable constraints.
Question 135 of 360Scenario: Structured Data Extraction. You are building a structured data extraction system using Claude. The system extracts information from unstructured documents, validates output using JSON schemas, and maintains high accuracy. It must handle edge cases gracefully and integrate with downstream systems. A release candidate updates 18 extraction assets, including prompts, JSON schemas, validators, and few-shot examples across invoices, contracts, and intake forms. A single review request produces uneven results: detailed feedback on early files, superficial comments on later files, and missed mismatches between schema fields and validator assumptions. What review architecture should you use before approving the release?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. Review each changed file separately for local prompt and schema defects, then run a final pass checking cross-file consistency.
Reviewing individual files isolates local logic without exhausting the context window, preventing superficial later analysis. A final integration pass ensures schemas and validators match, whereas bulk reviews suffer from lost-in-the-middle attention failures.
Question 136 of 360Scenario: Structured Data Extraction. You are building a structured data extraction system using Claude. The system extracts information from unstructured documents, validates output using JSON schemas, and maintains high accuracy. It must handle edge cases gracefully and integrate with downstream systems. Your extraction tool captures payment_method using a JSON Schema enum of credit_card, ach, wire, and check. In validation logs, documents with wording like "paid through marketplace balance" or no stated payment method either fail enum validation or get coerced into one of the existing categories, which misleads downstream reporting. What schema change best handles these edge cases while preserving structured categories?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. Extend the enum with unclear and other, plus a required detail field when other is selected.
Extending the schema with fallback categories handles ambiguous data without breaking validation rules. Forcing existing enum values creates inaccurate reporting, while using unrestricted strings destroys the reliable structure required by downstream systems.
Question 137 of 360Scenario: Claude Code for Continuous Integration You are integrating Claude Code into your 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 repository stores database migrations under services/*/db/migrations, packages/*/migrations, and legacy/*/schema. CI reviews often miss migration-specific rollback and locking requirements unless the changed files are in the one directory that already contains local guidance. You want review behavior to follow the relevant file patterns as packages move, without loading migration guidance for unrelated changes. What should you do?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. Create a .claude/rules/migrations.md file with YAML paths matching all migration locations and keep the conventions there.
Using a .claude/rules file with YAML path matching correctly applies guidance dynamically based on file locations. Placing everything in the root CLAUDE.md would load irrelevant instructions for every CI run, increasing noise and defeating your targeted scoping goals.
Question 138 of 360Scenario: Claude Code for Continuous Integration You are integrating Claude Code into your 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 PR reviewer emits structured findings with fields for file, line, severity, category, and suggested fix. Developers dismiss 38% of comments, but the dashboard only shows broad categories like "bug" and "maintainability," making prompt iteration unfocused. What schema and workflow change would best support systematic improvement?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Add a structured field capturing the triggering code pattern, then analyze dismissal rates by that field during prompt iterations.
Capturing the specific code construct that triggered a finding makes false-positive analysis actionable. Aggregating dismissals by this field pinpoints problematic patterns, whereas asking the model to self-report confidence just masks bad logic without providing measurable data.
Question 139 of 360Scenario: Claude Code for Continuous Integration You are integrating Claude Code into your 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. A custom CI skill first inspects the repository's dependency graph, flaky test history, and prior pull request comments before producing review guidance. In recent runs, the main review output increasingly repeats exploratory notes from that setup phase, reports issues unrelated to the changed files, and sometimes misses straightforward diff-specific problems. What change would best preserve review focus while keeping the setup workflow available?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. Configure the skill with context: fork so verbose exploration runs separately and returns only a concise summary.
Configuring the skill with context fork runs the verbose exploration in an isolated sub-agent context. This prevents setup noise from filling the main conversation window, whereas simply instructing the prompt to ignore earlier notes fails to prevent token bloat.
Question 140 of 360Scenario: Multi-Agent Research System You are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports. A new MCP server exposes a working literature database tool that searches licensed journals and returns abstracts, DOI links, publication dates, and citation-ready source metadata. In test runs, the web-search subagent often uses general web search for peer-reviewed evidence, while the document-analysis subagent scans exported PDFs manually. The MCP tool appears in the available tool list, but its surfaced description is only "Search articles by query." What change should you make first?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Rewrite the MCP tool description to specify coverage, accepted queries, returned citation metadata, and when agents should prefer it.
Tool descriptions act as the primary routing signal for Claude, so expanding the description clarifies when to use it. Renaming the tool with buzzwords fails to convey actual constraints or output expectations, leaving the agents confused about its intended coverage.
Question 141 of 360Scenario: Claude Code for Continuous Integration You are integrating Claude Code into your 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 repository's root CLAUDE.md has grown to 1,200 lines after adding review criteria, testing standards, API conventions, deployment notes, and migration guidance. CI-invoked Claude Code now produces noisy feedback that blends unrelated standards, and teams frequently create conflicting edits when updating guidance for their area. What restructuring approach best improves maintainability while preserving shared repository behavior?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Move narrowly scoped guidance into topic-specific files under .claude/rules/, leaving root CLAUDE.md with only universal CI review principles.
Splitting massive files into focused topic-specific rule files significantly improves maintainability and reduces context noise. Leaving only universal CI principles in the root CLAUDE.md prevents unrelated standards from blending together, whereas broad headings fail to stop bloat.
Question 142 of 360Scenario: Structured Data Extraction You are building a structured data extraction system using Claude. The system extracts information from unstructured documents, validates output using JSON schemas, and maintains high accuracy. It must handle edge cases gracefully and integrate with downstream systems. Your extractor processes vendor contracts and outputs schema-valid records, but downstream reviewers report that obligation summaries vary from terse fragments to long paraphrases, evidence snippets sometimes include irrelevant surrounding text, and action_owner wording is inconsistent. The prompt already contains detailed field definitions and length guidance, but changes have not stabilized outputs. What should you do next?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Add 2 to 4 representative input and ideal output examples showing concise obligations, evidence boundaries, and owner wording.
Few-shot examples are the strongest next step when detailed instructions alone fail to stabilize formatting and actionability. Representative input and output pairs clearly demonstrate exactly how ambiguous source text should be extracted, outperforming rigid word limits.
Question 143 of 360Scenario: Customer Support Resolution Agent 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 backend systems through 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 writes: "I need a refund for a damaged item, I was charged twice for another order, and I cannot access my account email." In testing, the agent often resolves only the first issue it investigates, then closes the case with an incomplete answer. When instructed to "handle everything," it sometimes mixes order details across issues or gives three disconnected replies. What workflow design best improves first-contact resolution for this pattern?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Create separate issue records after customer verification, investigate independent concerns using shared case facts, then synthesize one customer-facing resolution.
Creating separate issue records preserves boundaries between distinct concerns while utilizing shared verified facts. Synthesizing one unified response resolves the multiple issues cleanly, whereas forcing sequential replies or splitting tickets worsens the customer experience.
Question 144 of 360Scenario: Claude Code for Continuous IntegrationYou are integrating Claude Code into your 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.A structured CI review step extracts findings from pull request diffs into fields including `changed_file`, `changed_line`, `breaking_change_evidence`, and `suggested_fix`. Validation rejects several potential API-breaking findings because `breaking_change_evidence` is null. The rejected cases only include generated client changes in the CI context, while the previous API contract and baseline generated files are unavailable.What change best improves extraction quality without increasing unsupported findings?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Classify missing-baseline failures separately, retry only format or placement errors, and add the baseline artifact before re-extracting.
Retries are useful when the model has the needed information but produced it in the wrong structure or format. When the evidence is absent from the provided context, the correct recovery is to supply the missing source material or classify the case as unresolved rather than asking the model to invent evidence.
Question 145 of 360Scenario: Customer Support Resolution AgentYou 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 backend systems through MCP tools (get_customer, lookup_order, process_refund, escalate_to_human). Your target is 80%+ first-contact resolution while knowing when to escalate.A newly connected returns-policy MCP server exposes a returns_helper tool. In production traces, the tool is discovered and works when manually forced, but the agent usually chains lookup_order, asks customers redundant policy questions, or escalates standard return cases. What is the best first change to improve adoption of this MCP capability?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. Rewrite returns_helper MCP tool description to specify eligibility inputs, returned fields, examples, and boundaries with refund tools.
Tool descriptions are the primary signal Claude uses to decide when and how to call MCP tools. Making the tool's purpose, inputs, outputs, examples, and boundaries explicit directly improves model-driven tool selection without adding brittle orchestration.
Question 146 of 360Scenario: Customer Support Resolution AgentYou 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 backend systems through MCP tools (get_customer, lookup_order, process_refund, escalate_to_human). Your target is 80%+ first-contact resolution while knowing when to escalate.A new refunds policy allows autonomous refunds up to $150. Anything above that amount requires human approval, regardless of customer history, sentiment, or how obvious the case appears. In staging, the agent usually follows the policy but occasionally calls `process_refund` for $175 after reasoning that the customer clearly qualifies.What change best meets the policy requirement before launch?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Add a tool call interception hook that blocks process_refund above $150 and redirects the case to human escalation.
A tool call interception hook provides deterministic enforcement before the refund action reaches the backend system. This is the right approach when a business rule must be guaranteed rather than merely encouraged through instructions.
Question 147 of 360Scenario: Customer Support Resolution AgentYou 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 backend systems through MCP tools (get_customer, lookup_order, process_refund, escalate_to_human). Your target is 80%+ first-contact resolution while knowing when to escalate.Production logs show that vague requests such as "my replacement and refund are both wrong" often require different investigation paths after the first backend lookup. Some turn out to be return-status issues, some are duplicate authorization holds, some involve account verification problems, and some combine multiple causes. A fixed workflow is producing unnecessary tool calls on simple cases and missing important branches on unusual cases.Which decomposition strategy should you use?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Begin with a brief fact-gathering pass, then let the coordinator create targeted follow-up subtasks as tool findings reveal the dispute type.
This matches an open-ended investigation where the correct next steps depend on what is discovered during the case. A lightweight initial pass establishes the facts, then the coordinator can adapt the plan and delegate only the investigations needed for the actual dispute pattern.
Question 148 of 360Scenario: Claude Code for Continuous IntegrationYou are integrating Claude Code into your 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.During an automated pull request review, your team added a reusable repository impact analysis step before generating final findings. The step produces long dependency traces, rejected hypotheses, and intermediate notes. When the same Claude Code session continues into final review, the posted comments become noisy and sometimes cite exploratory dead ends instead of actionable issues.What configuration change best preserves final review quality while keeping the reusable analysis available?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Configure the review helper as a skill with context: fork, returning only a concise summary to the main CI review.
Skills can run in an isolated sub-agent context when configured with context fork, which prevents verbose exploratory work from polluting the main conversation. Returning only a concise summary keeps the final review focused on actionable findings while preserving the reusable workflow.
Question 149 of 360Scenario: Multi-Agent Research SystemYou are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports.A user asks for a report evaluating whether an organization should enter a new AI-assisted drug discovery market, covering scientific feasibility, regulatory exposure, partnership opportunities, and commercialization timing. In testing, the system often produces duplicated sections, misses relationships between findings, and takes longer than expected because each broad request is handled as a single chain of subagent calls.Which orchestration change would most effectively improve completeness and latency?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Decompose the request into concern-specific tasks, run relevant subagents in parallel with shared context, then synthesize one integrated report.
A multi-concern request should be split into distinct work items so each concern receives focused investigation. Running independent concerns in parallel improves latency, while shared context and final synthesis preserve coherence across the report.
Question 150 of 360Scenario: Multi-Agent Research SystemYou are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports.In the research pipeline, the report generator subagent is wasting context while locating reusable markdown templates and citation-style files. The team already knows the naming conventions for these files, but the subagent currently inspects broad directory contents before deciding what to read.Which approach best reduces unnecessary context while preserving accuracy?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Use Glob with the known path patterns to enumerate candidate template files, then Read only the selected matches.
This approach uses the purpose-built file path matching tool before consuming file contents. It minimizes context usage by separating file discovery from content inspection, then reading only the files that are actually relevant.
Question 151 of 360Scenario: Claude Code for Continuous IntegrationYou are integrating Claude Code into your 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.A nightly CI review job for large pull requests first asks Claude Code to map ownership boundaries, trace affected call paths, and inspect related tests before producing review findings. On broad changes, the job often fills the conversation with verbose search results and file excerpts, then the final review misses earlier discoveries or gives shallow comments.What adjustment would best preserve review quality while still allowing necessary investigation?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Run verbose repository discovery in an Explore subagent, returning concise findings before the main CI review produces structured comments.
This isolates the noisy discovery phase from the main review context while still preserving the important conclusions. The main review can then focus on applying judgment and producing actionable findings instead of carrying every intermediate search result and file excerpt.
Question 152 of 360Scenario: Structured Data ExtractionYou are building a structured data extraction system using Claude. The system extracts information from unstructured documents, validates output using JSON schemas, and maintains high accuracy. It must handle edge cases gracefully and integrate with downstream systems.A pipeline extracts insurance policy exclusions from packets containing the policy, riders, emails, and broker notes. The first pass captures detailed snippets, but a middle step condenses each packet into a short narrative before final JSON extraction. Audit reviewers find accurate-looking exclusions in final records, but they cannot determine which document or passage supports each exclusion, especially when riders override earlier policy language.What change best addresses this failure mode?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. Change intermediate handoffs so each extracted fact carries its source document, location, and supporting excerpt into final synthesis.
This preserves provenance at the same granularity as the extracted information, so downstream systems can trace each final field back to supporting evidence. It directly addresses the failure introduced by compression, where a summary keeps the conclusion but drops the source relationship needed for auditability.
Question 153 of 360Scenario: Claude Code for Continuous Integration You are integrating Claude Code into your 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 PR review has started posting comments that claim error-path tests are missing. Manual spot checks show many flagged cases are already covered through table-driven tests, shared fixtures, or helper-generated cases, but some genuinely uncovered branches still need comments. What change would most effectively improve the review prompt?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Add targeted examples showing varied existing test structures and genuine gaps, including why each should be reported or skipped.
Targeted examples teach the model how to interpret ambiguous coverage evidence across different test organization patterns. Showing both acceptable existing coverage and genuine gaps helps the model generalize judgment instead of assuming unfamiliar test structures represent missing tests.
Question 154 of 360Scenario: Multi-Agent Research System You are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports. Last week, a long research investigation produced a draft report on a market topic. Since then, several source documents were replaced and the web index was refreshed. When the coordinator resumes the named investigation session, it repeatedly cites withdrawn documents and treats old search outputs as current, even after the user points out the updates. What should you do before continuing the report?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Start a new session, provide a structured summary of durable findings, and explicitly identify changed sources for fresh analysis.
Starting fresh avoids carrying forward stale tool results that remain embedded in the prior conversation context. A structured summary preserves durable decisions and research scope while forcing current sources to be reloaded and reanalyzed, rather than hoping the model ignores old data.
Question 155 of 360Scenario: Customer Support Resolution Agent. 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 backend systems through MCP tools (get_customer, lookup_order, process_refund, escalate_to_human). Your target is 80%+ first-contact resolution while knowing when to escalate. A long-running billing dispute workflow delegates separate investigations for account status, order history, and refund eligibility. The service sometimes restarts after deploying updates. After restart, the coordinator resumes but cannot determine which subagent findings are current, re-runs completed investigations, and occasionally omits evidence needed for escalation handoffs. What design change best improves reliability?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Have each subagent export structured state to a known location; the coordinator reloads and injects it when resuming.
Exporting structured state creates an explicit recovery mechanism independent of fragile conversational memory. On the exam, remember that asking Claude to reconstruct progress from transcripts is an anti-pattern; externalizing state is required for reliable agent resumption.
Question 156 of 360Scenario: Multi-Agent Research System. You are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports. During evaluation, the document-analysis subagent repeatedly calls an MCP tool to fetch the same unavailable source URL. Logs show the tool marks every failed fetch the same way, so the subagent retries permanent failures such as deleted documents and unsupported file formats, adding minutes of latency before the coordinator receives partial findings. What change would best improve recovery behavior?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Return errorCategory and isRetryable per failure, marking permanent source issues non-retryable and transient timeouts retryable with clear messages.
Structured retry metadata allows agents to distinguish transient failures from permanent roadblocks. Marking permanent conditions as non-retryable prevents wasted latency, whereas asking the coordinator to infer retryability from prose introduces brittle natural language parsing.
Question 157 of 360Scenario: Customer Support Resolution Agent. 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 backend systems through MCP tools (get_customer, lookup_order, process_refund, escalate_to_human). Your target is 80%+ first-contact resolution while knowing when to escalate. During a pilot, the coordinator verifies a customer, retrieves two recent orders, and then delegates separate billing-dispute and returns-policy checks. The delegated analyses frequently state that the customer ID or order status is unknown, even though those facts were available earlier in the coordinator's turn. The coordinator currently sends each delegated check only a brief task title such as "evaluate refund eligibility." What change would most reliably improve the delegated analyses?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. Include the relevant verified customer facts, order details, and prior tool outputs directly in every delegated Task prompt.
Subagents operate with isolated context, meaning they only process information explicitly passed during invocation. Injecting verified facts and tool outputs directly into the task prompt guarantees accurate analysis, whereas relying on session memory or heuristic selection causes failures.
Question 158 of 360Scenario: Customer Support Resolution Agent. 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 backend systems through MCP tools (get_customer, lookup_order, process_refund, escalate_to_human). Your target is 80%+ first-contact resolution while knowing when to escalate. The QA process reviews 2% of auto-resolved tickets chosen uniformly each week. The dashboard shows 96% overall correctness, but refunds later reversed by human supervisors are concentrated in rare marketplace-seller warranty claims and older billing disputes that barely appear in the sample. You need to redesign review without sending every automated resolution to humans. What should you do?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Use stratified random sampling across issue type, order age, seller channel, and resolution action for high-confidence auto-closures.
Stratified random sampling guarantees that rare but critical segments are represented in the review set. This allows you to measure hidden error rates in high-confidence closures, whereas simply increasing the uniform sample size or skipping high-confidence cases hides edge case failures.
Question 159 of 360Scenario: Multi-Agent Research System. You are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports. Your team uses the system to investigate an unfamiliar legacy repository that powers citation extraction. After several hours, the coordinator starts answering follow-up questions with generic claims about "typical pipeline patterns" and contradicts earlier discoveries about specific classes and data flows. The earlier discoveries were recorded only in long conversation turns mixed with verbose Read, Grep, and test outputs. What change would most effectively preserve accurate findings for later questions?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Have each exploration subagent write key findings to scratchpad files at known paths, and require later prompts to reference them.
Writing key findings to scratchpad files creates durable state outside of noisy conversational context. Requiring later prompts to reference these files ensures exact knowledge reuse, whereas increasing the token budget fails to prevent degraded memory and hallucinations.
Question 160 of 360Scenario: Claude Code for Continuous Integration. You are integrating Claude Code into your 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. A new GitHub Actions step invokes <code>claude "Review the changed files for regressions"</code> and then stalls until the CI timeout. The repository checkout is valid, and the same prompt works when a developer runs it manually in a terminal. What change should you make to the pipeline command?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. Run Claude Code with the -p or –print flag so it processes the prompt and exits after output.
Claude Code runs interactively by default, waiting for further input which causes CI timeouts. The dash p or print flag forces the script to process the prompt and exit immediately, whereas appending prompt instructions to avoid follow-up questions is unreliable.
Question 161 of 360Scenario: Structured Data Extraction. You are building a structured data extraction system using Claude. The system extracts information from unstructured documents, validates output using JSON schemas, and maintains high accuracy. It must handle edge cases gracefully and integrate with downstream systems. Production evaluation shows your extraction tool validates successfully, but downstream analytics are unreliable. New vendor industries and uncertain contract classifications are being squeezed into the closest allowed enum value, causing misleading dashboards even though no JSON schema errors occur. What schema change would best improve reliability while preserving machine-readable output?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Add explicit fallback enum values with companion detail fields so uncertain or novel categories are captured without forced misclassification.
Adding explicit fallback enum values with companion detail fields preserves schema validity while safely capturing uncertainty. This prevents semantic misclassification, whereas endlessly expanding enums or using free text degrades downstream reliability and breaks constraints.
Question 162 of 360Scenario: Claude Code for Continuous IntegrationYou are integrating Claude Code into your 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 CI review uses tool_use to produce a JSON finding object with required fields: file_path, start_line, severity, owner_team, linked_ticket, and suggested_fix. In PRs that lack ownership or ticket metadata, reviews contain plausible but nonexistent owner teams and tickets, which downstream automation routes incorrectly. What schema change best addresses this while preserving useful findings?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. Redesign the schema so unavailable source-dependent fields are nullable or optional, with instructions to return null unless directly evidenced.
Making source-dependent fields nullable directly addresses hallucination by allowing the model to represent missing information. Relying solely on stronger prompt wording often fails to prevent fabricated values when strict schema constraints force an output.
Question 163 of 360Scenario: Multi-Agent Research System You are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports. During a run on regional climate adaptation funding, the document analysis subagent finds two credible government reports with incompatible cost estimates. The synthesis agent cannot determine whether the difference reflects methodology, geography, or time period. Current escalation tickets only say "conflicting sources found," and human reviewers must restart the investigation from scratch. What change would best improve this mid-process escalation?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Generate a structured handoff with research topic, disputed claims, source citations, analysis performed, and recommended reviewer decisions.
A structured handoff gives the human reviewer the context needed to continue from the system's work instead of restarting the investigation. It captures the unresolved decision point, supporting evidence, prior analysis, and recommended next steps in a compact, actionable format.
Question 164 of 360Scenario: Multi-Agent Research SystemYou are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports.During load testing, broad topics often produce reports missing either web evidence or document evidence. Logs show the coordinator requested both search and document analysis in the same model response, but the next model input contains only one returned result before synthesis begins. What change best fixes the orchestration bug?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. When the API response has stop_reason tool_use, execute all tool_use blocks, append matching results, and continue until end_turn.
Executing all tool use blocks implements the agentic loop around the model's explicit control signal rather than assuming a single tool per response. Returning all matching results lets the coordinator reason over complete subagent outputs before synthesis.
Question 165 of 360Scenario: Customer Support Resolution Agent 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 backend systems through MCP tools (get_customer, lookup_order, process_refund, escalate_to_human). Your target is 80%+ first-contact resolution while knowing when to escalate. Production review finds several billing dispute cases where the agent correctly verifies the customer and order, then attempts to call process_refund for amounts above your policy limit. Company policy allows autonomous refunds up to $500, but larger refunds require human approval before any financial action occurs. What change would most reliably prevent policy violations while preserving autonomous handling for allowed refunds?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Add a tool call interception hook that blocks process_refund above $500 and returns guidance to call escalate_to_human.
A tool call interception hook provides deterministic enforcement before the financial operation executes. It preserves normal autonomous refunds under the threshold while preventing policy-violating calls and redirecting the workflow to escalation.
Question 166 of 360Scenario: Multi-Agent Research SystemYou are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports.Your report generator receives synthesis notes from a peer-reviewed meta-analysis, two industry surveys, and several vendor benchmarks. In the final report, a vendor benchmark's narrow claim is presented with the same authority as a repeated meta-analysis finding, and readers cannot judge how much weight to give each conclusion. What change would best improve the reliability of the report?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. Organize conclusions by evidentiary status, retaining source characterization and methodological context for each major claim in the final report.
Organizing conclusions by evidentiary status preserves uncertainty by making the strength of evidence visible to readers. Separating stronger conclusions from tentative ones prevents the report from flattening source quality into a single authoritative narrative.
Question 167 of 360Scenario: Multi-Agent Research System You are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports. Research runs are meeting quality expectations, but they take too long. Logs show the coordinator assigns three independent investigation branches (market adoption, regulatory responses, and technical limitations) one after another, waiting for each subagent to finish before starting the next. The branches do not depend on each other's intermediate findings, and the coordinator still needs to aggregate results before synthesis. What change best reduces elapsed time while preserving the intended orchestration pattern?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Have the coordinator issue separate Task calls for independent research branches in one response, then aggregate their returned findings before synthesis.
Independent subagent work can be launched concurrently when the coordinator emits multiple tool calls in the same response. This preserves the coordinator as the aggregation point while reducing wall-clock time for branches that do not depend on each other.
Question 168 of 360Scenario: Multi-Agent Research System You are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports. The coordinator has finished an initial literature map for a controversial research topic. Two stakeholders now want independently developed report outlines, one focused on regulatory risk and one focused on commercial opportunity. Both outlines should start from the same verified source set, but exploratory assumptions from either outline must not influence the other before final comparison. What should you do?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Create separate fork_session branches from the completed analysis baseline, develop each framing independently, then compare outputs through the coordinator.
Forking from a shared baseline preserves the same verified starting context while isolating divergent exploration paths. This fits the need to compare independent approaches without allowing assumptions from one branch to contaminate the other.
Question 169 of 360Scenario: Customer Support Resolution Agent 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 backend systems through MCP tools (get_customer, lookup_order, process_refund, escalate_to_human). Your target is 80%+ first-contact resolution while knowing when to escalate. While updating the agent's refund-policy behavior, you need to inspect only the files related to policy configuration and tests. The repository is large, and relevant files are spread across several packages with naming patterns such as return-policy.yaml, refund-policy.test.ts, and policy-overrides.json. What should you do first to locate the relevant files efficiently?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Use Glob with targeted filename patterns, then Read only matching policy and test files before editing.
Using Glob is the appropriate technique when the selection criterion is a specific file path or naming pattern. It narrows the search space before reading files, which avoids loading unrelated repository content into context unnecessarily.
Question 170 of 360Scenario: Claude Code for Continuous IntegrationYou are integrating Claude Code into your 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.A pull request review workflow launches claude "Review the changed files for security regressions" from a CI step. The process starts successfully, but the job sits idle until the CI timeout because the command is waiting for an interactive session instead of returning review text to stdout. What change should you make first?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. Run Claude Code with claude -p "Review the changed files for security regressions" so it prints output and exits.
The print flag is the documented way to run the CLI in non-interactive mode for automation pipelines. It processes the prompt, writes the response to standard output, and exits instead of opening an interactive session that halts the CI job.
Question 171 of 360Scenario: Multi-Agent Research System You are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports. A user asks for a report comparing how proposed AI copyright regulations affect music licensing, film post-production, and book publishing in the United States and European Union. Test runs produce reports that mix jurisdictions, duplicate background sections, and leave some industry-specific risks unresolved because the coordinator sends the whole prompt to one research pass before synthesis. What workflow change best improves coverage and consistency?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Split the request into distinct industry and jurisdiction workstreams, pass shared scope definitions, investigate in parallel, then synthesize one report.
Splitting the request into distinct workstreams gives each subagent a focused slice of the prompt while preserving shared constraints. Parallel investigation improves coverage, and the final synthesis step resolves overlaps into a unified report rather than fragmented outputs.
Question 172 of 360Scenario: Claude Code for Continuous Integration You are integrating Claude Code into your 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. A new CI job asks Claude Code to improve coverage for a data normalization utility. The first generated tests pass, but they miss null inputs, timezone boundary cases, and duplicate IDs. Follow-up prompts like "be more thorough" produce inconsistent additions and occasional regressions. What workflow should you use to make improvement more reliable?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Create a targeted test suite for expected behavior and edge cases, then iterate by feeding Claude the specific failing results.
Creating an executable test suite establishes an objective feedback loop for the model. Vague prompts like asking to be exhaustive lack measurable targets, whereas feeding exact failing test results directs the model to make targeted corrections.
Question 173 of 360Scenario: Customer Support Resolution Agent 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 backend systems through MCP tools (get_customer, lookup_order, process_refund, escalate_to_human). Your target is 80%+ first-contact resolution while knowing when to escalate. While updating refund-policy handling, you ask Claude Code to change a guard clause in a large tool adapter file. The attempted edit fails because the selected text appears in several similar handlers for returns, billing credits, and refunds. You need only the refund handler changed without altering adjacent cases. What should you do next?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Load the full file with Read, identify the intended refund block, then Write the complete corrected file.
Reading the full file provides necessary context when an edit operation fails due to duplicate code blocks. Writing the complete corrected file ensures the specific handler updates safely without risking unintended modifications to similar paths.
Question 174 of 360Scenario: Structured Data Extraction You are building a structured data extraction system using Claude. The system extracts information from unstructured documents, validates output using JSON schemas, and maintains high accuracy. It must handle edge cases gracefully and integrate with downstream systems. A long-running audit of your extraction pipeline delegates separate Claude Code subagents to inspect parser modules, schema definitions, validation failures, and downstream mapping logic. Twice this week, the process was interrupted after hours of exploration. When restarted, the coordinator repeated completed investigations, missed several previously discovered edge cases, and gave subagents incomplete background about which document formats had already been analyzed. What design change would most improve reliability after interruptions?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Have each subagent export structured state to fixed paths, then load a resume manifest into restarted coordinator prompts.
Exporting structured state to fixed paths preserves progress outside the volatile conversation window. Loading this resume manifest allows the coordinator to inject exact handoff details into new prompts, avoiding the token limits of session histories.
Question 175 of 360Scenario: Multi-Agent Research System. You are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports. During load testing, reports on broad topics become inconsistent once the research phase produces more than 30 source analyses. The document analysis subagent completes successfully, but its outputs are long narrative memos with internal reasoning, copied verbatim into the synthesis prompt. The synthesis agent omits high value evidence from earlier analyses and sometimes cites sources that were discussed but not central. What redesign best addresses the reliability problem?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. Modify upstream subagents to return compact structured records: key facts, citations, relevance scores, and only synthesis-relevant details.
Modifying upstream agents to return compact structured records solves context dilution by reducing token noise. Increasing the context limit fails because the synthesis agent still struggles to track relevant facts buried inside long narratives.
Question 176 of 360Scenario: Structured Data Extraction You are building a structured data extraction system using Claude. The system extracts information from unstructured documents, validates output using JSON schemas, and maintains high accuracy. It must handle edge cases gracefully and integrate with downstream systems. Your extractor captures sample_size, study_design, and citation_source from journal articles. It works on papers with explicit Methods and References sections, but misses the same fields when sample details appear in an abstract footnote, study design appears in an appendix table, or citations are inline only. Validation passes because those fields are nullable, but downstream analytics show systematic under-extraction. What change would most effectively improve extraction quality?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Add targeted examples showing correct extraction from multiple document layouts, including inline citations, appendix tables, and embedded methodology details.
Few-shot examples teach Claude how to map differently placed evidence into the same schema fields across varied layouts. Making these fields required is a risky anti-pattern because it pressures the model into fabricating values when the data is genuinely absent.
Question 177 of 360Scenario: Claude Code for Continuous IntegrationYou are integrating Claude Code into your 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.A new CI review prompt loads the same repository guidance for every pull request. Review comments for generated API clients and database migrations now cite React accessibility rules and frontend naming standards, creating noisy false positives. The repository already keeps file-type conventions in separate markdown snippets, and you want Claude Code to consider each snippet only when the reviewed files are relevant.What should you configure?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Create focused .claude/rules/ files with YAML frontmatter paths globs targeting generated clients, migrations, and frontend files.
Path-specific rule files are designed for conditional convention loading based on file paths. YAML frontmatter paths fields with glob patterns let Claude Code load only the relevant guidance for matching files, reducing irrelevant context and false positive review comments.
Question 178 of 360Scenario: Multi-Agent Research System. You are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports. A report-generation subagent must update a shared Markdown template used for final research reports. The template contains the same phrase, "TODO: add source summary," in several sections, and repeated attempts to make a targeted replacement keep failing because the match is not unique. What should you do next?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Use Read to load the full template, modify the intended section, then Write the complete corrected file back.
When an edit target is not unique, loading the file and rewriting the complete contents is the reliable fallback. As a practical cue, relying on broader text matching or scripting shell commands risks modifying the wrong occurrence and damaging file integrity.
Question 179 of 360Scenario: Structured Data Extraction. You are building a structured data extraction system using Claude. The system extracts information from unstructured documents, validates output using JSON schemas, and maintains high accuracy. It must handle edge cases gracefully and integrate with downstream systems. In pilot runs, quantity fields from several vendors use shorthand like "approx. 12 kg", "12kg net", and "12 kilograms". The extractor often flags valid variants as defects while accepting truly ambiguous entries like "12 units" without unit context. The schema and validation logic are stable, and prose instructions listing allowed unit formats have not improved consistency. What change would most effectively improve judgment across new vendor layouts?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. Add a small set of labeled examples showing acceptable unit variants and genuinely ambiguous entries, including expected fields and reasoning.
Few-shot examples are highly effective when a model must distinguish acceptable variations from genuine data issues. Showing both positive and negative cases provides a reliable decision boundary, whereas merely expanding prose rules or increasing thresholds fails to fix core logic.
Question 180 of 360Scenario: Claude Code for Continuous Integration. You are integrating Claude Code into your 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 changing the pull request review prompt from "find all potential reliability issues" to "be conservative and include only actionable comments," the bot still flags defensive null checks as bugs and ordinary retry loops as performance defects. Developers dismiss more than half of its comments and say they cannot predict what the bot considers worth reporting. What change should you make next?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Replace broad caution language with concrete report and skip criteria for each review category, including representative true-positive and non-issue examples.
Broad caution language fails to define the actual decision boundary for the model. Providing concrete category-specific criteria with true-positive and non-issue examples operationalizes the review process, whereas relying on self-reported confidence scores leaves the judgments noisy.
Question 181 of 360You are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports. The coordinator sometimes delegates to the report-generation subagent before the document-analysis subagent has returned evidence excerpts and source metadata. The resulting reports are well written but contain claims that cannot be traced back to the underlying sources. What change would most effectively prevent this failure mode?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Add an orchestration-level prerequisite that rejects report-generation delegation until required results and source mappings are present.
An orchestration-level prerequisite reliably enforces workflow ordering by checking shared state before allowing downstream delegation. Prompt instructions are probabilistic and can be ignored, making them insufficient for mandatory dependency checks between subagents.
Question 182 of 360You are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports. During a regulated-topic run, the report-generation subagent sometimes calls an MCP tool that publishes a draft before the coordinator has verified that every major claim has a source mapping. The team needs a deterministic control that prevents the publishing tool from executing unless the citation manifest is present. What change should they make?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Configure a PreToolUse hook for the publishing tool that blocks calls missing the required citation manifest.
A PreToolUse hook intercepts the tool call before execution, providing deterministic enforcement to block unauthorized side effects. A PostToolUse hook fires after execution completes, meaning the draft would already be published before the check could reject it.
Question 183 of 360You are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports. During testing, the document-analysis subagent repeatedly fails validation because several extracted records lack a methodology summary. Logs show the subagent received only abstract pages for those papers, while the methodology sections are in separate files that were never provided to the subagent. What should the team change first?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Provide the missing methodology sources, and allow an unavailable value when no cited source is in context.
The extraction failed because the methodology information was completely absent from the provided context. Structured output and strict tool use enforce schema compliance for existing text, but they cannot manufacture missing facts or recover unread documents.
Question 184 of 360You 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. This team added a repository memory rule saying package publishing commands must include an approved ticket ID. In testing, Claude usually follows the rule, but occasionally runs a publishing command during broad automation requests without the ticket ID. The requirement is to prevent that command path while still allowing ordinary shell commands. What change best addresses this?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Add a PreToolUse hook for Bash that rejects publishing commands missing an approved ticket ID.
A PreToolUse hook intercepts Bash commands before execution, deterministically blocking publishing commands that lack a ticket ID. Relying on context rules or few-shot examples remains probabilistic and cannot guarantee that unauthorized commands are prevented.
Question 185 of 360Claude responds with stop_reason: "tool_use" and includes two client validate_extraction tool_use blocks in the same assistant turn. Your wrapper runs both validators, then starts a fresh request with only a plain text user message summarizing the results. What should the wrapper do instead so Claude can reason about the next extraction action?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Append the assistant tool_use response, then send one following user message containing both tool_result blocks matched by tool_use_id.
The application must preserve the assistant turn containing the tool use requests, then return the outputs as tool result blocks in the next user message. Matching each result to its original tool use ID ensures Claude correctly interprets the execution feedback.
Question 186 of 360You are using Claude Code to accelerate software development. Your team uses it for code generation, refactoring, debugging, and documentation. You need to integrate it into your development workflow with custom slash commands, CLAUDE.md configurations, and understand when to use plan mode vs direct execution. Your /review command uses detailed review criteria and a fixed output template. It still behaves inconsistently on unfamiliar refactors: sometimes it flags harmless local conventions as defects, and other times it misses real defects that differ from the examples in the checklist. What prompt change is the best next step?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Add diverse few-shot examples that show issue and non-issue reviews, with brief reasoning that marks the decision boundary.
Providing diverse few-shot examples teaches Claude the underlying judgment pattern rather than just memorizing surface wording. Including both issues and non-issues establishes clear decision boundaries, helping the model apply the criteria accurately to novel refactors.
Question 187 of 360You are using Claude Code to accelerate software development. Your team uses it for code generation, refactoring, debugging, and documentation. You need to integrate it into your development workflow with custom slash commands, CLAUDE.md configurations, and understand when to use plan mode vs direct execution. A custom /fix-ticket command uses an issue lookup MCP tool before editing code and generating a commit message. In testing, when a ticket title search returns several similar tickets, Claude Code sometimes continues with the newest ticket and implements the wrong request. What change should this team make to improve reliability?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Update the lookup tool description to require clarification when multiple candidate tickets are returned.
Updating the tool description to require clarification makes the ambiguity explicit to Claude. Selecting the newest or highest-ranked ticket relies on risky heuristics, whereas asking for a unique identifier guarantees the correct ticket is targeted.
Question 188 of 360You are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports. During evaluation, the synthesis agent receives a very long aggregated prompt containing subagent outputs in chronological order. Final reports consistently include findings from the earliest web-search results and the latest report instructions, but they omit several relevant document-analysis findings embedded deep in the aggregated input. What change would most directly improve report completeness without rerunning the research?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Move a concise findings-and-source map to the start of the synthesis prompt and keep detailed evidence under labeled sections.
Moving a concise findings map to the start directly mitigates the lost-in-the-middle effect where models ignore buried details. Simply increasing output length or adding reminders addresses adjacent symptoms without fixing the core context positioning problem.
Question 189 of 360You are using Claude Code to accelerate software development. Your team uses it for code generation, refactoring, debugging, and documentation. You need to integrate it into your development workflow with custom slash commands, CLAUDE.md configurations, and understand when to use plan mode vs direct execution. This team adds a custom MCP tool that creates issue-tracker tickets from stack traces. The ticketing service rejects a malformed project key, and the adapter must send the tool result back through the Messages API so Claude can recover. What should the adapter return?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Return a tool_result with is_error: true and JSON content containing errorCategory, isRetryable, a clear message, and a suggested valid key format.
Returning a tool result with is_error true and structured JSON provides the exact recovery metadata needed. Generic failures do not give Claude enough context to correct the malformed input and retry successfully.
Question 190 of 360You are using Claude Code to accelerate software development. Your team uses it for code generation, refactoring, debugging, and documentation. You need to integrate it into your development workflow with custom slash commands, CLAUDE.md configurations, and understand when to use plan mode vs direct execution. Your team's /doc-extract command produces valid JSON for an internal documentation catalog, but evals show a recurring issue: fields such as owner and minimum_supported_version are returned as null when the source document presents them in tables, YAML front matter, or narrative release notes. The fields are present in the source, but the command's prompt only describes the schema and says to extract all required fields. What change would most directly improve extraction consistency?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Add 3 to 5 relevant, diverse, structured examples showing varied source formats and the expected extracted output.
Adding diverse few-shot examples teaches Claude the extraction patterns needed across varied document structures. Simply lowering temperature or demanding no nulls does not solve the core comprehension gap when parsing tables and release notes.
Question 191 of 360You 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. During a pilot, the system described above sometimes runs Bash commands that modify files outside an approved workspace after engineers give broad cleanup requests. The workspace boundary is a non-negotiable rule: commands targeting paths outside the workspace must be stopped before they run, and Claude should receive feedback about the violation. What change should this team make?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Add a PreToolUse command hook for Bash that validates target paths and blocks out-of-workspace commands with feedback.
A blocking PreToolUse hook enforces the workspace boundary deterministically before the Bash command executes. PostToolUse hooks or system prompts react after the fact, which violates the strict requirement to stop out-of-workspace actions before they run.
Question 192 of 360You are using Claude Code to accelerate software development. Your team uses it for code generation, refactoring, debugging, and documentation. You need to integrate it into your development workflow with custom slash commands, CLAUDE.md configurations, and understand when to use plan mode vs direct execution. During a large refactor, this team wants Claude Code to run a database-migration reviewer, API compatibility reviewer, and test-coverage reviewer in parallel. The team also wants one place to resolve conflicting findings and decide which follow-up work to run. Which orchestration design best matches Claude Code's subagent model?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Have the main agent spawn the reviewers with Agent, pass each reviewer its needed context, collect summarized results, and synthesize follow-ups centrally.
Claude Code subagents run in isolated context windows and return summarized results to the caller. Keeping synthesis and routing in the main agent matches the documented hub and spoke pattern, avoiding the pitfalls of cross-chatting subagents.
Question 193 of 360You are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports. A custom MCP server exposes the citation database and document catalog that several subagents need during research runs. One developer added it with the default Claude Code MCP command on their laptop, but other teammates do not see the server when they clone the repository, and the team does not want credentials committed to source control. What should the team do?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Re-add the server with –scope project and commit the generated .mcp.json using environment-variable placeholders.
Project scope writes an MCP server configuration file to the repository root for easy team sharing. Using environment variable placeholders inside this file keeps sensitive credentials out of source control while standardizing the setup across user machines.
Question 194 of 360You are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports. A policy research team plans to process 60,000 research topics overnight as independent Messages API report-generation requests submitted through the Message Batches API. A pilot sample shows that the report-generation prompt sometimes omits required report sections and sometimes emits JSON metadata that downstream parsers reject. What is the best next step before submitting the full workload?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Turn the workflow into a prompt template, run representative edge-case evals with the same structured-output request shape, refine and re-run the prompt, then batch only after a synchronous dry run succeeds.
Running representative edge-case evaluations addresses both quality and parsing issues before submitting large batches. Relying solely on strict schema validation or blind prompt improvements ignores real-world failures that a synchronous dry run easily catches.
Question 195 of 360You are building a structured data extraction system using Claude. The system extracts information from unstructured documents, validates the output using JavaScript Object Notation (JSON) schemas, and maintains high accuracy. It must handle edge cases gracefully and integrate with downstream systems. In testing, the system reviews a 30-file document packet by sending every source file and every extracted JSON object to one review prompt. The reviewer often misses file-specific extraction errors and sometimes returns contradictory conclusions about packet-level totals. The team also needs intermediate review artifacts that can be logged and evaluated. What should it do?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Use explicit prompt chaining with file-level review calls, then run a separate integration call over the local findings.
Explicit prompt chaining breaks the review into smaller, inspectable steps, which reduces attention dilution from large contexts. A final integration call focuses on cross-file consistency after each file receives dedicated local analysis.
Question 196 of 360You 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. During a long legacy-system investigation, the main conversation repeatedly fills with file listings, search hits, and test logs. The lead engineer wants the main agent to keep coordinating the architecture understanding without losing important context to verbose exploration output. What change best addresses this problem?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Delegate code search and file discovery to the Explore subagent, and return concise findings to the main conversation.
Delegating code search to an exploration subagent moves high-volume output into a separate context window. This preserves the main conversation for high-level coordination without losing important architecture details to verbose exploration logs.
Question 197 of 360A subscription retailer's support platform team is reviewing its customer support resolution agent and finds that escalated support tickets often contain vague notes like "customer is upset about a refund". Human agents who receive these tickets cannot access the original chat, and downstream support tooling expects consistent handoff data. What implementation change best addresses the issue?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. Have the main thread issue the independent Agent calls in one assistant turn, then return all matching tool_result blocks together in the next user message.
Issuing multiple independent Agent tool calls in a single assistant turn allows the orchestrator to execute them concurrently. Grouping the returned tool result blocks in the next user message completes the parallel cycle, preventing the main thread from blocking on sequential subagent responses.
Question 198 of 360You are using Claude Code to accelerate software development. Your team uses it for code generation, refactoring, debugging, and documentation. You need to integrate it into your development workflow with custom slash commands, CLAUDE.md configurations, and understand when to use plan mode vs direct execution. A subscription retailer's support platform team is reviewing its customer support resolution agent and finds that escalated support tickets often contain vague notes like "customer is upset about a refund". Human agents who receive these tickets cannot access the original chat, and downstream support tooling expects consistent handoff data. What implementation change best addresses the issue?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Define an escalate_to_human client tool whose input_schema requires customer_id, root_cause, refund_amount, and recommended_action.
Defining an escalation client tool with a strict input schema forces the model to generate structured arguments for every handoff. This guarantees downstream systems receive consistent data, whereas relying on prompt instructions for ticket content remains purely probabilistic.
Question 199 of 360After a schema update, three extraction failures appear together: vendor alias resolution, service-date normalization, and invoice total reconciliation. Each failure touches the same parser module and shared test fixtures, and fixing one in isolation has repeatedly broken another. What Claude Code workflow should this team use next?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Start plan mode with all failing fixtures, shared schema constraints, and the validation command.
Because these parser failures share dependencies, plan mode allows Claude to inspect the codebase and propose a coherent strategy addressing all cross-effects upfront. Fixing independent issues sequentially often pollutes the context window and degrades results for unrelated tasks.
Question 200 of 360You are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports. The report-generation step consistently receives the same structured findings from the synthesis subagent, but its prose output varies: some reports keep one cited bullet per finding, while others merge findings, drop evidence excerpts, or move source dates into a footnote. The current instruction says, "Turn each finding into a concise cited bullet with complete source details." What change would most directly improve consistency of this transformation?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Add a short examples block showing representative finding inputs and ideal cited-bullet outputs, including edge cases.
Providing concrete input and output examples clarifies the exact transformation boundary that prose instructions leave ambiguous. Broad wording or configuration files fail to enforce strict structural mapping, and hooks are better suited for blocking side effects than formatting text.
Question 201 of 360You are using Claude Code to accelerate software development. Your team uses it for code generation, refactoring, debugging, and documentation. You need to integrate it into your development workflow with custom slash commands, CLAUDE.md configurations, and understand when to use plan mode vs direct execution. After a long refactor-planning conversation yesterday, a developer captured the Claude Code session ID in an environment variable named $session_id. They need to continue that specific prior conversation from a terminal command while also sending the first follow-up prompt. Which action should they take?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Run claude -p "Continue the refactor investigation from yesterday." –resume "$session_id"
Passing the captured session ID to the resume flag explicitly restores the exact prior conversation context before sending the new prompt. Putting the identifier inside the prompt text only passes a string to the model, failing to direct the CLI to load that session.
Question 202 of 360You are building a structured data extraction system using Claude. The system extracts information from unstructured documents, validates the output using JavaScript Object Notation (JSON) schemas, and maintains high accuracy. It must handle edge cases gracefully and integrate with downstream systems. During evaluation, invoices with conflicting stated totals and line-item sums often pass the review stage. The current flow asks Claude to extract the JSON, then sends a follow-up prompt asking it to check the prior extraction before the application runs schema validation. Which change best addresses this review blind spot while preserving the validation step?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Run a separate review request that receives the source document, extracted JSON, and explicit discrepancy criteria.
Providing the source document, extracted output, and explicit discrepancy criteria creates an isolated review pass that objectively audits the original extraction. A follow-up prompt in the same context risks confirmation bias, as the model often assumes its previous output is already correct.
Question 203 of 360You are building a structured data extraction system using Claude. The system extracts information from unstructured documents, validates the output using JavaScript Object Notation (JSON) schemas, and maintains high accuracy. It must handle edge cases gracefully and integrate with downstream systems. Validation runs show that the extractor still represents missing monetary amounts inconsistently, sometimes as null, sometimes as an empty string, sometimes as "N/A", and sometimes by omitting the field. A concise prose rule has already been added, but the same failure pattern continues. What should this team do next?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Add three to five tagged source snippet and expected JSON examples covering typical and edge-case missing values.
Providing concrete input and output examples is the most reliable way to enforce strict formatting rules and handle edge cases. Expanding abstract prose instructions often fails to correct nuanced mapping inconsistencies because the model lacks specific examples to anchor its behavior.
Question 204 of 360You are building a structured data extraction system using Claude. The system extracts information from unstructured documents, validates the output using JavaScript Object Notation (JSON) schemas, and maintains high accuracy. It must handle edge cases gracefully and integrate with downstream systems. The latest evaluation run reports 97.4% overall extraction accuracy across the validation set, and stakeholders want to reduce human review based on that result. What should this team do before changing the review policy?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Segment the evaluation by document type and extracted field before changing review thresholds.
Segmenting the evaluation by document type and field reveals concentrated failures that a high aggregate accuracy score easily masks. Relying solely on an overall metric might cause you to approve a release with critical errors in rarer document categories.
Question 205 of 360You are building a structured data extraction system using Claude. The system extracts information from unstructured documents, validates the output using JavaScript Object Notation (JSON) schemas, and maintains high accuracy. It must handle edge cases gracefully and integrate with downstream systems. During validation, an MCP tool detects that an extracted invoice date is impossible and that the stated line-item total does not match the extracted subtotal. The tool currently returns a normal result containing the text "validation failed," after which Claude sometimes repeats the same call and downstream systems sometimes treat the extraction as successful. What change would best improve recovery behavior?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Return a CallToolResult with isError set and structuredContent describing the error category, retryability, affected fields, and correction hint.
Returning a tool result with the error flag set and structured content gives Claude machine-readable context for recovery. Treating failures as normal text results causes loops because the model lacks the clear signal needed to understand the validation failure.
Question 206 of 360You 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. Evaluations show two recurring issues: report generation stalls on minor evidence questions, while prior attempts to broaden the synthesis role caused it to duplicate exploration work. What change best improves this design?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Give the synthesis subagent a narrow verify_fact tool and route broader investigation requests through the coordinator.
Providing a narrow verification tool allows the synthesis subagent to quickly resolve minor evidence questions without overstepping its role. Giving it broad exploration tools would duplicate work, while removing all tools causes unnecessary coordinator delays.
Question 207 of 360You are building a structured data extraction system using Claude. The system extracts information from unstructured documents, validates the output using JavaScript Object Notation (JSON) schemas, and maintains high accuracy. It must handle edge cases gracefully and integrate with downstream systems. Your extraction validator and downstream submission tools currently return tool_result blocks with is_error set to true, but the content is always "Operation failed" for schema validation failures, malformed source values, service timeouts, and permission denials. Logs show Claude retries some non-retryable failures and escalates some retryable failures inconsistently. What change best improves recovery behavior?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Return structured tool_result errors with failure category, retryability, message, and corrective guidance.
Structured tool results provide the exact failure category, retryability, and corrective guidance Claude needs to choose the right next step. Generic error messages force the model to guess, causing inappropriate retries or escalations that break the workflow.
Question 208 of 360You are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports. During testing, earlier research steps return source-rich findings to the coordinator, but the synthesis subagent often produces uncited summaries. The synthesis delegation currently says: "Use the research gathered so far to draft a cited report." What change should this team make?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Pass the relevant findings and source metadata directly in the synthesis task message.
Passing the relevant findings and source metadata directly in the task message gives the subagent the required data. Subagents operate with isolated context windows, so they cannot automatically read the previous research transcripts stored by the coordinator.
Question 209 of 360You 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. Production traces show the agent sometimes runs a workspace-changing Bash command before confirming the intended project root with Read or Grep, even though the system prompt says this check is required. What change would most reliably enforce the required ordering?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Add a PreToolUse prerequisite gate that denies Bash until the project root check has been recorded.
A PreToolUse gate intercepts the request before execution, allowing you to programmatically block unsafe tool calls. System prompts and few-shot examples are behavioral suggestions, meaning the model might still bypass the required ordering under complex conditions.
Question 210 of 360You are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports. The search and document-analysis subagents are being connected to separate MCP servers for scholarly search, internal document access, and citation export. A design proposal says the runtime should pick one server as active for a subagent, then reconnect when the subagent needs a tool from another server. What should you recommend instead?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Connect each required MCP server for the subagent, list tools after each connection, and expose a unified registry while routing calls to the owning server.
Connecting to all required servers simultaneously allows the host to aggregate tools into a unified registry for the subagent. Switching between single active servers creates unnecessary connection overhead and limits the agent from chaining tools effectively.
Question 211 of 360You are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports. During evaluation, the web-search subagent sometimes hits transient network errors after finding a few useful sources. The coordinator only receives a generic failure message and either stops the report or omits the section. What change best improves resilience while preserving subagent isolation?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Have the search subagent retry transient failures locally, then return attempted queries, unresolved error context, and any partial sources.
Local retries keep transient recovery inside the worker while returning partial sources and errors gives the coordinator enough context to proceed. Avoid having the parent inspect intermediate tool calls, because that breaks subagent isolation and defeats the purpose of delegation.
Question 212 of 360You are building a structured data extraction system using Claude. The system extracts information from unstructured documents, validates the output using JSON schemas, and maintains high accuracy. It must handle edge cases gracefully and integrate with downstream systems. A regional hospital network's claims automation team is building a structured data extraction workflow. During extraction, some records require escalation because the source document conflicts with account data. Reviewers will not receive the full model conversation or tool history, and the receiving queue requires the escalation packet to be the model's final response rather than tool-call arguments. It needs consistent JSON with customer identifiers, suspected root cause, and recommended next action. What design should this team use?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Generate a schema-validated escalation packet with Structured outputs as the final reviewer handoff.
Structured outputs generate schema-validated JSON as the final response, satisfying the queue requirements without relying on hidden tool history. Option A fails because a tool call yields arguments rather than the required final text response.
Question 213 of 360You are building a structured data extraction system using Claude. The system extracts information from unstructured documents, validates the output using JSON schemas, and maintains high accuracy. It must handle edge cases gracefully and integrate with downstream systems. A validation rollout starts failing because downstream code still expects the old extraction field name insured_party. You do not know which files reference that field, and the file names do not include it. What is the most appropriate first Claude Code tool action?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Use Grep to search repository file contents for the exact insured_party reference.
Use Grep to search file contents when you know the target string but not the specific files. Glob fails here because it only matches file paths and names, while Bash is less efficient than dedicated built-in tools.
Question 214 of 360You 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 built-in tools like Read, Write, Bash, Grep, and Glob, and integrates with Model Context Protocol (MCP) servers. A platform engineering team is running an automated codebase inventory, and the agent extracts endpoint metadata from a legacy router file into JSON for downstream tooling. Your validator rejects the extraction because one required field is missing, one enum value is invalid, and one handler name does not appear in the source. What follow-up request design is most appropriate for the retry?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Send a new Messages API request with XML-tagged sections for the original document, rejected JSON, validator errors, and instructions to return only corrected structured data.
Because the API is stateless, a retry must include the original document, rejected output, and exact errors so Claude can repair against concrete evidence. Using XML tags separates these mixed content types, which is much more reliable than simply asking the model to be more careful.
Question 215 of 360You are using Claude Code to accelerate software development. Your team uses it for code generation, refactoring, debugging, and documentation. You need to integrate it into your development workflow with custom slash commands, CLAUDE.md configurations, and understand when to use plan mode versus direct execution. A payments platform engineering team is running a multi-hour refactor investigation. Claude Code correctly identifies several legacy payment-flow dependencies early on. After many file reads, searches, and a compaction step, later answers start omitting those dependencies and referring to typical patterns instead of the specific findings. Which change would best preserve the investigation state for subsequent questions?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Have the investigation agent maintain a concise investigation-notes.md file of confirmed dependencies and read it before follow-up questions.
Writing a durable notes file gives Claude a stable place to store confirmed findings outside the active context window. Reading this file before follow-up questions reliably restores specific state after long sessions or compaction, whereas plan mode does not preserve tool outputs.
Question 216 of 360You are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports. The team has added a lengthy checklist for producing patent landscape reports to the root memory file. It includes step-by-step source triage, claim grouping, citation formatting, and final report assembly, but it is relevant only to a small subset of research tasks. Developers notice unrelated Claude Code sessions now carry this specialized procedure as context. What should the team do?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Move the patent landscape procedure into a SKILL.md-based skill and keep only universal research conventions in CLAUDE.md.
Move specialized procedures into a skill file so the context loads only when that specific workflow is triggered. Keep universal project rules in your root memory file to prevent bloating unrelated sessions with unnecessary tokens.
Question 217 of 360You 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 built-in tools like Read, Write, Bash, Grep, and Glob, and integrates with Model Context Protocol (MCP) servers. A developer productivity team uses the Claude Messages API during codebase exploration to produce a dependency map consumed by an internal dashboard. The current prompt says, Return only JSON matching this schema, but logs show occasional trailing commentary, missing fields, or string values where arrays are expected, causing parser failures. The dashboard integration is designed to consume a tool call rather than free-form assistant text. What change would most reliably enforce schema-compliant output?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Define a client tool in the tools array with input_schema, set strict: true, and force that tool with tool_choice.
Forcing a strict tool call guarantees the output exactly matches your schema and prevents the model from returning standard text. Relying on prompt instructions or prefills still leaves room for formatting errors and hallucinated commentary.
Question 218 of 360You are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports. You need to add two evaluation workflows: a blocking citation-quality gate that must return pass or fail before a pull request can merge, and a weekly audit over 40,000 completed reports whose results are reviewed the next morning. Which API approach best fits these requirements?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Use POST /v1/messages for the merge gate, and submit the weekly audit through the Message Batches API with custom_id values.
The merge gate needs low latency, so use a synchronous message call. The massive weekly audit is asynchronous, making the batches API with custom tracking IDs the correct choice to handle high volume without timing out.
Question 219 of 360You are building a structured data extraction system using Claude. The system extracts information from unstructured documents, validates the output using JSON schemas, and maintains high accuracy. It must handle edge cases gracefully and integrate with downstream systems. This team is using Claude Code to update the extraction repository. Which task is the best fit for plan mode before implementation rather than asking Claude to make the change directly in default mode?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Have Claude explore the existing invoice extraction flow, then propose a migration plan for changing how ambiguous totals are represented.
Plan mode is ideal when a change might impact multiple parts of a system, like altering data representation across parsing logic and schemas. Skip plan mode for trivial single-line edits like fixing typos or adding a basic log statement.
Question 220 of 360You are building a structured data extraction system using Claude. The system extracts information from unstructured documents, validates the output using JSON schemas, and maintains high accuracy. It must handle edge cases gracefully and integrate with downstream systems. During pilot testing, one submitter writes, "Stop the automated review and send this document to a person," even though the missing field is easy to extract. Another submitter writes, "The invoice date is missing, can you fix it?" and the source document contains a clear date. What escalation policy should this team implement?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Route explicit human requests directly to review, and offer automated repair for straightforward correction requests.
Always route explicit human requests to review immediately to respect user intent. Offer automated repair for straightforward corrections when escalation is not demanded, rather than relying strictly on confidence or sentiment scores.
Question 221 of 360You are using Claude Code to accelerate software development. Your team uses it for code generation, refactoring, debugging, and documentation. You need to integrate it into your development workflow with custom slash commands, CLAUDE.md configurations, and understand when to use plan mode vs direct execution. A new developer says Claude Code is not applying the repository's TypeScript and testing conventions. The senior engineer can reproduce the conventions on their own machine, but the new developer cannot, and the team is unsure whether the relevant instruction files are actually visible in the new developer's session. What should you do first to diagnose the configuration hierarchy issue?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Run /memory in the new developer's session and inspect the loaded instruction files.
The /memory command reveals exactly which CLAUDE.md files are loaded in a session, making it the ideal tool for this diagnosis. Use /status only when troubleshooting settings files rather than memory files.
Question 222 of 360You 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. The team is adding a pull request review job with Claude Code GitHub Actions. Early reviews ignore the repository's testing standards, fixture naming conventions, and criteria for when style comments are worth reporting. The guidance must be shared with developers and available to Claude Code during CI runs. What should the team do?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Commit a repository-root CLAUDE.md containing the testing standards, fixture conventions, and review criteria.
Committing a repository root memory file ensures that both local developers and automated CI runs automatically load the shared project rules. Workflow prompt inputs are better suited for transient instructions rather than durable team standards.
Question 223 of 360You 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. A developer productivity team is building a Messages API tool-use implementation for codebase assistance. During testing, developers ask questions such as "find a simpler name for this helper" and "search your reasoning for edge cases," and Claude calls a repository grep tool or an MCP repository search tool even when no codebase lookup is needed. The tool descriptions already state that these tools are for inspecting repository contents or MCP-provided project data, and the request uses the default tool_choice behavior. The system prompt includes: "Whenever a user says find, search, locate, or look up, use a search tool before answering." What change should you make first?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Replace the broad keyword rule with a narrower instruction to use search tools only when repository or MCP data must be inspected.
Replacing the broad keyword rule directly fixes the system prompt instruction that is incorrectly forcing tool use. Broad keyword triggers can easily override clear tool descriptions, so narrowing the instruction to actual data lookup ensures tools are only called when needed.
Question 224 of 360You 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. This team built a PR-review helper around Claude Code. It runs after every push and posts inline GitHub comments, but later runs often repeat findings that were already raised in earlier runs. The team wants repeated reviews to remain useful without hiding issues that are still present. What should they change?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. Persist previous PR findings and pass them into each rerun, instructing Claude to report only new or still-unaddressed issues.
Persisting previous findings gives each review run the context needed to distinguish resolved, still-open, and newly introduced issues. Matching only by line number or ignoring files is too brittle and can easily hide newly introduced defects in previously reviewed code.
Question 225 of 360You are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports. This team uses Claude Code while maintaining the repository for the system described above. They want citation and source-handling conventions to be shared by every developer, report-generator guidance to apply only when working in the report agent's directory, and personal editor preferences to remain private. Which configuration approach best matches Claude Code's memory hierarchy?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Put shared conventions in root CLAUDE.md or .claude/CLAUDE.md, put report-agent guidance in that directory's CLAUDE.md, and keep personal preferences in ~/.claude/CLAUDE.md.
This correctly uses the documented Claude Code memory hierarchy by placing team conventions in the root file and personal preferences in the user file. Lower-level files do not replace parent files but are combined, so relying on overrides or shared user files fails.
Question 226 of 360You are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports. The coordinator completed an investigation yesterday and saved a session containing web-search outputs, document-analysis tool results, synthesis notes, and report-generation drafts. Since then, the document corpus was reindexed, several source documents were updated, and a reviewer corrected which prior findings remain valid. The team wants the next run to preserve only the valid analysis decisions while avoiding outdated observations from yesterday's tools. What should the coordinator do next?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Start a fresh session and inject a structured summary of validated findings, decisions, and sources to recheck.
Starting a fresh session avoids carrying stale tool results and outdated documents back into the model context. Injecting a structured summary preserves validated findings without risking hallucination from instructing the model to ignore old context.
Question 227 of 360You 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. During a manual orchestration test, Claude returns stop_reason tool_use with two tool requests, one for reading a file and one for searching related symbols. The application executes both operations, but the following Claude response does not incorporate the retrieved file contents or search matches. Which change should this team make to the loop?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. Append the assistant message with the tool requests, then append one user message containing both matching tool results before the next request.
Appending the assistant message and then a single user message with both tool results maintains the exact conversation state required. The API expects all tool results for a given turn to be returned together in one user message so the model can map them correctly.
Question 228 of 360You are using Claude Code to accelerate software development. Your team uses it for code generation, refactoring, debugging, and documentation. You need to integrate it into your development workflow with custom slash commands, CLAUDE.md configurations, and understand when to use plan mode vs direct execution. After adding two MCP servers, Claude Code often calls a documentation search tool when developers ask about symbols in the repository, and calls a repository search tool when developers ask about framework policy pages. The tool names are distinct, and both tools support search-like queries. What should the team change first to improve tool selection reliability?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Rewrite each tool description to define use cases, non-use cases, input formats, example queries, returned data, and edge cases.
Tool descriptions are the highest-leverage signal Claude uses when deciding which tool to call. Broad instructions or tool renames do not directly repair the model's decision boundary between overlapping tools like explicit descriptions do.
Question 229 of 360You are building a structured data extraction system using Claude. The system extracts information from unstructured documents, validates the output using JavaScript Object Notation (JSON) schemas, and maintains high accuracy. It must handle edge cases gracefully and integrate with downstream systems. The extraction coordinator has specialized agents for table parsing, clause extraction, and schema repair, but its SDK configuration only auto-approves file inspection tools. It keeps performing all extraction work itself instead of delegating focused subtasks. What change should this team make?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Add Agent to the coordinator's allowedTools or allowed_tools configuration.
The documented tool for spawning a subagent is Agent, and SDK configurations must include it in allowed tools for auto-approval. Simply allowing the subagent names directly will fail to trigger the native delegation tool without explicit invocation setups.
Question 230 of 360You are building a structured data extraction system using Claude. The system extracts information from unstructured documents, validates the output using JavaScript Object Notation (JSON) schemas, and maintains high accuracy. It must handle edge cases gracefully and integrate with downstream systems. The team adds client tools named classify_document, extract_candidate_fields, validate_extraction, and queue_human_review. The documents differ enough that some records need several validation passes, some should be routed to review, and some requests may not need any tool call. Which design best lets Claude adapt its next action to each document while keeping the application responsible for execution?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. Define the tools with clear descriptions and schemas, then run a loop that executes each tool_use request and returns matching tool_result blocks.
This uses the documented tool use contract where Claude decides which client tools to call, while the application executes them. Fixed controllers or forced tool choices prevent the model from dynamically adapting its path based on the document.
Question 231 of 360You are building a structured data extraction system using Claude. The system extracts information from unstructured documents, validates the output using JavaScript Object Notation (JSON) schemas, and maintains high accuracy. It must handle edge cases gracefully and integrate with downstream systems. The research team splits long documents across extraction subagents. In validation, the synthesizer combines several extracted statistics into a single trend, and reviewers later find that two values reflected different collection periods and measurement methods. Logs show each extraction subagent returned a concise prose summary of relevant findings. What change most directly improves synthesis reliability?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Require each subagent to return structured evidence records with the claim, source location, document date, and method context.
Requiring structured evidence records directly improves the handoff by preserving provenance and methodology before summarization compresses the details. Downstream synthesis only receives what the coordinator passes forward, so prose summaries often lose critical context.
Question 232 of 360You are using Claude Code to accelerate software development. Your team uses it for code generation, refactoring, debugging, and documentation. You need to integrate it into your development workflow with custom slash commands, CLAUDE.md configurations, and understand when to use plan mode vs direct execution. This team wants to run nightly pull request reviews through the Message Batches API. Each review may require an application-hosted client tool, run_repo_checks, that executes local linters and unit tests before Claude writes final feedback. Which design best handles this workflow?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Submit the review prompts as batch items, retrieve any tool_use results by custom_id, run the requested client tools, and send follow-up requests with tool_result blocks.
The Message Batches API processes asynchronously, so your application must execute any client tools after retrieving the initial results. You then send follow-up requests containing the tool results to complete the workflow. Batch workers cannot execute local code directly.
Question 233 of 360You are using Claude Code to accelerate software development. Your team uses it for code generation, refactoring, debugging, and documentation. You need to integrate it into your development workflow with custom slash commands, CLAUDE.md configurations, and understand when to use plan mode vs direct execution. The repository already includes a shared project skill at .claude/skills/code-review/SKILL.md. You want your own stricter review workflow available across your projects, but you do not want to change teammates' behavior or shadow the existing /code-review skill. What should you do?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Create ~/.claude/skills/my-code-review/SKILL.md and invoke it as /my-code-review.
Placing a uniquely named skill directory under the personal tilde slash claude path ensures it remains private to you and avoids overriding the shared project skill. Project-level files are shared, whereas user-level files apply only to your local machine.
Question 234 of 360You are using Claude Code to accelerate software development. Your team uses it for code generation, refactoring, debugging, and documentation. You need to integrate it into your development workflow with custom slash commands, CLAUDE.md configurations, and understand when to use plan mode vs direct execution. A CI job will ask Claude Code to review a pull request and automatically post each finding as an inline comment. The downstream script needs predictable fields such as file path, line number, severity, and message, while Claude Code may still need to inspect the repository before producing the final findings. Which implementation is most appropriate?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. Run claude -p with –output-format json and –json-schema, then parse structured_output for the PR comment payload.
Using print mode with a JSON schema strictly enforces the required fields for the downstream script by returning guaranteed valid data in structured output. Plain text outputs lack programmatic reliability and break easily in automated pipelines.
Question 235 of 360You are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports. During a long debugging session, the final report sometimes loses citations that were present in earlier web-search and document-analysis outputs. The team wants Claude Code to investigate specific questions such as where citations are stored, where synthesis rewrites occur, and which tests cover report generation, while keeping the main conversation focused on coordination rather than raw search logs and file contents. What workflow best supports this goal?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. Delegate focused read-only investigations to subagents, then use their returned summaries in the main conversation.
Delegating focused read-only investigations to subagents isolates the noisy exploration logs from the main coordination thread. Pasting full transcripts directly into the main conversation defeats this goal by consuming context window space with irrelevant details.
Question 236 of 360You 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. The team is adding a CI command that reviews changed files and posts inline suggestions. The PR bot must receive a JSON object matching an application schema with fields for file, line, severity, and message, and it should fail rather than post malformed comments if Claude cannot produce valid data. The job also needs run metadata for accounting. Which implementation should they use?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Run Claude Code with -p, –output-format json, and –json-schema, then read the validated result from structured_output.
Print mode with JSON output and a schema ensures the PR bot receives strictly validated data inside structured output while retaining top-level metadata. Without schema enforcement, relying on prompt instructions alone risks posting malformed comments.
Question 237 of 360You 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. During a month-long exploration of a legacy billing module, the agent's running summaries start changing exact requirements such as "refund retry limit is 3," "SLA is 99.95%," "migration cutoff is 2026-06-30," and "support promised no customer-visible schema changes" into phrases like "limited retries," "high availability," "upcoming cutoff," and "avoid disruptive changes." What change should the team make to reduce the risk of incorrect follow-up edits?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Maintain a structured scratchpad of exact facts that is updated separately from compacted conversation history.
Maintaining a separate structured scratchpad of exact facts protects critical numerical values from being degraded during conversation compaction. Relying on generalized summaries inevitably leads to broken logic when precise constants are required.
Question 238 of 360You are building a structured data extraction system using Claude. The system extracts information from unstructured documents, validates the output using JSON schemas, and maintains high accuracy. It must handle edge cases gracefully and integrate with downstream systems. Validation logs show the JSON is syntactically valid, but the review queue is flooded with invoice anomaly flags. Many flags involve harmless formatting differences, while some arithmetic mismatches are missed. The current instruction says, "Find any questionable totals and flag them for review." What prompt change would most directly improve consistency?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Replace the vague flagging instruction with measurable rules for when parsed line items conflict with stated totals.
Replacing subjective instructions with specific, measurable rules eliminates ambiguity and ensures consistent flagging of arithmetic mismatches. Broad instructions cause the model to guess inconsistently, leading to false positives and missed errors.
Question 239 of 360You 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. The team extracts structured refactor candidates from legacy source files after using Read and Grep. The JSON schema now prevents malformed JSON, but logs still show two issues: some responses return with stop_reason: "max_tokens", and some schema-valid findings cite line numbers that do not exist in the referenced file. What should the extraction loop do to improve reliability?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. Check stop_reason, retry truncated generations with a larger output limit, then return specific semantic validation errors for correction.
Checking the stop reason handles truncation by prompting a retry with an expanded token limit. Relying solely on syntax validation fails here because semantic validation is required to catch nonexistent line numbers and correct the model.
Question 240 of 360You 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. During an automated refactor, an Edit call fails because the supplied old_string appears multiple times in the same source file. The intended change is a one-off modification to the file's final content, not a replacement of every matching snippet. After the system has tried to make the exact old_string unique with surrounding context and can construct the full desired file contents, what should it do next to make the modification reliably?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. Read the current file, construct the complete desired file contents, then overwrite it with Write.
Reading the file and using the Write tool to overwrite it with the exact desired contents provides a reliable last-resort edit when exact matching fails. Using replace all incorrectly modifies every matching snippet instead of making a single targeted change.
Question 241 of 360You 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. A compliance review finds that, in rare pull requests, the system posts an approving review before the required test-result artifact has been attached. The rule is non-negotiable: approval actions must not execute unless the artifact is already present and passing. What change should this team make?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Add a PreToolUse command hook that denies approval commands when the passing artifact is absent.
A PreToolUse command hook runs before execution, providing deterministic control to block forbidden actions. PostToolUse fires too late, while relying on system prompts leaves enforcement up to unpredictable model compliance.
Question 242 of 360You 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. Long pull requests are causing the review step to run near the context limit. The trace shows each file-analysis tool call appends a large tool_result payload with build metadata, ownership data, full lint output, historical CI runs, and dependency details, even though the reviewer uses only a small subset of those fields. What change best addresses the reliability issue?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Change the tool wrapper to return compact, review-specific tool_result payloads with only the fields needed.
Tool results consume context window space, so shaping tool output before returning it preserves room for critical evidence. Prompt caching reduces latency, but cached tokens still count against the context limit.
Question 243 of 360You 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 support platform uses the Messages API client tool-use loop. During beta testing, policy requires refunds above $500 to be reviewed by a human. In several high-emotion billing disputes, the agent emits a process_refund tool_use request for amounts above that threshold after lookup_order, and the application executes the request. What change would most effectively enforce the workflow requirement?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Add an application-side guard that blocks over-threshold process_refund calls and routes the case to escalate_to_human.
The application boundary is the correct place to enforce non-negotiable business rules for client-executed tools. Validating the outgoing tool call before execution deterministically prevents high-impact errors that relying on prompts cannot guarantee.
Question 244 of 360You 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 three months, the system described above assigns a high confidence score to most structured review findings and generated test recommendations. Manual review capacity is being reduced, but the team still needs to measure production error rates and catch rare failure modes in areas like migrations, security-sensitive changes, and language-specific conventions. What monitoring approach best fits this goal?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Sample high-confidence findings within strata for change type, component, language, and finding category, then label errors and novel patterns separately.
Stratified sampling preserves visibility into high-confidence outputs while focusing limited reviewer capacity on meaningful production segments. Sampling by change type or language helps reveal hidden pockets of poor performance that aggregate metrics miss.
Question 245 of 360You are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports. The document-analysis subagent uses client-side tools to read licensed reports and extract evidence. When a report is unavailable, the tool returns a tool_result with is_error: true, but the content is always "Operation failed", whether the cause is an expired license, a temporary timeout, an unsupported file format, or a valid search with no matching passages. The coordinator then either retries, drops the source, or escalates unpredictably. What change would best improve recovery behavior?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Return categorized tool_result errors with retryability, cause, attempted input, and suggested recovery.
Claude reasons directly from tool result content. Categorized errors allow the coordinator to distinguish retryable failures from valid empty results. Masking failures as empty sets removes the context needed for proper recovery.
Question 246 of 360You are using Claude Code to accelerate software development. Your team uses it for code generation, refactoring, debugging, and documentation. You need to integrate it into your development workflow with custom slash commands, CLAUDE.md configurations, and understand when to use plan mode vs direct execution. The team's /release-note workflow rewrites raw commit messages into customer-facing changelog entries. Reviewers notice inconsistent transformations: internal ticket IDs sometimes remain, breaking changes are sometimes softened into vague language, and terse bug-fix commits are sometimes expanded with unsupported details. What change would most directly improve consistency for this workflow?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Add three representative before-and-after examples, including edge cases, in a clearly tagged examples section.
Concrete input and output examples teach the desired transformation boundary much better than prose alone. Plan mode outlines strategy but does not enforce the specific formatting rules needed for consistent transformations.
Question 247 of 360You 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 nightly pull request check for this team invokes Claude Code to inspect changes to refund and escalation logic. In CI, the job prints the prompt and then waits until the runner times out because there is no terminal user to answer follow-up prompts. What change best prevents this failure mode?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Run Claude Code with the -p or –print flag and provide the review prompt non-interactively.
The print flag processes a prompt and exits without waiting for terminal input. Configuration files tell Claude what to know but do not prevent unattended pipelines from hanging when the system requests human interaction.
Question 248 of 360You 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. The repository's main instruction file has grown to more than 400 lines and mixes review tone, test conventions, API design rules, and deployment checklist guidance. CI runs show that Claude Code is applying deployment guidance to routine unit test reviews and sometimes missing the test-specific criteria developers care about. What change should this team make to reduce irrelevant context while keeping shared review standards available?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Move topic-specific guidance into Markdown files under .claude/rules/ and add paths frontmatter for rules that apply only to matching files.
Path scoped rules load only when Claude works with matching file patterns preventing deployment noise during test reviews. Imports still expand into context at launch so they organize files for humans without reducing actual context size.
Question 249 of 360You are using Claude Code to accelerate software development. Your team uses it for code generation, refactoring, debugging, and documentation. You need to integrate it into your development workflow with custom slash commands, CLAUDE.md configurations, and understand when to use plan mode vs direct execution. This team is adding SDK-managed subagents for code review and documentation work. They want Claude to route work to the right subagent based on its purpose, and they want the documentation subagent to read files but not edit or run commands. Which configuration should they use?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Define a programmatic agents map keyed by subagent type, set each description and prompt, and give the documentation subagent a read-only tools allowlist.
The AgentDefinition uses the map key for routing and the tools field as a strict allowlist. Top level settings auto approve tools but do not restrict the subagent from using others making it unsafe for read only tasks.
Question 250 of 360You 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. The coordinator delegates pull request review work to separate subagents for security, test coverage, and maintainability. Each subagent returns useful findings to the coordinator, but the final review summary often omits specific file paths, failing test names, and evidence snippets that the coordinator already received. What change best addresses this reliability issue?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Pass each prior subagent's complete structured findings directly into the review synthesis subagent's prompt.
Subagents are isolated instances so you must pass required facts into their prompts explicitly. Inferring details from parent history fails because the synthesis agent lacks access to that earlier conversation context.
Question 251 of 360You 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. During a PR review run, the main session reads the changed files, notes a failing test, and then delegates to an ordinary named security-review subagent, not a fork. The subagent returns generic findings and misses PR-specific evidence from the diff and test output. What change would most directly improve the review's reliability?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Include the changed files, key diff excerpts, failing test output, and review criteria in the subagent prompt.
Non fork subagents start with isolated context so the delegation prompt must carry the necessary facts. Compacting the parent conversation does not pass context down and the agent cannot read transcripts automatically.
Question 252 of 360You are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports. Recent evaluations show that the final report sometimes treats the same source as both confirming and contradicting a claim, and reviewers find that unsupported claims in long source bundles are missed. The team also wants review checkpoints it can log and score before the report is generated. What should the team do?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Run an explicit prompt chain with source-level review passes, then run a separate integration pass over the reviewed findings.
Prompt chaining creates inspectable intermediate artifacts for logging and dedicated conflict reconciliation. Relying on confidence scores or duplicating overloaded reviewers does not solve the underlying context rot degrading accuracy.
Question 253 of 360You 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. This team's CI review prompt flags possible policy violations and requires each finding to include a policy_section and supporting_quote. A pull request adds retention logic for customer support transcripts, but the only policy excerpt provided to Claude covers application logs and analytics events, with no transcript policy. The validator rejects Claude's finding because supporting_quote is empty. What should the pipeline do?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. Return an insufficient information result and require a supporting quote before posting the finding.
Returning an insufficient information result correctly handles the missing supporting quote, as the provided source lacks transcript policy. Retrying the prompt cannot create policy evidence that was never supplied in the context.
Question 254 of 360You 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. During a billing dispute flow, Claude requests get_customer and lookup_order in the same assistant turn. The get_customer call succeeds, but lookup_order intermittently times out. Production logs show two attempted fixes: one wrapper returns an empty order list as a successful lookup, while another aborts the entire conversation whenever lookup_order fails. What change best addresses the reliability issue? Correct answer
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. Return tool results for both calls, flag lookup_order with is_error: true, and continue from partial context.
Flagging the timed-out tool with is_error true preserves the tool result protocol while giving Claude accurate context to escalate or retry. Masking the timeout as an empty list tricks the model into assuming no orders exist, causing flawed logic.
Question 255 of 360You are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports. During evaluation, the final reports are well written but sometimes include unsupported claims and miss contradictions between sections. The current design asks the report generator to review its own draft before publishing. What architecture change would most effectively improve review reliability? Correct answer
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. Run independent reviewer agents on section-specific claim-source bundles, then run a separate integration pass for conflicts and coverage gaps.
Running independent reviewer agents on section-specific bundles reduces self-reinforcing context errors. Relying on a single integration pass by the synthesis agent misses cross-section contradictions because it lacks independent verification.
Question 256 of 360You are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports. A university library's multi-agent research system routes tasks to MCP-backed web search and document analysis subagents. During evaluation, the coordinator often sends literature-review tasks to the web search subagent when the user asked for analysis of uploaded PDFs, and sends web-currentness tasks to the document analysis subagent. The tool implementations work correctly once called. Which tool-definition change should this team make first to improve selection reliability?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Rewrite each tool definition with detailed descriptions covering use cases, non-use cases, inputs, returned data, and caveats.
Rewriting tool definitions with detailed use cases and boundaries is the highest-leverage fix for incorrect tool selection among similar capabilities. Shorter names or isolated examples do not provide the clear decision boundaries the model needs.
Question 257 of 360You are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports. During evaluation, final reports cite sources but sometimes treat a peer-reviewed study, a vendor benchmark, and an internal survey as equivalent evidence for the same claim. The search and document-analysis subagents currently return concise finding summaries plus a general list of sources consulted. What change best supports accurate downstream synthesis?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Require each subagent to return structured claim records with source location, publication date, evidence excerpt, and methodology notes.
Requiring structured claim records forces subagents to pass provenance and methodology to the synthesizer explicitly. Relying on concise summaries permanently destroys the underlying evidence needed to weigh conflicting claims.
Question 258 of 360You are using Claude Code to accelerate software development. Your team uses it for code generation, refactoring, debugging, and documentation. You need to integrate it into your development workflow with custom slash commands, CLAUDE.md configurations, and understand when to use plan mode vs direct execution. A custom /parallel-review command starts an SDK run in a repository pinned to a pre-v2.1.63 Claude Code configuration where subagent delegation is performed with Task. It should fan out across specialized review subagents. The current SDK options auto-approve only Read, Grep, and Glob, and each run pauses at the first attempted subagent delegation with an interactive permission prompt. What should the team change?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. Add Task to the coordinator SDK run's allowedTools or allowed_tools list.
Adding Task to the allowed tools list authorizes the coordinator to execute subagent delegation without pausing. Adding Agent only to worker subagents fails because the interactive pause happens before workers are ever spawned.
Question 259 of 360You are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports. During evals, the synthesis phase is given access to two client tools: analyze_content for web search snippets and analyze_content_docs for uploaded PDFs. The model frequently calls the PDF-oriented tool on search results and the web-oriented tool on document excerpts. Both tool descriptions are nearly identical, saying only that the tool analyzes content and returns key findings. The team must keep separate web-snippet and PDF-specific analyzers exposed for separate output contracts and audit logging. What change would most effectively reduce the wrong-tool calls?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Rename the tools with source-specific names, rewrite each description with use and non-use boundaries, and update the dispatcher for the new names.
Renaming the tools with source-specific names and defining clear use boundaries directly resolves overlapping description ambiguity. Merging them into a generic tool violates the requirement to maintain separate output contracts and audit logs.
Question 260 of 360You are using Claude Code to accelerate software development. Your team uses it for code generation, refactoring, debugging, and documentation. You need to integrate it into your development workflow with custom slash commands, CLAUDE.md configurations, and understand when to use plan mode vs direct execution. This team is adding a custom MCP server and client-side integration for engineering reference material. Developers want the host to present a browsable list of design docs, runbooks, database schemas, and architecture notes, then attach selected content to Claude's context only when needed. They do not want Claude to spend turns calling exploratory functions just to discover what exists. What design best matches MCP's control model?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Declare the server's resources capability, expose catalog metadata through resources/list, and read selected URI contents with resources/read.
Using MCP resources lets the host application control context attachment via list and read primitives. Forcing Claude to call discovery tools wastes conversation turns and directly violates the team's context loading requirement.
Question 261 of 360You are using Claude Code to accelerate software development. Your team uses it for code generation, refactoring, debugging, and documentation. You need to integrate it into your development workflow with custom slash commands, CLAUDE.md configurations, and understand when to use plan mode vs direct execution. The team wants a reusable workflow for adding comprehensive tests to unfamiliar legacy modules. The work usually begins with reading the module, but the next steps vary depending on discovered dependencies, existing test patterns, and whether code seams exist. They care more about producing useful coverage than minimizing latency. What orchestration choice best fits?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Use dynamic adaptive decomposition so Claude inspects the module, creates subtasks from findings, and synthesizes the test plan.
Dynamic adaptive decomposition is optimal for unfamiliar legacy code because subtasks depend on discovered dependencies. Fixed prompt chaining fails because it assumes a rigid sequence of steps that may not apply to the specific module.
Question 262 of 360You 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. PR reviews are producing false positives because migration-specific review criteria are being applied to frontend and documentation changes. Migration files can appear under several packages, such as services, apps, and shared libraries. What change should this team make so those conventions are loaded only when Claude reads relevant files?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Add .claude/rules/database-migrations.md with YAML frontmatter paths: ["**/migrations/**/*.{sql,ts}"] and place the migration review checklist there.
Using YAML frontmatter in a rules file correctly scopes the migration checklist to relevant file paths, preventing false positives. Placing rules in the root CLAUDE.md applies them globally, which continues to generate irrelevant review noise.
Question 263 of 360You are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports. Benchmark runs on broad topics are slow and produce uneven coverage. Logs show the coordinator asks one specialist to research every dimension, passes a compressed prose summary to the next specialist, and only then asks for the final report. The relevant dimensions are known at the start and do not depend on one another. What design change best improves latency and coverage while preserving a coherent final report?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Have the coordinator split the request into dimension-specific subtasks, pass shared constraints to each, invoke independent specialists together, and synthesize their findings.
Splitting the request into dimension-specific subtasks allows independent specialists to execute in parallel, drastically reducing latency and improving coverage. Keeping one broad subtask or disabling parallel tool use creates unnecessary sequential bottlenecks for independent workstreams.
Question 264 of 360You are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports. During evaluation, the synthesis subagent receives a long concatenation of subagent outputs. It repeatedly omits well-supported findings that appear midway through the bundle, while preserving findings near the start and end. What change would best reduce this failure while keeping the synthesis step grounded in the original evidence?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Prepend a concise findings map before the aggregated outputs, then group detailed evidence under explicit source and topic headers.
Prepending a concise findings map mitigates lost-in-the-middle attention limits by placing critical cues at the top, guiding the model through the entire bundle. Explicit source and topic headers further help the model navigate dense context without dropping provenance.
Question 265 of 360You 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. During pilot testing, the refund recommendation step now always produces parseable structured data with required fields present and numeric types correct. The remaining bad cases involve merchandise credits placed in the shipping_refund field or itemized adjustments that do not match the requested refund total. What change should this team make next?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Add downstream business-rule validation before refund execution and feed specific failures back for correction.
Tool schemas guarantee the correct JSON shape, but they cannot enforce business logic. You must add downstream code to validate domain rules like field semantics and totals, returning failures to the model for correction.
Question 266 of 360You 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 support resolution agent's production logs show that process_refund sometimes returns a successful-looking tool result with content "Refund blocked by policy" when an order is outside the refund window. Claude then retries the same refund call with slightly different wording instead of explaining the policy outcome or escalating when appropriate. What change would best improve the agent's recovery behavior?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Return a CallToolResult with isError: true and place custom errorCategory, isRetryable, and policy text in structuredContent.
Using the official MCP error indicator clearly signals the agent that execution failed, preventing blind retries. Placing custom metadata in structured content allows the agent to evaluate retryability and understand the specific policy failure.
Question 267 of 360You are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports. After receiving a broad prompt such as "produce a comprehensive cited report on AI adoption in healthcare," the coordinator must decide how to start before delegating research. Past runs produced well-written reports but had uneven coverage and wasted effort on tangential details. Which coordinator strategy best addresses this class of task?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Start with a discovery pass that maps the topic structure and high-impact areas, then assign prioritized subtasks that can change as findings reveal dependencies.
Open-ended research benefits from separating exploration from execution. A discovery pass maps the problem space, enabling the coordinator to create dynamic subtasks and adapt when early findings reveal gaps or dependencies.
Question 268 of 360You are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports. During a long research run, later synthesis turns sometimes ignore findings that the web search and document analysis subagents returned earlier. Logging shows later Messages API calls contain only the current coordinator instruction and the newest subagent output. What change best addresses the coherence problem?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Persist and resend the relevant messages array, including earlier assistant outputs, tool results, and the current user turn.
The Messages API is stateless, so Claude cannot implicitly remember prior turns. Persisting and resending the relevant messages array provides the historical context needed for the model to synthesize findings consistently.
Question 269 of 360You are using Claude Code to accelerate software development. Your team uses it for code generation, refactoring, debugging, and documentation. You need to integrate it into your development workflow with custom slash commands, CLAUDE.md configurations, and understand when to use plan mode vs direct execution. This team uses Claude Code to generate release notes and API documentation from pull requests. Reviewers can check only a small fraction of generated fields before publishing, and pilots show accuracy differs by field, with endpoint names usually correct and breaking-change labels often wrong. What change best routes human review to the items most likely to benefit from it?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Emit per-field confidence values in structured output, calibrate thresholds on labeled examples, and route low-confidence fields to reviewers.
Emitting per-field confidence values targets reviewer attention precisely where risk is highest. Calibrating thresholds using a labeled validation set ensures raw model scores accurately reflect observed accuracy for each specific field.
Question 270 of 360You 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. An online retailer's support automation team has successful MCP tool calls returning values in inconsistent formats: one response uses Unix timestamps and numeric status codes, while another uses ISO 8601 dates and string status values. Claude sometimes misinterprets these fields when deciding whether an order is eligible for refund. What should this team implement to give the agent a canonical representation before it reasons over successful tool results?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. Add a PostToolUse hook that reads tool_response and returns hookSpecificOutput.updatedToolOutput with normalized fields.
A PostToolUse hook runs after a successful tool call, making it the right place to transform data. Using the updatedToolOutput field replaces the raw response with normalized fields, ensuring Claude reasons over canonical formats.
Question 271 of 360You 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. Recent CI runs show that on pull requests touching 20 to 40 files, the review often reports superficial style issues while missing problems that depend on interactions between files. The team wants a more reliable review design without turning the review into an open-ended investigation. What change should they make?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Run a prompt chain that reviews files in focused passes, then runs a separate integration pass over the collected findings.
A prompt chain reduces attention dilution by reviewing files in focused passes before running a dedicated integration pass. Running independent reviewers without a synthesis step fails because no one reconciles the cross-file findings.
Question 272 of 360You 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 CI review job needs a project-scoped HTTP MCP server for pull-request metadata. The server requires a bearer token in the Authorization header, and the MCP configuration should be shared with every checkout while avoiding committed credentials. Which implementation best satisfies this requirement?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. Commit a .mcp.json file that references Bearer ${GITHUB_TOKEN} in headers, and set GITHUB_TOKEN in each CI and developer environment.
Project scoped configuration belongs in the tracked file while environment variables keep secrets out of version control. Option C fails because Claude Code requires the specific variable syntax to expand headers properly during the connection.
Question 273 of 360You 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. The team is designing a new automated reviewer for flaky-test risk. The requested behavior has unresolved product and workflow questions, including when comments are actionable, when they are noise, and what verification should prove. What should the team do before asking Claude Code to implement it?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Run an interactive planning session where Claude uses AskUserQuestion, writes a self-contained SPEC.md, then implement it from a fresh session.
Holding an interactive planning session lets Claude ask clarifying questions and produce a self-contained specification before any code is written. Avoid jumping straight into implementation for ambiguous features, because starting a fresh session from a detailed spec keeps execution focused.
Question 274 of 360You are using Claude Code to accelerate software development. Your team uses it for code generation, refactoring, debugging, and documentation. You need to integrate it into your development workflow with custom slash commands, CLAUDE.md configurations, and understand when to use plan mode vs direct execution. The team wants Claude Code to work with Jira issues for everyday development tasks, and also needs a release-readiness workflow that combines Jira fields with private service ownership rules and internal deployment checks. What integration approach best balances reuse, maintainability, and team-specific behavior?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. Configure a maintained Jira MCP server for Jira operations, and implement a custom MCP server for the release-readiness workflow.
Using a maintained Model Context Protocol server for standard tools reduces integration debt, while building a custom server encapsulates complex private business logic. Avoid hardcoding REST procedures via Bash, because standard servers provide a much cleaner and more maintainable interface.
Question 275 of 360You are using Claude Code to accelerate software development. Your team uses it for code generation, refactoring, debugging, and documentation. You need to integrate it into your development workflow with custom slash commands, CLAUDE.md configurations, and understand when to use plan mode vs direct execution. Your /review command posts PR feedback in four categories: correctness, security, performance, and style. Evaluation data shows security findings are usually accepted, but style comments are often dismissed as local-preference nitpicks. Developers have begun ignoring the whole review report, including security items. What change should you make first?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. Track precision and recall by category, then tighten or disable the noisy style criteria using flagged and non-flagged examples.
Tracking precision and recall by category isolates the noisy style criteria responsible for eroding developer trust. A strong exam cue is to avoid aggregate metrics here, because an overall acceptance rate hides the specific category causing false positives.
Question 276 of 360You are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports. After one run has completed a broad source review and produced a useful baseline analysis, the team wants to compare two different synthesis strategies from that same starting point. They need each strategy exploration to keep its own conversational history without changing the baseline session history. What should the team do?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. Resume the baseline session with the SDK fork option enabled for each strategy, then track the new session IDs.
Forking a specific session creates a new branch that starts with a copy of the original history, leaving the baseline unchanged. Remember that simply resuming normally modifies the tracked history, whereas forking is the explicit mechanism for isolated branching.
Question 277 of 360You are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports. Your team created a Claude Code skill called literature-gap-audit. Its SKILL.md tells Claude to search repository prompts, inspect report templates, and brainstorm missing provenance checks before anyone edits the coordinator. When developers invoke it, pages of file-search notes and rejected alternatives remain in the main session, and later report-generation edits become less focused. What should you change in the skill configuration?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Add context: fork in SKILL.md and keep the audit as explicit task instructions.
Using the fork context setting isolates verbose discovery work inside a subagent so the main conversation only receives the useful result. Remember that standard compaction or memory instructions do not prevent context flooding the way forking a side task does.
Question 278 of 360You 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. The team is refactoring long cases into a coordinator that can delegate billing and returns investigation steps. During testing, a container crash mid-dispute causes the replacement worker to lose the verified customer ID, prior order findings, and a decision that the case must be escalated. The workers do not share a filesystem, and local session JSONL files are not reliably present after restart. What change best supports safe crash recovery?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Persist an application-defined JSON state manifest, then load it on restart and inject it into coordinator and subagent prompts.
Persisting an application-defined state manifest and injecting it into the prompts explicitly recovers the verified facts after a crash. Do not rely on local transcript files or session memory for critical recovery, because replacement workers often cannot access them.
Question 279 of 360You are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports. The team has a custom /source-check slash command that asks Claude Code to verify report claims against cited sources. One engineer stored source-check.md under ~/.claude/commands/, and the command works for them but not for teammates who clone the repository. What should the team do to make the same command available from the repository?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Move source-check.md into .claude/commands/ in the repository and commit that file.
Committing the command file inside the project commands directory makes it a version-controlled asset that all teammates receive upon cloning. Personal commands stored in the home directory are always private to the individual user and invisible to the repository.
Question 280 of 360You are using Claude Code to accelerate software development. Your team uses it for code generation, refactoring, debugging, and documentation. You need to integrate it into your development workflow with custom slash commands, CLAUDE.md configurations, and understand when to use plan mode vs direct execution. In this team's monorepo, unit and component tests sit next to the source files they cover under services/, packages/, and apps/. Claude Code applies inconsistent testing guidance because similar instructions were copied into several directory-level memory files, and some directories are missing updates. What should you change to make the testing convention easier to maintain while avoiding unnecessary context for non-test work?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Create a .claude/rules/testing.md file with paths globs for test files and store the shared testing conventions there.
Using a rules file with path globs ensures these conventions are loaded dynamically only when matching test files are read. A key exam cue is to avoid duplicating instructions in multiple files or placing them globally in the root memory, which wastes context.
Question 281 of 360You 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 several weeks, developers say the automated reviewer is noisy. Examples show comments about variable names, preferred assertion styles, and missing tests mixed with a few real null dereferences and authorization bypasses. The current prompt says, "Report only issues you are highly confident about." What prompt change would most directly improve review usefulness?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. Define testable report and skip rules that focus comments on production bugs, security flaws, broken edge cases, and subtle regressions.
Defining strict report and skip rules creates clear category boundaries, filtering out subjective stylistic feedback in favor of high-impact bugs. Requiring numerical confidence scores fails because it still leaves the model trying to quantify inherently subjective stylistic opinions.
Question 282 of 360You 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. This team wants an on-demand Claude Code workflow named /case-review for support engineers. The workflow produces lengthy exploratory notes, should run outside the main conversation context, should let Claude read and search project files without repeated permission prompts, and should show the expected case ID when developers invoke it. Which setup best fits these requirements?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Create .claude/skills/case-review/SKILL.md with context: fork, allowed-tools for Read and Grep, and argument-hint: [case-id].
Claude Code skills require a dedicated folder containing a SKILL.md file to properly register custom workflows and parse YAML frontmatter. Setting context to fork creates an isolated subagent for background note generation, while allowed tools prevents permission prompts and argument hint guides developers.
Question 283 of 360You 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. Production traces show that every incoming request is sent through separate identity, order, refund-policy, and escalation-summary subagents. Simple order-status questions now have high latency, and some responses include irrelevant refund-policy caveats. What change best improves the design while preserving specialized workers for cases that need them?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Add a coordinator step that inspects the case, invokes only needed subagents, and passes each a self-contained task summary.
Introducing a coordinator step allows the system to dynamically route simple requests away from unnecessary specialized subagents, immediately reducing latency. Because subagents operate with isolated context, the coordinator must always pass a self-contained summary to invoke them correctly.
Question 284 of 360You are using Claude Code to accelerate software development. Your team uses it for code generation, refactoring, debugging, and documentation. You need to integrate it into your development workflow with custom slash commands, CLAUDE.md configurations, and understand when to use plan mode vs direct execution. This team's custom /upgrade-plan command parses repository upgrade guides into JSON for downstream automation. Evals show valid JSON, but required fields such as rollback_command and compatibility_note are returned as null when the source expresses them in fenced shell blocks, Markdown checklists, or prose paragraphs. The information is present in the source, and the current prompt already lists the schema and says not to omit required fields. What change would most directly address the extraction failures?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Add 3 to 5 structured examples that map varied guide formats to the expected JSON fields.
Adding diverse few-shot examples directly teaches the model how to map varied input formats like shell blocks and checklists into the required schema. Strengthening the negative instruction alone fails because the model currently lacks the structural mapping needed to extract the values.
Question 285 of 360You 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 refund operation sometimes fails because the order is outside the return window, but the agent treats the MCP response as a successful refund and tells the customer it was completed. What change should this team make to communicate the tool failure correctly?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Return a CallToolResult with isError: true and include structured failure details in the result content.
Returning a CallToolResult with the error flag set to true explicitly signals an application-level failure to the agent, preventing false success claims. Returning a normal result with an error field risks the model ignoring the structured payload and hallucinating a positive outcome.
Question 286 of 360You are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports. This team added a prompt-based quality gate that classifies draft report findings before publication. One category, "unsupported market claim," now produces many false positives on well-cited synthesis paragraphs, while other categories such as missing citation and source conflict are performing well. Engineers have started ignoring the entire quality report. What should the team do next?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. Temporarily omit the noisy category from the active prompt, keep accurate categories enabled, and rebuild it with examples, definitions, and precision/recall evals.
Temporarily removing the noisy category immediately restores trust in the automated pipeline while keeping the accurate signals active. Rebuilding the prompt with positive and negative examples alongside precision metrics addresses the underlying classification failure directly.
Question 287 of 360You 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. During a PR review run, Claude calls your submit_review_findings tool with JSON that is syntactically valid and matches the tool schema. Your CI validator rejects the execution because one finding references a file not changed in the PR and another violates an internal review policy. What should the integration do next to give Claude the best chance to correct the review output?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Send an immediate tool_result for that tool_use_id with is_error true and the concrete validation failures.
Returning a tool result with the error flag set provides the exact validation failures needed for correction. Specific feedback is far more effective than generic prompt tweaks or random temperature retries.
Question 288 of 360You are using Claude Code to accelerate software development. Your team uses it for code generation, refactoring, debugging, and documentation. You need to integrate it into your development workflow with custom slash commands, CLAUDE.md configurations, and understand when to use plan mode vs direct execution. After a long plan-mode investigation, a developer saves the session ID before making changes. They want to test a minimal patch and a larger refactor from the same analyzed context, but both attempts will touch overlapping files in the same working directory. Which approach best supports independent exploration without confusing conversation history with file state?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Resume the saved session ID with the fork option for each attempt, and checkpoint files before edits.
Forking a saved session creates separate histories from the same baseline without altering the original. Since a session is not a filesystem snapshot, checkpointing files ensures safe reversion for overlapping edits.
Question 289 of 360You 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. During an incident review, this team needs Claude Code to understand where refund escalation decisions are made in a large repository. Previous investigations loaded entire service directories into context before identifying the relevant flow, which made the session noisy and slow. What approach should the team use first?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Use Grep for refund and escalation identifiers, then Read only matching files and follow imports from those entry points.
Using Grep to search for identifiers and then reading only the matching files builds understanding incrementally. This prevents context bloat better than reading entire directories or pasting raw search outputs.
Question 290 of 360You are using Claude Code to accelerate software development. Your team uses it for code generation, refactoring, debugging, and documentation. You need to integrate it into your development workflow with custom slash commands, CLAUDE.md configurations, and understand when to use plan mode vs direct execution. Your team's Claude Code skill/custom command, invoked as /task, is meant to decide whether to investigate, plan, or modify code. In evals, ambiguous requests such as "clean this up," "look into this error," and "can you improve this module?" produce inconsistent behavior. Detailed written criteria have not stabilized the boundary. What should you change next?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Add 2-4 tagged examples showing similar ambiguous requests, the selected response path, and concise reasoning against plausible alternatives.
Tagged few-shot examples teach the model the exact decision boundary for ambiguous requests. Explicit reasoning alongside these examples resolves judgment calls better than long written checklists.
Question 291 of 360You are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports. During an evaluation run, the coordinator's first Messages API response contains a brief text block plus two Task tool_use blocks, and the run history shows no subsequent tool_result messages before report generation. The report is consistently based only on the coordinator's initial text. What change should you make to the coordinator loop?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Run each requested Task tool call, send matching tool_result blocks, and keep calling the Messages API until stop_reason is end_turn.
The agent loop must execute requested tools and return their results before continuing. A tool use request is not a final answer, so the coordinator stops prematurely if the loop lacks result handling.
Question 292 of 360You are using Claude Code to accelerate software development. Your team uses it for code generation, refactoring, debugging, and documentation. You need to integrate it into your development workflow with custom slash commands, CLAUDE.md configurations, and understand when to use plan mode vs direct execution. For documentation produced during this workflow, the team runs an extraction job that converts design docs and pull request descriptions into JSON work items. Reviewers can inspect only about 20% of items. The current job sends any response with stop_reason: end_turn directly into the tracker, and spot checks find bad work items when two source files disagree or a field is inferred weakly from context. What change best improves the review workflow?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Add per-field confidence, ambiguity, contradiction, and evidence-excerpt fields to the JSON schema, then queue flagged records before clean records.
Defining explicit application-level signals for ambiguity and contradiction catches the specific failure modes that a successful stop reason cannot detect. On the exam, remember that model generation metadata like stop reason or logprobs is never a safe substitute for validating structured extraction logic.
Question 293 of 360You 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. The system described above uses one Claude call for pull request review, test generation, and PR metadata updates. Logs show the review phase sometimes invokes test-writing tools for non-testable style comments, then returns prose instead of the structured finding object your pipeline expects. What change best improves tool selection reliability while preserving automated test generation elsewhere in the pipeline?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Separate review and test-generation steps, expose only role-specific tools to each step, and force the review step's reporting tool with tool_choice.
Separating the steps and restricting tool access ensures the review phase only sees its specific reporting tool, preventing irrelevant actions. For the exam, remember that setting tool_choice to a specific named tool is the safest way to force structured output.
Question 294 of 360You are using Claude Code to accelerate software development. Your team uses it for code generation, refactoring, debugging, and documentation. You need to integrate it into your development workflow with custom slash commands, CLAUDE.md configurations, and understand when to use plan mode vs direct execution. A payments platform team is about to migrate a shared logging library used across more than 45 files. Two viable integration approaches have different infrastructure requirements, and the maintainers want Claude Code to inspect the codebase and propose an approach before implementation begins. Which initial workflow is most appropriate?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. Enter plan mode, have Claude inspect the affected areas, and review the proposed plan before choosing execution mode.
Plan mode directly separates codebase exploration from actual edits, allowing Claude to propose an approach without risking unintended changes. For large migrations, starting in bypass permissions or accept edits risks immediate regressions before the maintainers even approve a design.
Question 295 of 360You 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. This team wants to move non-urgent post-resolution quality checks to the Message Batches API. Cases arrive continuously, and each check must reach a terminal batch outcome within 30 hours of case arrival for audit triage. Assume a batch may take the full documented 24-hour processing window before results are available or the batch expires. Which submission cadence should the team use?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Submit accumulated requests every 4 hours, using custom_id to correlate each case outcome.
A thirty-hour service level agreement paired with a twenty-four-hour maximum batch window leaves only six hours for safe accumulation. Submitting every four hours keeps the worst-case timeline within the strict audit limit while providing a crucial two-hour safety buffer.
Question 296 of 360You are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports. While maintaining this system, the team keeps citation validation tests beside the agent code they exercise, including files under packages/search/, packages/synthesis/, and apps/reporting/. The team wants Claude Code to apply the same testing conventions whenever editing these test files, without loading those conventions for unrelated production files. What should the team do?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Create a Markdown rule file under .claude/rules/ with YAML frontmatter using paths glob patterns for the test file names.
Using path-specific rule files applies instructions only to matching files. This targets conventions precisely, whereas root or user-level files apply globally and load unnecessary context for production files.
Question 297 of 360You are using Claude Code to accelerate software development. Your team uses it for code generation, refactoring, debugging, and documentation. You need to integrate it into your development workflow with custom slash commands, CLAUDE.md configurations, and understand when to use plan mode vs direct execution. A named dependency-impact subagent is used to inspect changed packages before a refactor plan is finalized. When a local test command intermittently times out after the subagent has already identified several affected files, the parent conversation receives only "impact analysis failed," so the plan omits useful findings. What change best preserves resilience without flooding the parent conversation with raw exploration output?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. Have the subagent retry transient command failures locally, then return attempts, partial findings, and unresolved errors in its final result.
A subagent should retry transient failures locally and summarize partial findings in its final result. This isolates messy command logs from the parent context while preserving useful details for planning.
Question 298 of 360You 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. The team keeps refund and escalation policy changes in GitHub and requests managed Claude Code Review only during scheduled review batches. A reviewer comments @claude review once, fixes are pushed, and then a second @claude review once repeats several resolved findings as new inline comments. They want the next manual re-review to preserve reviewer trust while still surfacing any unresolved issue from the first review. What should they change?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Add REVIEW.md guidance that uses prior findings during re-reviews and reports only new or still-unresolved issues.
Configuring review guidance ensures the system uses prior findings during re-reviews. This prevents duplicate comments by shaping behavior directly, rather than relying on manual cleanup by maintainers.
Question 299 of 360You 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. For a nightly backlog triage run, this team plans to submit thousands of unresolved conversations through the Message Batches API. The batch inputs include client tool definitions for MCP-backed customer and order systems that are implemented by the team's service. Which design is most appropriate?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Use batch for initial analysis or tool requests, then execute returned client tools and continue each case in later Messages requests.
Batch processing is asynchronous and cannot execute client tools directly. The batch should perform initial analysis, then your application handles the tools and continues in standard requests.
Question 300 of 360You 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. During testing, the agent trace shows Claude requesting lookup_order through MCP, but no order lookup result is observed and the session ends without a final customer response. What implementation change should this team make?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Run the SDK-driven agent loop so each MCP tool invocation is dispatched, results are returned, and processing continues until a final response.
The agent runtime must dispatch tool requests and return observations until the model finishes. Claude cannot execute backend operations itself, so a missing runtime loop causes the session to halt prematurely.
Question 301 of 360You are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports. During evals, the document-analysis subagent is invoked through the Claude Messages API using the Anthropic client SDK tool-use API, and it must return a tool call for one of three extraction schemas: extract_academic_paper, extract_news_article, or extract_market_report. The document type is not known in advance. In 6% of runs, the subagent returns a conversational summary instead of invoking a schema tool, causing the coordinator to miss citation metadata. What change best enforces structured extraction without hardcoding a specific schema?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Set tool_choice to {"type": "any"} while providing all extraction tools.
Setting tool_choice to any forces Claude to use one of the provided tools, resolving the conversational-summary failure mode. Auto allows conversational responses, while forcing a specific schema breaks extraction when the document type is unknown.
Question 302 of 360You are using Claude Code to accelerate software development. Your team uses it for code generation, refactoring, debugging, and documentation. You need to integrate it into your development workflow with custom slash commands, CLAUDE.md configurations, and understand when to use plan mode vs direct execution. The /release-note command sends a pull request diff to Claude and needs a typed object containing fields such as title, risk_level, testing_summary, and breaking_change. The prototype asks Claude to return JSON and then parses the assistant text, but failures occur when Claude includes commentary before the JSON. Which implementation change best improves reliability while preserving a schema-based extraction contract?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Declare a client extraction tool with an input_schema for the release note fields, require that tool call, and read the tool_use input object.
Declaring an extraction tool with a JSON schema ensures Claude emits structured arguments in a reliable tool_use block. Parsing raw assistant text often fails because the model might include unwanted conversational commentary before the data.
Question 303 of 360You are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports. In a test run, the coordinator executes the search and document analysis subagents, sends their tool_result blocks, then receives another assistant response with stop_reason: "tool_use" requesting the synthesis subagent. The current loop instead treats that response as the final answer and passes its text to the report generator, producing reports with missing synthesis. What change should you make?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Continue the loop whenever stop_reason is "tool_use", return matching tool_result blocks, and use the response only when stop_reason is "end_turn".
The client tool loop must continue whenever stop_reason is tool_use, returning matching tool_result blocks. Treating a tool_use response as the final answer breaks the execution chain and causes the agent to miss required steps.
Question 304 of 360You are using Claude Code to accelerate software development. Your team uses it for code generation, refactoring, debugging, and documentation. You need to integrate it into your development workflow with custom slash commands, CLAUDE.md configurations, and understand when to use plan mode vs direct execution. A senior engineer is about to migrate a shared authorization layer used by several packages. The dependency graph is unclear, there are multiple viable designs, and prior immediate-edit attempts caused broad rewrites that were later reverted. What should the engineer do first?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Start Claude Code in plan mode, have it inspect the affected areas, review the proposed plan, then approve an editing mode.
Plan mode lets Claude research dependencies and propose a design before modifying source files. For risky migrations, starting in an editing mode like acceptEdits often causes broad, unintended rewrites that require costly rework.
Question 305 of 360You are building a structured data extraction system using Claude. The system extracts information from unstructured documents, validates the output using JavaScript Object Notation (JSON) schemas, and maintains high accuracy. It must handle edge cases gracefully and integrate with downstream systems. The system described above exposes client-executed tools named extract_fields, validate_record, submit_record, and create_review_ticket. Production logs show that when a required field is ambiguous, Claude sometimes guesses a value and emits submit_record without a successful validate_record result. The application then executes the requested tool call, and downstream systems receive records that should have gone to review. What change would most effectively enforce the required workflow?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Add an application-level gate that blocks submit_record unless validate_record has succeeded for the same record.
Adding an application-level gate enforces the required validation step before submission, making the workflow deterministic. Relying on system instructions is unreliable because the model might still attempt to guess values and submit prematurely.
Question 306 of 360You 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. During an audit rollout, this team adds a required resolution record containing customer_id, order_id, action_taken, escalation_reason, and policy_basis. The current implementation asks Claude to respond with only valid JSON, but production logs still show occasional trailing prose and missing required keys, which break parsing before the case can be stored. What change would most reliably produce a schema-compliant record that application code can consume?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. Define a strict client tool for the resolution record with an input_schema and force that tool with tool_choice.
Strict tool use constrains the output to the declared schema, guaranteeing valid JSON. Forcing the tool call via tool_choice prevents Claude from falling back to free text, which easily breaks parsing when models add conversational prose around raw JSON payloads.
Question 307 of 360You are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports. During a pilot, one engineer proposes letting subagents send intermediate findings directly to other subagents so they can coordinate faster without waiting for the coordinator to issue another delegation. Which design should this team choose?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Route follow-up work through the coordinator and require subagents to return structured final results for any additional delegation.
The coordinator pattern keeps the parent agent as the single control point for task routing and error handling. Letting subagents message each other directly creates circular dependencies and hidden state changes that make debugging and provenance tracking nearly impossible.
Question 308 of 360You 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. Pilot analysis shows the coordinator now sends refund eligibility, account access, and escalation-readiness questions to every specialist before answering. The results are accurate, but ambiguous billing cases often include unnecessary account-recovery details, and low-complexity requests consume too much context. What change best addresses the orchestration problem?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Route each request through a coordinator step that selects only the specialists whose descriptions match the current issue.
A routing coordinator analyzes the request and delegates only to relevant specialists. This prevents context window pollution from unnecessary account-recovery details while maintaining the separation of concerns needed to resolve ambiguous billing issues accurately.
Question 309 of 360You are building a structured data extraction system using Claude. The system extracts information from unstructured documents, validates the output using JavaScript Object Notation (JSON) schemas, and maintains high accuracy. It must handle edge cases gracefully and integrate with downstream systems. The team is adding a new document type. Claude Code must first inspect dozens of existing extractor modules, schema validators, fixture conventions, and error-handling paths. In trial runs, the main conversation fills with search and file-read output, and by implementation time it loses track of the target schema changes. Which workflow best preserves useful context while still doing discovery?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Delegate the exploratory search to the built-in Explore subagent with explicit scope and conventions, then implement from its summarized findings.
The Explore subagent runs in a separate context window to handle verbose search operations. It returns a concise summary to the parent conversation, preserving the main context window for the actual implementation work and preventing token limits from losing target schemas.
Question 310 of 360You are building a structured data extraction system using Claude. The system extracts information from unstructured documents, validates the output using JavaScript Object Notation (JSON) schemas, and maintains high accuracy. It must handle edge cases gracefully and integrate with downstream systems. This team has two extraction workloads: an interactive upload flow where users wait for validation before submitting documents, and a nightly archive reprocessing job whose results are reviewed the next business day. Leadership wants to reduce token costs without degrading the user-facing flow. What should the architect recommend?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. Route the nightly archive reprocessing through the Message Batches API, and keep interactive validation on synchronous Messages API calls.
The Message Batches API provides significant cost savings for asynchronous workloads that can tolerate delayed processing. Keeping interactive validation on synchronous API calls ensures users receive immediate validation feedback without waiting for batch processing windows.
Question 311 of 360You are building a structured data extraction system using Claude. The system extracts information from unstructured documents, validates the output using JavaScript Object Notation (JSON) schemas, and maintains high accuracy. It must handle edge cases gracefully and integrate with downstream systems. The repository has packages for invoices, contracts, and claims, each with different extraction edge cases and validation conventions. Developers usually start Claude Code from the package they are editing, and maintainers want package-specific standards loaded automatically without making every package inherit every domain's guidance. What configuration best fits this workflow?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. Keep shared conventions in the root CLAUDE.md and let each package owner add @ imports for only that package's relevant standards in its package CLAUDE.md.
Layering root instructions with package-level configurations uses the import feature to load only relevant domain standards automatically. When Claude Code starts in a package directory, it reads the local files and ancestors without loading sibling package configurations, preventing context bloat.
Question 312 of 360You are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports. This team creates a reusable source-audit skill that report-generation subagents invoke before drafting final reports. The skill should inspect local templates and citation examples, but it should not be able to edit files or run shell commands when it executes. What is the best way to configure this constraint?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Add allowed-tools: Read Grep Glob to the skill's SKILL.md frontmatter.
The allowed-tools field in the SKILL.md frontmatter enforces hard execution limits at the system level. Relying on prompt instructions to avoid edits is a soft constraint, whereas explicitly listing read-only tools guarantees the skill cannot modify files or run shell commands.
Question 313 of 360You are using Claude Code to accelerate software development. Your team uses it for code generation, refactoring, debugging, and documentation. You need to integrate it into your development workflow with custom slash commands, CLAUDE.md configurations, and understand when to use plan mode vs direct execution. This team has a custom documentation skill / slash-invoked command that updates README sections, API references, and migration notes after refactors. The command's overall acceptance rate is high, but review data shows that incorrect outputs are concentrated in a few fields, especially function signatures and migration warnings. What should the team do before reducing human review?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Require field-level confidence outputs and calibrate review thresholds using labeled validation examples.
Field-level confidence allows routing only the riskiest parts of a generated change to human reviewers. Aggregate acceptance rates hide specific failures, so you must calibrate against a labeled validation set to turn raw scores into a reliable gating signal.
Question 314 of 360You 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. Production traces show that when customers describe an order indirectly, the agent sends lookup_order vague phrases like "the jacket from last winter" or "the charge on my card," even though the backend works best with exact order IDs, verified customer IDs plus date ranges, or email receipt references. Ambiguous matches are supposed to trigger clarification or escalation, not best-guess refunds, and the backend contract cannot change this sprint. What tool-design change should this team make first?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Update the tool and field descriptions with accepted input formats, example queries, edge cases, and usage boundaries.
Tool descriptions and field descriptions are the strongest levers for helping Claude choose and call tools reliably. Forcing tool use or routing more traffic would only increase incorrect calls, so you must clarify acceptable inputs and boundaries directly in the tool metadata.
Question 315 of 360During extraction prompt development, identical Claude Code requests behave differently depending on where developers start the session. The invoice package has a package-specific CLAUDE.md that says missing invoice identifiers must be represented as null, but some sessions do not follow it. What should the team do first to diagnose whether Claude Code is receiving the intended instructions in the current session?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Run /memory in each affected session and compare the listed CLAUDE.md, CLAUDE.local.md, user-level, and managed policy memory files.
Running the /memory command explicitly lists all active CLAUDE.md and policy files loaded for the current working directory. If the package-specific file is missing from this list, the model cannot see those instructions, which immediately explains the inconsistent behavior.
Question 316 of 360During a trial of a custom /project-release-notes command, a team gives the diff analysis, issue triage, and final synthesis agents the same full tool list: Read, Grep, Glob, Bash, WebSearch, WebFetch, and issue-tracker MCP tools. Even when the coordinator provides complete diff and issue summaries, the final synthesis agent often runs broad WebSearch and issue-tracker queries and adds unrelated items to the notes. What change best addresses the behavior?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. Restrict each agent to role-specific tools and route extra lookups through the coordinator.
Restricting each subagent to role-specific tools directly enforces boundaries, preventing the synthesis agent from executing exploratory web searches. If additional lookups are genuinely required, the coordinator can delegate that work to a designated research agent with the appropriate tool access.
Question 317 of 360A team needs to add a larger feature that caches refund eligibility decisions before invoking backend tools. The engineers are unfamiliar with the policy edge cases, cache invalidation risks, and failure modes around stale eligibility data. What should they do before asking Claude Code to implement the change?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Ask Claude Code to use AskUserQuestion to gather requirements about implementation constraints, edge cases, and failure modes before planning code changes.
Using an interview pattern to gather requirements leverages Claude to surface hidden design considerations before any code is written. This is critical for complex features involving cache invalidation, ensuring the model understands failure modes and escalation rules prior to planning.
Question 318 of 360A documentation platform team has a custom MCP tool invoked by a shared /docs command to update architecture documentation after refactors. When the target documentation branch is protected, the tool currently returns the plain text string "operation failed," and Claude Code repeatedly retries the same update before asking the developer what happened. Which change best prevents wasted retry attempts while preserving recovery from temporary failures?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. Return MCP error results with isError set and structured content that distinguishes protected-branch failures from temporary service failures.
Returning structured MCP error results with the isError flag provides the model with actionable context about the failure type. A protected branch requires a workflow change, so the model stops retrying, whereas a temporary timeout can still trigger a safe retry attempt.
Question 319 of 360A payments platform's developer productivity team is adding a /find-callers command that should locate every reference to a renamed helper function, limit the search to TypeScript source files, and return enough context for a developer to jump directly to each match. Which Claude Code built-in tool configuration should the command use?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Use Grep with the helper name as pattern, scope with glob: "**/*.ts", and set output_mode: "content" for matched lines.
The Grep tool is designed specifically to search file contents and locate call sites within a codebase. By scoping the search with a TypeScript glob pattern and setting output mode to content, the command returns the exact matching lines and file paths needed for navigation.
Question 320 of 360A CI job runs a nightly support-triage check and needs Claude Code to process a prompt, write the result to standard output, and exit without waiting for a developer. The current job launches Claude Code and intermittently hangs in the runner. What change best fits this automated workflow?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Invoke Claude Code with claude -p "…" or claude –print "…" in the job.
The print flag configures Claude Code to run in a non-interactive mode explicitly designed for CI pipelines and automated scripts. This ensures the process executes the prompt, writes the output, and terminates cleanly without waiting for interactive human input.
Question 321 of 360During a pilot using the Claude Agent SDK, a policy-research subagent sometimes reports only "search unavailable" to the coordinator. The coordinator cannot tell whether the subagent should retry, reformulate the request, narrow the scope, or treat the result as a true absence of policy, and reviewers cannot verify the evidence behind completed research. What subagent contract change would best improve reliability?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. Return structured subagent results with error codes, attempted queries, and any available source metadata.
Returning structured results with error codes and attempted queries preserves the context the coordinator needs to choose an appropriate recovery path. A generic failure message collapses actionable scenarios into a single vague state, removing the provenance required for downstream reasoning.
Question 322 of 360You are using Claude Code to accelerate software development. Your team uses it for code generation, refactoring, debugging, and documentation. You need to integrate it into your development workflow with custom slash commands, CLAUDE.md configurations, and understand when to use plan mode vs direct execution. When Claude Code runs npm test through Bash, the raw stdout often includes long dependency warnings and absolute local paths. The team wants Claude to reason from a shorter, normalized version of successful Bash results while leaving the command execution itself unchanged. What implementation should they choose?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Configure a PostToolUse hook matching Bash that returns updatedToolOutput with the Bash result shape.
A PostToolUse hook runs after execution but before the model processes the result, allowing you to intercept and normalize the Bash output. You must return the updatedToolOutput object matching the expected structured Bash result shape so the replacement integrates seamlessly into the context.
Question 323 of 360You are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports. During a long research run, early document analysis identifies a domain-specific taxonomy that should drive the final report. After many searches, tool results, and revisions, later synthesis passes start organizing findings around generic categories and occasionally contradict the earlier taxonomy, even though the application resends the accumulated message history. What change would best improve reliability?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. Maintain a structured research state file with the discovered taxonomy and source mappings, then load it into later synthesis prompts.
Maintaining a structured research state file preserves critical early findings explicitly, preventing context degradation over long agent runs. Relying on prompt caching or sending the full transcript does not guarantee the model will recall specific details buried deep in the history.
Question 324 of 360You are building a structured data extraction system using Claude. The system extracts information from unstructured documents, validates the output using JSON schemas, and maintains high accuracy. It must handle edge cases gracefully and integrate with downstream systems. Production evaluation shows accuracy drops on 60-page packets with predictable sections such as intake forms, narrative notes, invoices, and attachments. The current single-pass extraction often captures fields within individual sections but produces duplicate entities, inconsistent totals, and occasional schema-valid JSON with incorrect relationships. Which task decomposition strategy should this team use first?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. Run section-level extraction passes, then run a reconciliation pass that validates schema, deduplicates entities, and checks cross-section consistency.
A fixed sequential pipeline using section-level extraction reduces attention dilution before a global reconciliation pass resolves duplicates and cross-section relationships. Single-pass extraction on massive documents often misses global context, while dynamic agent loops introduce unpredictable latency and cost.
Question 325 of 360You 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. Before enabling overnight processing of 35,000 archived support transcripts through the Message Batches API, a pilot of 30 transcripts shows inconsistent disposition decisions and missing rationale fields in some outputs. A product manager proposes running the full archive now and resubmitting bad rows the next day. What should this team do next?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. Create a representative evaluation set, refine the templated prompt against clear criteria, and rerun it before submitting the full batch.
Building a representative evaluation set and refining the prompt against clear criteria establishes a necessary evaluation loop before scaling batch operations. Relying on automated prompt improvers or processing bad rows blindly wastes asynchronous budget and hides systematic logic failures.
Question 326 of 360You 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. In production tests, the agent's first-pass case analysis lists every plausible billing or return issue, including marginal ones. Reviewers complain that all findings arrive with the same priority, so they cannot decide which should be auto-resolved, queued for human review, or used only for trend analysis. What change best supports calibrated review routing while preserving broad coverage?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Run a separate verification pass that returns schema-constrained findings with confidence, severity, evidence, and routing fields.
A separate verification pass preserves recall during the initial finding stage while adding structured confidence and severity fields for routing. Relying on free-form prose or non-existent API confidence scores prevents reliable, machine-readable downstream automation.
Question 327 of 360You are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports. The document analysis subagent must extract each article's primary funding source and provide a citation for the extracted value. In several articles, the only sponsor-like clue appears in the document title metadata supplied by the application, while the document source text contains no funding statement or other passage naming a funder. The validator rejects those records because no supporting citation is present. What should this team do?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Return the funding source as unknown and include an evidence-gap note when no citable source passage supports it.
Returning an unknown value with an evidence-gap note safely handles missing evidence without triggering hallucinations from endless retries. Retries cannot generate missing citations, and document metadata fields are not valid citable sources for grounded claims.
Question 328 of 360You are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports. The document-analysis subagent has three extraction tools available: extract_metadata, extract_claims, and enrich_sources. For the first request in each document workflow, the coordinator must make the subagent call extract_metadata before any other extraction or enrichment can occur. Which configuration best fits this requirement?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. Set tool_choice to {"type": "tool", "name": "extract_metadata"} for the first document-analysis request.
Setting tool_choice to a specific tool type explicitly forces the model to call the named tool immediately. Any other tool_choice setting leaves the selection up to the model's discretion, failing the strict sequential workflow requirement.
Question 329 of 360You 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 support engineering team is implementing a manual Messages API client-tool loop for get_customer. An integration test shows this sequence: Claude requests get_customer, the application calls the MCP server successfully, and the next Claude turn proceeds as if no customer record was available. The request trace shows the lookup output was stored in an application log, while the next Messages API request included only the original user message and a fresh assistant prefill summarizing the lookup. What change should the team make to the manual orchestration loop?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. Append the assistant tool_use response, then send a user message containing the matching tool_result block.
The model needs the raw tool output mapped directly back via a user message containing the matching tool_result block. Passing plain text summaries or logging the result externally breaks the tool use loop, leaving the model blind to the actual data.
Question 330 of 360You are using Claude Code to accelerate software development. Your team uses it for code generation, refactoring, debugging, and documentation. You need to integrate it into your development workflow with custom slash commands, CLAUDE.md configurations, and understand when to use plan mode vs direct execution. During a long refactoring session, this team notices that Claude Code starts contradicting earlier architectural decisions after many file reads, test outputs, and debugging turns. The team wants the next workflow change to preserve non-negotiable decisions without relying on the full transcript staying salient. What should they do?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Maintain a structured project facts file with key decisions, constraints, and open questions, and have Claude Code update and reference it during the session.
Maintaining a structured project facts file preserves critical architectural constraints outside the degrading context window of a long transcript. Prompt caching optimizes cost and latency but does not prevent the model from forgetting earlier instructions as the conversation grows.
Question 331 of 360You 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. An online retailer's support engineering team is implementing billing dispute handling as a lower-level Messages API tool loop. After a pilot, the orchestration layer is found to map every billing dispute to the same fixed path, even though some cases need only a policy explanation, some require order lookup, and some should be escalated before any refund action. Which change best aligns the system with Claude's tool-use model?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Run a stop_reason driven loop with tool_choice: {"type":"auto"} and let Claude choose tool use or a final reply each turn.
Using a stop_reason driven loop with automatic tool choice lets Claude dynamically select the necessary tools based on the current context. Predefined chains fail because they cannot adapt to the varying requirements of individual billing disputes.
Question 332 of 360You are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports. The document-analysis subagent extracts an evidence_type field using a JSON Schema enum of experiment, survey, expert_interview, and market_report. In testing, vague passages are often forced into a specific category, while new source types sometimes produce values outside the schema and fail downstream validation. What change best improves the schema design while preserving reliable categorization?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Add unclear and other enum values, plus an other_detail field, and instruct when to use each.
Adding fallback categories like unclear and other with a detail field provides valid choices for ambiguous or unanticipated inputs. This maintains the integrity of your structured schema without forcing the model into incorrect categorizations.
Question 333 of 360You are using Claude Code to accelerate software development. Your team uses it for code generation, refactoring, debugging, and documentation. You need to integrate it into your development workflow with custom slash commands, CLAUDE.md configurations, and understand when to use plan mode vs direct execution. A payments platform team is replacing its homegrown authorization layer with a policy engine across API handlers, middleware, and tests. Engineers disagree about where the policy boundary should live, and the developer assigned to it is unfamiliar with several affected packages. Which workflow should they choose before implementation?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Enter plan mode so Claude Code researches the codebase and proposes changes for approval before editing files.
Plan mode allows Claude Code to research the unfamiliar codebase and propose a structural plan for engineer approval before editing. Direct execution is a poor choice here because large architectural refactors require human review to validate the approach first.
Question 334 of 360You are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports. The report-generation subagent follows the required section headings, but its judgment varies across runs when deciding whether a research claim should be stated confidently, qualified as limited evidence, or omitted. The handoff data already includes source URLs, publication dates, and evidence excerpts, and the output format itself is not failing validation. What change would most effectively improve consistency in this judgment?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Add 3-5 XML-wrapped examples that show relevant claim-evidence cases, edge cases, and ideal report phrasing.
Adding structured few-shot examples directly demonstrates the intended judgment boundary for nuanced phrasing decisions. This targeted approach fixes reasoning inconsistencies better than simply adjusting instructions or enforcing structural validation rules.
Question 335 of 360You 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 support engineering team has an agent that collected the relevant case facts for a difficult billing dispute. The team wants to explore two different resolution strategies from that same point in the conversation. Each strategy should have its own conversation history that can be resumed later, and the original analysis thread should remain unchanged. Which approach should the team use?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Run query() with resume=baseline_session_id and fork_session=True for each strategy, then store each new session_id.
Using the fork session parameter creates a new branch of the original history for independent exploration. This ensures the baseline session remains completely unchanged while generating two distinct paths you can resume later.
Question 336 of 360You are building a structured data extraction system using Claude. The system extracts information from unstructured documents, validates the output using JavaScript Object Notation (JSON) schemas, and maintains high accuracy. It must handle edge cases gracefully and integrate with downstream systems. After Claude generates extraction schemas and validation retry logic, subtle defects still reach downstream tests, especially around ambiguous fields and inconsistent totals. The current review prompt runs in the same long session that designed the implementation and justified its choices. What change would most effectively improve the review architecture?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Run a separate Claude session with fresh context and provide the requirements, diff, and review checklist.
A separate reviewer session with fresh context provides an unbiased audit free from the original generator rationalizations. The strongest distractor fails because compacting history does not eliminate the self-validation bias inherent to self review.
Question 337 of 360You are building a structured data extraction system using Claude. The system extracts information from unstructured documents, validates the output using JavaScript Object Notation (JSON) schemas, and maintains high accuracy. It must handle edge cases gracefully and integrate with downstream systems. During validation, the system described above calls a client-side lookup tool to find matching document IDs in an internal archive. Production traces show that tool timeouts and successful searches with no matches are both returned to Claude as tool_result blocks containing an empty array, causing the agent to treat access failures as confirmed absence. What change would most reliably preserve the distinction for downstream handling?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Return no-match lookups as successful empty results, and return timeout failures as error tool results with retry context.
Successful empty results represent valid negative evidence while timeouts represent missing evidence that requires explicit error context. Collapsing both into empty arrays causes the model to assume the data is absent rather than unreachable.
Question 338 of 360You are building a structured data extraction system using Claude. The system extracts information from unstructured documents, validates the output using JSON schemas, and maintains high accuracy. It must handle edge cases gracefully and integrate with downstream systems. A team asks Claude to review a 42-file extraction pipeline in a single pass, including parsers, normalization rules, JSON schemas, validators, and downstream mapping code. Recent reviews are inconsistent: some obvious defects are found, while other issues are missed depending on which part of the pipeline dominates the review. What review design should the team adopt?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Run focused per-file review passes first, then run a separate integration pass over the summarized local findings and cross-file data flow.
Focused per-file reviews prevent attention dilution before a final integration pass checks cross-file data flow. Reviewing everything at once causes context overload, making the model miss localized defects while trying to track global dependencies.
Question 339 of 360You 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. Production transcripts from a support resolution agent using the Claude Agent SDK show that after long conversations involving multiple orders, the agent sometimes applies a refund amount from one issue to a different order after older turns have been summarized. What change would most effectively preserve the critical issue details across the session?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Maintain a structured case facts block that is updated after each relevant turn and made available on every relevant turn.
Maintaining a structured case facts block preserves critical transactional data outside the summarized conversation history. Relying on conversational memory or frequent summarization risks data loss, so exact state must live in a durable structured layer.
Question 340 of 360You are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports. After a web exploration phase in a Claude Code research workflow, later subagents repeatedly rerun searches that earlier subagents already completed and fail to preserve why certain sources were rejected. The coordinator receives brief outputs from the earlier subagents, but next-phase work still starts as if no exploration happened. What should the coordinator change before spawning each next-phase subagent?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Condense prior exploration into a source-linked summary and include it in each next subagent's delegation prompt.
Condensing prior exploration into a source-linked summary gives the next subagent the relevant state without carrying verbose artifacts forward. Attaching full transcripts wastes context, while keeping delegations independent causes duplicated effort.
Question 341 of 360You are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports. This team uses Claude Code to maintain the research system's TypeScript repository. Citation-verification tests, report-rendering tests, and orchestration tests live beside implementation files across multiple top-level folders. The team wants the same testing guidance to apply only when Claude Code is working on test files, without duplicating guidance in every package. What should they do?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Create .claude/rules/testing.md with paths frontmatter matching the test file patterns, then place the testing guidance below it.
Path-scoped rule files apply instructions only to matching files using glob patterns in the frontmatter. Duplicating guidance across multiple directories creates maintenance overhead, and root instructions apply too broadly.
Question 342 of 360You are building a structured data extraction system using Claude. The system extracts information from unstructured documents, validates the output using JavaScript Object Notation (JSON) schemas, and maintains high accuracy. It must handle edge cases gracefully and integrate with downstream systems. A compliance automation team's structured extraction system includes a specialized audit_evidence_extractor tool for extracting audit findings from formal audit reports. Production logs show the tool being called for ordinary invoices and contracts whenever the documents contain phrases such as "validation required" or "compliance check," even when no audit evidence is present. The tool description says it is for formal audit reports, while one system instruction says: "CRITICAL: You MUST use audit_evidence_extractor whenever compliance, validation, control, or audit language appears." What change would most directly reduce this unintended tool association while preserving legitimate audit extraction?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Rewrite the system prompt and tool description with narrower use boundaries and ordinary wording for audit reports.
Rewriting the system prompt and tool descriptions removes the forceful language causing the tool to trigger on common words. Tool choice configuration cannot fix bad trigger conditions, so defining clear boundaries is the highest-leverage fix.
Question 343 of 360You are using Claude Code to accelerate software development. Your team uses it for code generation, refactoring, debugging, and documentation. You need to integrate it into your development workflow with custom slash commands, CLAUDE.md configurations, and understand when to use plan mode vs direct execution. This team delegates documentation research to separate Claude Code subagents. In a recent upgrade guide, the final write-up treated a 2022 compatibility note and a 2025 release announcement as equally current because the parent conversation only received short summaries from each subagent. What change would most directly improve temporal reliability in future generated documentation?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Require each research subagent to return schema-conformant JSON that includes source dates and a date basis for every substantive finding.
Subagents operate in isolated contexts and return only their final output to the parent. Reverting to schema JSON with explicit source dates ensures the parent agent receives the exact metadata needed to distinguish between current information and outdated compatibility notes.
Question 344 of 360You are building a structured data extraction system using Claude. The system extracts information from unstructured documents, validates the output using JavaScript Object Notation (JSON) schemas, and maintains high accuracy. It must handle edge cases gracefully and integrate with downstream systems. This team is using the Messages API MCP connector with separate MCP servers for schema selection, entity enrichment, and delivery to a downstream queue. They want one extraction request to choose tools from all three integrations as needed, rather than preselecting a single integration per document. What should they implement?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Define all three servers in mcp_servers, add one matching mcp_toolset per server in tools, and let Claude choose among the discovered tools.
The Messages API requires defining each server connection in the servers block and enabling its tools through an MCP toolset. This allows Claude to dynamically choose from all available tools during a single request rather than requiring rigid pre-selection per document.
Question 345 of 360You are using Claude Code to accelerate software development. Your team uses it for code generation, refactoring, debugging, and documentation. You need to integrate it into your development workflow with custom slash commands, CLAUDE.md configurations, and understand when to use plan mode vs direct execution. This team's /review command classifies pull request comments into defects, missing tests, dependency risks, and dead-code findings. In the last month, defect and missing-test comments are usually accepted, but dead-code findings are frequently dismissed because Claude flags framework entry points and reflection-based handlers that are intentionally unused by direct imports. Several developers now skim or mute the entire review output. What change should you make first?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Measure precision and recall by finding category, then narrow or pause the noisy dead-code checks.
Measuring precision and recall by finding category identifies the specific class causing the false positives. Narrowing the noisy dead-code checks prevents developers from completely ignoring the automated review output, preserving trust in the highly accurate defect findings.
Question 346 of 360You are using Claude Code to accelerate software development. Your team uses it for code generation, refactoring, debugging, and documentation. You need to integrate it into your development workflow with custom slash commands, CLAUDE.md configurations, and understand when to use plan mode vs direct execution. A workflow script receives a response with stop_reason: "tool_use" for a client-executed run_tests tool. The script runs the tests successfully, but Claude keeps asking to run the same tool again instead of interpreting the results. What should the script change in its next request?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Append the assistant tool use turn, then add an immediate user turn with the matching tool result block.
The application must preserve the assistant message that requested the tool, then send the result back as a user message. The tool result must reference the original tool use ID so the model can connect the output to the requested action.
Question 347 of 360You are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports. This team needs issue tracker context in research reports: searching Jira epics, reading tickets, and linking cited issue IDs. It also needs a proprietary evidence-readiness workflow that maps issue labels to internal review stages and report sections. What should you recommend?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Use a maintained Jira MCP server for standard issue operations, and build a focused custom MCP server for the proprietary workflow.
This approach reuses an existing integration for common capabilities while limiting custom code to the team-specific behavior outside servers cannot know. Building one monolithic custom server increases your API maintenance burden without any real integration benefits.
Question 348 of 360You are using Claude Code to accelerate software development. Your team uses it for code generation, refactoring, debugging, and documentation. You need to integrate it into your development workflow with custom slash commands, CLAUDE.md configurations, and understand when to use plan mode vs direct execution. This team is creating a project-scoped /investigate command for unfamiliar codebase questions such as "why are refunds sometimes double-counted?" and "where should we add tests for the importer?" The command will use a coordinator that can delegate independent investigations to subagents before proposing a plan. Which prompt design best preserves adaptability while keeping the output reliable?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Define the investigation goal, evidence requirements, output format, tool/source guidance, task boundaries, and effort budget heuristics.
This design gives the coordinator enough structure to delegate useful work without freezing the investigation into a fixed path. Assigning hardcoded subagents or rigid file sequences destroys the dynamic orchestration needed for unfamiliar codebase questions.
Question 349 of 360You are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports. After a refactor, generated reports now show two linked defects: citations render twice in the final report, and some evidence excerpts disappear when the synthesis subagent output is passed to the report generator. The likely cause spans the claim-source schema, the synthesis prompt, and the report template, and the acceptance test should confirm that each claim appears once with its evidence excerpt and source URL. How should this team use Claude Code to address the defects most effectively?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Enter plan mode, give one detailed request covering both defects, affected areas, constraints, and verification checks before approving edits.
A single detailed prompt gives Claude Code the shared context needed to reason about the coupled change. Splitting the defects into separate sessions creates inconsistent edits because each session makes different assumptions about shared interfaces.
Question 350 of 360You are using Claude Code to accelerate software development. Your team uses it for code generation, refactoring, debugging, and documentation. You need to integrate it into your development workflow with custom slash commands, CLAUDE.md configurations, and understand when to use plan mode vs direct execution. A healthcare analytics team's extraction job uses Claude with a strict extraction tool to convert discharge summaries into medication reconciliation records. The tool input schema is valid, but an application validator rejects some records because medication entries cite the wrong note section or omit the required source quote. The current retry prompt says only "fix the invalid JSON," and the same citation defects often reappear. What should the extraction loop do before accepting the records?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Return the validator's field paths and citation failures with the original note, then retry and route unresolved cases to review.
This directly addresses validation and retry quality by giving Claude specific, actionable feedback about what failed. Generic retry prompts without field paths or validator context fail to correct citation formatting issues.
Question 351 of 360You are building a structured data extraction system using Claude. The system extracts information from unstructured documents, validates the output using JavaScript Object Notation (JSON) schemas, and maintains high accuracy. It must handle edge cases gracefully and integrate with downstream systems. Benchmarking shows that long packets with several independent extraction concerns are slow, and the final JSON often omits one concern when another section is unusually long. Each concern uses the same packet metadata and source text, but the extraction tasks do not depend on one another until the final schema validation step. What design change best addresses the latency and coverage issue?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. Split the concerns into parallel extraction tasks, pass shared packet context to each task, then merge and validate the unified JSON.
This matches the separability of the work, allowing each extraction concern to run independently using shared source context. Processing sequentially or increasing the output budget fails to resolve the core latency and coverage degradation.
Question 352 of 360You are using Claude Code to accelerate software development. Your team uses it for code generation, refactoring, debugging, and documentation. You need to integrate it into your development workflow with custom slash commands, CLAUDE.md configurations, and understand when to use plan mode vs direct execution. After a long codebase analysis, this team wants to compare two alternative test-generation strategies from the same discovered baseline. Each investigation should preserve the baseline context, avoid contaminating the other strategy's reasoning history, and leave the original analysis session available for later use. What should the team do?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. Resume the baseline session ID with fork_session enabled for each strategy and run each investigation in a new session.
Resuming with fork_session creates separate sessions that start with a copy of the original session history while leaving the original unchanged. Manual duplication or continuing in the same thread fails to isolate the reasoning history properly.
Question 353 of 360You are building a structured data extraction system using Claude. The system extracts information from unstructured documents, validates the output using JavaScript Object Notation (JSON) schemas, and maintains high accuracy. It must handle edge cases gracefully and integrate with downstream systems. During evaluation, this team asks Claude Code to use subagents to investigate extraction errors across 600 vendor invoices, intake forms, and contracts. The current approach gives each subagent the same instruction, "find causes of schema validation failures across all documents," producing repeated observations and a large synthesis context. What change best partitions the investigation while preserving synthesis quality?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Assign each subagent a distinct document group or extraction concern, provide needed context, and require concise findings for synthesis.
Using subagents for independent investigations requires clear scope boundaries to reduce duplicate work. Requiring concise return formats limits how much subagent output flows back into the main conversation, preventing synthesis bloat.
Question 354 of 360An online retailer's support engineering team wants to add a reusable /refund-audit workflow in Claude Code for reviewing changes to refund logic. It must be version-controlled with the repository, include a checklist plus example transcripts as supporting files, and prevent file modification tools or shell commands while the workflow is active. Which implementation best fits these requirements?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. Create .claude/skills/refund-audit/SKILL.md with supporting files referenced from it, and set disallowed-tools for Write, Edit, MultiEdit, NotebookEdit, and Bash.
A project skill placed in the .claude/skills directory is version-controlled with the repository and automatically generates the corresponding slash command. Using disallowed-tools explicitly revokes specific capabilities like file editing and shell execution, which is safer than relying solely on an allowed-tools whitelist.
Question 355 of 360While updating a repository file that defines refund triage wording, Claude Code has already read the file and an Edit call fails because the supplied old_string appears in two policy examples. The requested change applies to only one occurrence, but repeated boilerplate makes a unique exact replacement impractical. What should the team instruct Claude Code to do to make the change reliably?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Read the current file contents, assemble the full intended file, and use Write to overwrite that file.
Using the Write tool to overwrite the entire file bypasses the strict unique substring matching required by the Edit tool. After reading the file to ensure the latest contents are in context, Write provides a reliable mechanism to commit the intended changes without risking the wrong replacement.
Question 356 of 360A teammate wants Claude Code to add one guard clause to a single known function so it rejects negative quantities, then run the existing unit test for that file. The relevant file path and expected behavior are already known, and no API, schema, or architectural changes are involved. What should the developer do?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Ask Claude Code to make the small change directly and run the specified test.
Direct execution is optimal for small, well-scoped changes where the expected diff is clearly understood and easily described. Plan mode adds unnecessary overhead here, and including the specific unit test gives Claude Code a concrete verification signal to confirm the task succeeded.
Question 357 of 360You are building a structured data extraction system using Claude. The system extracts information from unstructured documents, validates the output using JSON schemas, and maintains high accuracy. It must handle edge cases gracefully and integrate with downstream systems. The current implementation exposes one client tool named analyze_document with parameters for document text, requested operation, and desired format. In evaluation runs, Claude sometimes uses it to produce summaries when the downstream validator expected extracted fields, and sometimes attempts claim verification without passing the source excerpt needed for validation. What redesign best improves tool selection and downstream reliability without creating unnecessary tool sprawl?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: C. Replace analyze_document with a few non-overlapping tools for distinct workflows, each with clear descriptions, JSON Schema inputs, and minimal stable result fields.
Breaking the monolithic tool into non-overlapping, distinct workflows enforces a clear input and output contract for each task. Avoid creating highly overlapping tools, as tool sprawl degrades the model's selection accuracy and makes the agent harder to orchestrate.
Question 358 of 360You are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports. Evaluation runs show that reports on unfamiliar research topics have uneven coverage: common subdomains are detailed, while less obvious but important angles are missing. Subagents usually complete their assigned work, and the team wants to improve completeness without simply increasing the number of assignments for every topic. What orchestration change would best improve research completeness?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: B. Have the coordinator scout initial findings first, then create focused subagent assignments from the discovered work list.
Having the coordinator scout initial findings first allows the system to adapt its investigation plan. The coordinator can then discover relevant branches before fanning out work, which provides better coverage than prewriting a larger fixed list of subtasks.
Question 359 of 360You are building a multi-agent research system using the Claude Agent SDK. A coordinator agent delegates to specialized subagents: one searches the web, one analyzes documents, one synthesizes findings, and one generates reports. The system researches topics and produces comprehensive, cited reports. After several runs, the final reports contain polished summaries but weak citation coverage. The web and document subagents return useful source details to the coordinator, but the synthesis subagent is invoked later with only a brief instruction to produce themes and recommendations. What change would best improve the orchestration design?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: D. Include the relevant findings and source metadata directly in the synthesis subagent's Agent prompt.
A subagent operates with a fresh context window and cannot see previous tool results or parent history. The coordinator must explicitly pass all required source metadata and findings directly inside the synthesis subagent prompt to preserve citation provenance.
Question 360 of 360You are building a structured data extraction system using Claude. The system extracts information from unstructured documents, validates the output using JavaScript Object Notation (JSON) schemas, and maintains high accuracy. It must handle edge cases gracefully and integrate with downstream systems. The system described above now reports 99% schema-valid outputs, and most invoices, intake forms, and contracts receive high field-level confidence scores. Reviewers can inspect only a small portion of high-confidence records each week, but the team still needs to estimate production error rates and detect rare new failure patterns before further reducing review. What should the team do?
Tap an answer — you get instant feedback and the reasoning.
Show answer & explanation
Correct answer: A. Sample high-confidence records within each document type and critical field, then track reviewed error patterns by segment.
Segmenting your manual review sample across different document types and fields exposes hidden errors in high-confidence records. Relying strictly on aggregate random sampling or ignoring high-confidence outputs entirely masks rare failure patterns.
More free practice tests at certpunch.com and new video rounds on @CertPunch.