AI UX PlaygroundNewsletterJoin 2K+ AI designers and PMs on Substack. New teardowns, patterns, and prompts as they drop.

Agents

Self-Correction

When the agent detects its own error, a failed tool call, failing test, or broken plan, it retries or revises with a visible explanation. People see the fix, not a silent wrong final state.

Interactive demo

Logs
Waiting for input...

Overview

How might we design self-correction so people can trust and act on AI output?

When to use

  • Essential for autonomous AI agents, coding assistants, and automated workflow tools where self-recovery from errors improves reliability and user trust.

When to skip

  • One-shot answers where retries would surprise the user with extra cost.
  • Domains where automatic retries can amplify damage (notify and stop instead).
  • Creative tasks where “wrong” is subjective and user taste should drive edits.

Rules

  • Endless retry loops with no budget or user cancel.

  • Corrections that hide the original failure evidence.

  • Claiming success after a partial fix that still fails checks.

  • Burning tokens on retries without showing cost impact.

Evidence

ProductImplementation
CursorAgent retries after command failures with updated plans.
GitHub CopilotIterative fix suggestions when prior code fails.
AutoGPT-style agentsLoop on errors with revised steps in the task log.
LangChain agentsTool error handling and re-planning in traces.

FAQ

What is self-correction in agent UX?

Self-correction is when the agent notices a failure or inconsistency and attempts a fix, while showing the error and the revised step to the user.

How is it different from a repair contract?

Self-correction is initiated by the agent. A repair contract is initiated by the user with explicit keep/change constraints.

How many retries are safe?

Cap retries with a budget and escalate to the user after repeated failure. Show the count and stop reason.

What should the UI show during correction?

The failed step, the hypothesized cause, and the next attempt. Collapsed traces are fine if expand reveals detail.