Skip to main content

Self-Correction Mid-Task

An agent that checks its work against reality before handing it over, and fixes what it finds.

Hand-drawn line illustration in warm terracotta and cream: a loopy line-drawn hand holding a cream stylus redraws a long wobbly line at the point it veered off course, the corrected path continuing forward while the abandoned crooked segment trails away, a one-line profile face observing.


What it is

Self-correction is the loop inside the loop: generate, verify against something real (a test run, a rendered screen, a compiler), and revise before declaring done. The demand-side phrasing comes from Coasty in YC's Summer 2026 batch, which describes an agent that "catches when it goes off track and fixes itself mid-task." The key word is mid-task: the check happens before the handoff, not after the damage.

The pattern in production

The published stories converge on one principle: the verification signal comes from reality, not from the model re-reading its own text.

  • CircleCI's Chunk agent generates a fix, "validates it in a real CI pipeline sandbox, retries on failure, and delivers a green pull request." The check is an actual pipeline run, and the trigger has inverted too: "More than 4 in 5 agent tasks now triggered automatically at the point of failure." (source)
  • Replit's Agent 4 tests its own apps by looking at them, "self-testing via vision" against the rendered interface, an approach its story reports "runs 3x faster and 10x more cost-effectively than computer-use approaches" on the same workflow. (source)
  • Classmethod made the check a process gate: Claude Code "performs mandatory AI self-reviews before pull requests," which its story pairs with an "Up to 80% decrease in time spent reviewing code" for the humans downstream. (source)
  • Bolt's design-system agent runs a self-review loop across its roughly 53-minute autonomous runs, resolving conflicts across thousands of components before a human sees the output. (source)

The boundary with grading

Self-correction has a known failure mode: the model grading its own work inside the same context is biased toward believing it succeeded, which is why Anthropic's guidance separates generation from judgment (the evaluator-optimizer pattern in Building effective agents, December 2024, and the fresh-context evaluator in its long-running-agents workshop material). The resolution is a division of labor. Mid-task self-correction runs against objective signals: tests pass or they do not, the page renders or it does not. Final acceptance belongs to a separate judge, whether that is Outcomes with its own grader context or a human at the gate. An agent checking its work against reality is engineering; an agent taking its own word for it is silent failure with extra steps.

Why it matters for long runs

The longer the run, the further off course an uncorrected error compounds. The corpus's hours-long autonomous runs (see Long-Running Work) are viable precisely because verification is woven through them; Rakuten's seven-hour run and Replit's six-hour sessions are continuous loops of doing and checking, not seven hours of unchecked output. Self-correction is what converts model capability into run length.

Further Reading