Skip to content

Interview question · Build-an-Agent Coding Rounds

Implement an idempotent write wrapper keyed on business intent.

The key must be the same however the repeat happens: a transport retry, the model asking twice, a crash replay. Derive it from what the action means, store it atomically with the result, and refuse the same key with different arguments.

mediumEssentialNewUpdated Nov 2026

The key must be the same however the repeat happens: a transport retry, the model asking twice, a crash replay. Derive it from what the action means, store it atomically with the result, and refuse the same key with different arguments.

Make your first attempt

Before you read on, answer it yourself

  1. 01 State the assumptions your answer depends on.
  2. 02 Explain the mechanism and choose a control.
  3. 03 Say what fact, if it changed, would flip your answer.

Then open the worked answer: the approach, how a panel scores it, and the follow-ups. Check where your reasoning diverged.

6 answers per topic instead of 5, plus saved progress and bookmarks · costs nothingor unlock all 237 remaining answers · $25

All 19 topics with every worked answer, all lessons and courses, the full practice bank, and anything new that appears during your access.

6 months · One payment · No auto-renewal

What if · follow-ups that change one fact

The answer works through 4 follow-ups like an interviewer would

Your wrapper keys writes on business intent and stores results atomically.

  1. What if the customer really needs a second refund on the same order for a different item?
  2. What if two workers claim the same key at the same moment?
  3. What if keys are kept for only a day but runs can pause for a week?
  4. One-line summary?

Each rung has a nudge, a model answer, the principle that carries over and the weak answer to avoid. Premium opens every answer and ladder.

UP NEXT ON YOUR JOURNEY
DISCUSSION · 0

Nobody has commented. Post a correction or another way to answer.