An agent processes a batch of 100 records.
Item 37 throws a fatal validation error. The other 99 processed fine.
- AKeep the 99 successes, isolate item 37, and report it for follow-up
- BRoll back all 100 and fail the entire batch
- CSilently drop item 37 and report full success
- DRetry the whole batch from item 1 with a longer timeout, since a clean rerun is simpler than tracking partial results
Answer: A
Keep the 99 successes, isolate item 37, and report it for follow-up
Why
Partial failure calls for partial success: preserve completed work, quarantine the one bad record, and surface it clearly. Discarding 99 good results or hiding the failure both destroy value.
- Errors & recoveryA payment tool times out.
- Errors & recoveryAfter a tool returns an error, the agent calmly calls the very same tool with the very same arguments, again and again.
- Errors & recoveryYour main AI provider fails halfway through a streamed answer; the user already sees the first paragraph.
- Errors & recoveryA nightly batch of 20,000 documents on DeepSeek stopped at document 12,000 with HTTP 402.
More on Way of the Agent
- Course programThe first three modules are free: start in the browser or the app, no card needed.
- Library: guides, skills and promptsReady prompt templates, grouped into collections.
- AI ChroniclesSourced stories from the history of AI.
- ConceptsPlain-language explainers of agent engineering.
- Learn AI agentsApps and courses for learning AI agents, compared honestly.
Real situations from building agents - with the answer and why.
Solve a new one every day on the Path