Module 6 practice questions: Debugging and incident response
15 questions · Advanced Debugging and Incident Response
Practice questions written by Sanjay Shah. Not exam questions, not affiliated with or endorsed by Anthropic.
Question 1
At 02:14 you're paged: tenant birch is getting duplicate refunds, and new duplicates are still appearing every few minutes. Nobody knows the cause yet. Which two actions should come first? (Choose TWO.)
- A) Start replaying an affected run to find the root cause before changing anything.
- B) Turn off
issue_refundwith its kill switch (or put birch in draft-only mode) and pin the last known good prompt, model and contract versions. - C) Roll back every deploy from the past week across all services.
- D) Open a support ticket with the model provider and wait for their answer.
- E) Send the first status note: what you know, what you've done, and when the next update will come.
Show answer
Answer: B, E
- A: Wrong. Replaying while refunds continue adds damage; replay comes after containment.
- B: Right. The kill switch and version pins stop the damage with controls built for this, with no guessing about cause.
- C: Wrong. A blind mass rollback is slow and risky, and may not touch the cause (a contract version is a flag).
- D: Wrong. Nothing points at the provider, and waiting contains nothing.
- E: Right. People need to know early what you know and when they'll hear more; a note from a template takes a minute.
Question 2
You're the only engineer on call for this incident. How should you handle the incident roles?
- A) Wear all three hats on purpose: keep a timeline document, set a timer for status notes, write decisions down before acting, and hand off the fixer role if someone joins.
- B) Skip status notes until the bug is fixed, since you're the only one working on it.
- C) Wait until a second engineer is online before taking any action.
- D) Let an agent write and send the customer status notes automatically while you debug.
Show answer
Answer: A
- A: Right. Alone you still do all three jobs, deliberately; the timeline, cadence and written decisions keep you from tunnelling into code.
- B: Wrong. Stakeholders and support staff need updates, especially when money is involved.
- C: Wrong. Waiting lets damage continue, and containment is within one person's reach.
- D: Wrong. Unreviewed generated messages to customers during an incident risk wrong or speculative statements.
Question 3
Five agents touched the affected tickets, and each one's own summary says it did its job correctly. How do you find the step where things went wrong?
- A) Open a new chat with each agent's prompt and ask whether it checked for prior refunds.
- B) Read only the logs of the component that was changed most recently.
- C) Re-run an affected ticket in production with verbose logging turned on.
- D) Start from the run id of an affected refund, follow the trace hop by hop, and compare each handoff payload with its contract.
Show answer
Answer: D
- A: Wrong. An agent's answer today is new generated text about a run it can't see; it isn't evidence.
- B: Wrong. The latest change is a lead, but only the trace shows whether it matters.
- C: Wrong. Re-running in production can trigger another real refund.
- D: Right. The trace records what each step received and passed on, so checking handoffs against contracts finds where information was lost.
Question 4
You replay a recorded run ten times per variant. With handoff contract v3 the run fails 3 of 10 times; with contract v2 it fails 2 of 10 times. What should you conclude?
- A) Contract v3 is the root cause, because it fails more often.
- B) The difference is within noise at ten runs; run many more (50 or more) or find a variable that moves the rate decisively before naming a root cause.
- C) The model is broken, so switch every agent to a different model.
- D) Replay is useless for systems with non-deterministic models.
Show answer
Answer: B
- A: Wrong. It names a root cause from a difference that chance easily explains at ten runs.
- B: Right. Small differences need more runs; a real cause moves the rate decisively (like 10/10 against 0/10).
- C: Wrong. Nothing points at the model, and it's a big change with no evidence.
- D: Wrong. Replay works with variable models; that's why you run each variant many times and compare rates.
Question 5
You're building
replay.ts, which re-runs a recorded ticket through the agents. What should the tools do during a replay?- A) Serve the recorded tool responses from fixtures, record side-effecting calls as intents only, and stop the replay if a call has no matching recording.
- B) Call the production tools, so the replay is as realistic as possible.
- C) Call staging tools that use the production payment provider's keys.
- D) Skip tool calls entirely and replay only the model calls.
Show answer
Answer: A
- A: Right. Fixtures give the same inputs, side effects become intents, and a missing recording stops the run instead of going live.
- B: Wrong. Production tools can issue another real refund.
- C: Wrong. Production payment keys make "staging" able to move real money.
- D: Wrong. Without tool responses (like
status=refunded) the agents don't see what they saw in the real run, so the bug can't reproduce.
Question 6
Replay proves the cause: in contract v3 the billing agent renamed
already_refundedtorefund_status, and the reviewer's schema hadalready_refundedas optional with a default offalse. What is the best fix?- A) Add to the reviewer's prompt: "Check carefully whether the order has already been refunded."
- B) Keep the default, but log a warning whenever the field is missing.
- C) Use one shared schema on both sides, with
already_refundedrequired and no default and unknown keys rejected; add a contract test in CI; keep refund idempotency as a second defence. - D) Merge the reviewer into the billing agent so there's no handoff left to break.
Show answer
Answer: C
- A: Wrong. The reviewer never received the information, so no instruction can make it check.
- B: Wrong. A warning nobody reads still lets the refund through; the fail-open default is the problem.
- C: Right. A strict shared schema makes any mismatch fail loudly, the contract test catches it before deploy, and idempotency guards the money path on its own.
- D: Wrong. It removes one handoff, not the habit of unchecked contracts, and it loses the separation of duties.
Question 7
The fix is deployed. The audit log shows the bug ran for four hours. How should you undo the customer impact?
- A) Ask a model to read the conversation transcripts and list which refunds were duplicates.
- B) Automatically reverse every refund made during the four-hour window.
- C) Wait for affected customers to contact support.
- D) Query the audit log for ticket and order pairs with more than one successful refund, have a person review the list, and plan reversals and customer messages per each tenant's policy.
Show answer
Answer: D
- A: Wrong. Transcripts describe intent, not what the payment system did, and a model's list can be wrong.
- B: Wrong. It would also reverse legitimate first refunds and unrelated ones.
- C: Wrong. Many customers won't notice, and those who do find out from their bank first.
- D: Right. The audit log is exact, and reversing real money is risky and depends on policy, so a person decides.
Question 8
A draft postmortem says: "Engineer X deployed contract v3 without testing it." What is the best rewrite?
- A) Delete the sentence and leave the cause out of the review.
- B) Describe the conditions that allowed it (no contract test, a fail-open default on a safety field, a reviewer that trusted upstream data) and list actions, each with an owner and a date.
- C) Keep the sentence as written, because accountability matters.
- D) Replace the name with "an engineer" and keep the rest.
Show answer
Answer: B
- A: Wrong. A review without the cause is useless.
- B: Right. Blameless means naming the conditions that made the error easy, then fixing them with owned, dated actions.
- C: Wrong. Blaming a person teaches people to hide mistakes and leaves the system unchanged.
- D: Wrong. Anonymised blame is still blame; it doesn't name the missing safeguards.
Question 9
The review is done. Which two controls best stop this incident from coming back silently? (Choose TWO.)
- A) Add the recorded run as an eval case in the release gate, with "reject the second refund" as the expected behaviour.
- B) Add a runbook entry that describes this incident.
- C) Set a recurring chat reminder telling the team to test contract changes.
- D) Add an alert on more than one refund per ticket within 24 hours.
- E) Move the reviewer agent to a larger model.
Show answer
Answer: A, D
- A: Right. The eval case makes the release gate fail any change that brings the bug back.
- B: Wrong. A runbook helps the next responder but detects and prevents nothing.
- C: Wrong. A reminder relies on memory, the safeguard that already failed.
- D: Right. The alert detects a recurrence in production within minutes instead of four hours.
- E: Wrong. The reviewer lacked data, not intelligence.
Question 10
After a deploy, cost per ticket doubles and p95 latency rises. There are no errors. The usage fields show
cache_read_input_tokensnear zero since the deploy. What is the best next step?- A) Diff two consecutive request payloads (or use cache diagnostics where available) to find the first byte that changed in the prefix.
- B) Switch every cache breakpoint to the 1-hour TTL.
- C) Add more
cache_controlbreakpoints to the request. - D) Move all traffic to a cheaper model until costs come down.
Show answer
Answer: A
- A: Right. Collapsed cache reads mean the prefix changed; the first differing byte between two requests shows where (cache diagnostics is a Claude API beta).
- B: Wrong. A longer TTL doesn't help when every prefix is different.
- C: Wrong. More breakpoints don't help when the bytes before them change.
- D: Wrong. It hides the symptom, may cost quality, and the cache would still miss on the new model.
Question 11
A harness running on
claude-opus-5-5started trimming old tool results by rewriting earlier messages in place. Now some requests fail with a 400 saying a thinking block's signature is invalid because it is bound to a different conversation. Retrying didn't help. What is the best fix?- A) Retry those requests with exponential backoff until they succeed.
- B) Move those conversations to a smaller model.
- C) Strip every thinking block from every request from now on.
- D) Stop editing earlier history: make the harness append-only and use the API's context-management features for trimming, because the changed prefix makes the same body fail every time.
Show answer
Answer: D
- A: Wrong. It isn't transient; the same body fails the same way every time.
- B: Wrong. Switching models avoids the check, loses quality and leaves the harness bug.
- C: Wrong. Stripping every thinking block on every turn throws away earlier reasoning, and the history-editing harness is still there.
- D: Right. The error means history changed; append-only history with supported context management fixes the cause.
Question 12
You change the model id in config, and every call now fails with a 404
not_found_error. What is the most likely cause?- A) You're being rate limited.
- B) The API is overloaded.
- C) The model id is wrong or isn't available to your organisation; check the id and your access, and don't retry.
- D) Your API key has expired.
Show answer
Answer: C
- A: Wrong. Rate limits return 429.
- B: Wrong. Overload returns 529.
- C: Right. A 404 right after a model-id change almost always means a wrong id or a model your organisation can't use; it isn't retryable.
- D: Wrong. Credential problems return 401.
Question 13
Cedar updated its docs yesterday. Since then, many cedar responses come back HTTP 200 with
stop_reason: "refusal"and no answer text. What is the best handling?- A) Retry the same request until the model gives an answer.
- B) Read
content[0].textanyway and show whatever is there. - C) Treat a refusal as "no answer": escalate the ticket, log
stop_details.category, alert on the refusal rate per tenant, and look at what changed in the inputs, such as the new docs. - D) Automatically reword the user's message until the request gets through.
Show answer
Answer: C
- A: Wrong. The same input usually gets the same decision; blind retries waste money and delay the customer.
- B: Wrong. Check
stop_reasonbefore reading content; there's no answer to show. - C: Right. A refusal is a successful response with no usable answer; escalate, track the rate and category, and look at the changed inputs.
- D: Wrong. Rewording to get past safety checks is the wrong goal, and it hides the signal.
Question 14
One request failed with a 500
api_error. You want to raise it with the provider and match it to your own trace. Which two things are most useful to have logged? (Choose TWO.)- A) The full prompt text, in your normal application logs.
- B) The API key used for the request.
- C) The
request_idfrom the error response. - D) Only the HTTP status code.
- E) Your own run id, the model id and the timestamp, on the same span as the request id.
Show answer
Answer: C, E
- A: Wrong. Full prompts don't belong in ordinary logs, and they don't identify the request on the provider's side.
- B: Wrong. Never log secrets.
- C: Right. The
request_idis what identifies the failed request on the provider's side. - D: Wrong. A status code alone can't single out one request among many.
- E: Right. Your run id, model and timestamp join the provider's request id to your own trace.
Question 15
Refunds are paused for all tenants with the kill switch. Evidence so far shows only birch was affected, and birch customers still need answers tonight. What is the best next containment step?
- A) Turn off the whole support bot for every tenant until the fix ships.
- B) Put birch in draft-only mode (the agent drafts replies and refund requests, and a person approves before anything is sent), and keep other tenants on normal service with refunds still paused.
- C) Turn refunds back on with a lower maximum amount per refund.
- D) Switch birch to a different model.
Show answer
Answer: B
- A: Wrong. It's broader than the evidence needs and stops help for tenants who weren't affected.
- B: Right. Draft-only keeps birch customers served while a person approves every side effect, and narrowing to birch follows the evidence.
- C: Wrong. A lower limit still allows duplicates, just smaller ones.
- D: Wrong. Nothing points at the model, and a model change mid-incident adds a new variable.