Uncertainty-Aware Self-Correction for Coding Agents
Abstract
Recent advances in large language models (LLMs) have enabled agentic systems that perform complex, multi-step tasks in realistic environments, particularly in software engineering settings where agents must navigate code bases, plan actions, execute code, and iteratively adapt based on environmental feedback. Despite their capabilities, agent reliability remains a critical challenge: errors made early in an agent's trajectory can propagate, leading to incorrect patches, wasted computation, or misleading confidence. Most existing uncertainty estimation methods focus on single-turn outputs and do not account for uncertainty accumulation across multi-step reasoning. In this work, we apply Situational Awareness Uncertainty Propagation (SAUP) to coding agents operating on SWE-Rebench, an extension of SWE-bench emphasizing reproducible, environment-grounded evaluation. We demonstrate how step-level uncertainty estimation can be propagated across an agent's trajectory and used to trigger self-correction when confidence is low. By intervening selectively at high-uncertainty steps, our approach improves final task success while avoiding unnecessary computation. Across three frontier models (GPT-5, Claude Opus 4.5, and DeepSeek V3.2), uncertainty-aware resampling reduces mean trajectory uncertainty by 6-20 % relative and improves pass@1 by up to 15.6 absolute percentage points, with latency overhead of 1.2-3.0 times depending on the model.
BibTeX
@inproceedings{adeleke2026uncertainty,
author = {Tinuade Adeleke and Lokesh Sai Dasari and Anubhav Pal and Jason Almeida and Sean Wu and Ruizhe Li},
title = {{Uncertainty-Aware Self-Correction for Coding Agents}},
booktitle = {AIWILD @ ICLR},
year = {2026},
url = {https://openreview.net/forum?id=KgQphSXJj4},
}Ask Althea to put this paper to the test.
Loading related content...