Tool failure handling and retry policy for an agent

MediumSystem design20 minSWEMLEPro outline

The question

A tool call fails. Describe your retry policy, how you decide when not to retry, and how you keep retries from causing duplicate side effects.

What the interviewer is looking for

  • Classifies failures: deterministic, transient and semantic
  • Retries only transient errors with backoff and jitter
  • Feeds structured errors back to the model for deterministic ones
  • Uses idempotency keys for writes
  • Sets per-tool and per-task budgets and circuit breakers

Your answer

Saved in this browser only. Nobody else sees it.

Why this question

Written by BlogLLM in the style of a publicly reported Moonshot AI (Kimi) question type: tool failure handling and retries; sandboxed code execution; prompt injection and system prompt leaks; agent evaluation metrics.

Reported in: mj.mianlingai.com

Practice question written by BlogLLM based on publicly reported interview formats. Not an official Moonshot AI (Kimi) question.