SaveMyToken logoSaveMyToken.Coding Plan
← Agents & tools

FREE AI FDE PRACTICE / AGENTS & TOOLS

A Tool Timeout Does Not Prove the External Action Failed

By West Mao and Alex GeorgeAdvanced 10-min practiceUpdated Editorial review: 2026-10-05

TL;DR — Approach in brief

A dispatch request times out, leaving uncertainty about whether a parcel was already sent. Practice distinguishing an unknown outcome from a confirmed failure. Propose a recovery path using available operation records, reconciliation and safe retry behavior, with a stopping point when the result cannot be established. Test your reasoning against a committed action whose response was lost.

YOUR SCENARIO

How would you approach this?

An agent submits a warehouse dispatch request. The service times out before returning a result, and retrying could send a second parcel. How should the agent and application recover?

This is an illustrative practice scenario. State any additional assumptions in your answer.

Make your case first.

Clarify the goal, identify the biggest uncertainty, outline an approach, and explain how you would test it. Spend about 10 minutes before opening the reference.

Your notes are not submitted or saved. Keep a copy before leaving this page.

Reveal reference approach Clarifying questions, decisions, and tradeoffs

Clarify before designing.

  • Does the service support an idempotency key or a lookup by client operation ID?
  • Can you distinguish a failed request from a completed operation whose response was lost?

One defensible approach

  1. 01

    Represent the uncertainty

    Record a stable operation ID and an unknown outcome. Do not label the dispatch failed solely because the caller timed out. Keep this state separate from permanent rejection and confirmed success.

  2. 02

    Reconcile before repeating

    Query the service for the operation state if supported. For safe retries, reuse the same idempotency key and intent, respecting the provider's scope and retention contract. A new key would represent another action, not recovery of this one.

  3. 03

    Bound recovery

    Apply retry limits and a deadline. If the outcome cannot be established safely, route to a human reconciliation queue with the operation record. Test a committed write followed by a lost response, not just a pre-execution network failure.

Explain the tradeoff

Pausing an uncertain action can delay fulfillment. Automatically repeating it can create a second external effect that is harder to reverse.

Common mistakes

  • Assuming all timeouts are safe to retry.
  • Generating a fresh idempotency key on every attempt.

KEEP THE CONVERSATION GOING

Try the follow-ups.

  1. What if the idempotency window expired?
  2. How do you report partial completion to the customer?

Review your own answer.

Tick the points you covered. This is a reflection checklist, not an automated score or a hiring prediction.

Check the underlying concepts.

The scenario and reference approach were written for SaveMyToken. These sources support the technical concepts; they do not report this question being asked by an employer.

AWS Builders’ Library: Making retries safe with idempotent APIs ↗