arXiv:2610.24194cs.AIOct 2026

Manuscript Offprint

arXiv:2610.24194

Agents' Last Doubt: Knowing When to Act and When to Step Back in Tool-Using Agents

Qisai Liu, Qingyue Jiao, Bangwei Guo, Wenxi Dai, Changyi Yang, Jiahe Liu, Dimitris N. Metaxas, Yiyu Shi, Zhanhong Jiang, Minghao Guo

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Qisai Liu ∗1^{*1}, Qingyue Jiao ∗2^{*2}, Bangwei Guo 3^{3}, Wenxi Dai 3^{3}, Changyi Yang 4^{4}, Jiahe Liu 5^{5}, Dimitris N. Metaxas 3^{3}, Yiyu Shi 2^{2}, Zhanhong Jiang 1^{1}, Minghao Guo 3^{3}

1^{1}Iowa State University 2^{2}University of Notre Dame 3^{3}Rutgers University 4^{4}Liquid AI 5^{5}Technical University of Denmark

Abstract. Tool-using LLM agents repeatedly face decision points under uncertainty, choosing between autonomous action, additional information gathering, and human escalation. These decisions require balancing task success against interaction cost and the risk of irreversible errors. Learning to make these trade-offs is challenging because existing interaction trajectories record only the outcomes of actions taken, leaving the consequences of alternative actions unobserved. To address this gap, we construct a counterfactual dataset containing 3,115 action outcomes from 1,036 decision points in ToolSandbox. At each decision point, we execute each legal action and evaluate its downstream outcomes based on task completion, interaction cost, and irreversible errors. Using this dataset, we train SURE-Act, a controller that selects actions for a frozen backbone agent at inference time. Our experiments show that learning to rank alternative actions improves offline action-selection utility by 0.0309 over a regression-only baseline. We further show that adding SURE-Act enables end-to-end gains of up to 0.0575 in ToolSandbox's Overall Score with the Qwen3-4B agent. Moreover, SURE-Act outperforms adapted decision rules from SAGE-Agent and Calibrate-Then-Act by 0.1506 and 0.1438, respectively. This work establishes the first counterfactual dataset for ToolSandbox and provides actionable insights into decision-making under uncertainty for tool-using agents.

1 Introduction

Tool-using large language model (LLM) agents complete tasks through multi-turn interactions with users and external environments (Yao et al., 2023, Lu et al., 2025). However, successful task completion alone does not establish that an agent made efficient decisions along the way. An agent may make unnecessary tool calls or ask the user for information already available in the environment. Conversely, acting before resolving uncertainty can lead to irreversible errors. At each turn, an agent must decide whether to act on the available information, gather more evidence, ask for clarification, or escalate to human assistance. Learning to make these decisions requires balancing task completion, interaction cost, and the risk of irreversible errors.

∗^{*}Core contribution.

Agents' Last Doubt

Figure

Figure 1. Overview of SURE-Act. Counterfactual rollouts from an environment checkpoint evaluate each legal action using a backbone LLM policy, producing success, interaction-cost, and critical-error outcomes. An LLM encoder with LoRA and a three-output prediction head estimates those outcomes from the checkpoint and the candidate action. Training combines an outcome regression loss with a gap-weighted, within-checkpoint preference loss derived from realized rollout utilities. At inference, the trained controller scores the legal actions, selects the one with the highest predicted utility, and executes it using the backbone LLM policy.

Recent work has studied the trade-off between the cost of seeking information and its value for decisions under uncertainty (Suri et al., 2026, Ding et al., 2026, Guo et al., 2026). These efforts motivate a broader question: how should an agent choose among the available actions when each may lead to different outcomes over subsequent turns? Estimating uncertainty in the current state is only part of this problem. The agent must also assess whether additional information would change its decision, what obtaining that information would cost, and what could happen if it acted immediately. This motivates comparing alternative actions by their downstream consequences at the same decision point.

Obtaining supervision for this comparison remains challenging. Existing datasets contain trajectories that show the actions taken and their outcomes, but do not directly reveal what would have happened under alternative choices. A successful trajectory therefore does not establish whether another action could have achieved the same result at lower cost. Likewise, a failed trajectory does not identify which alternative action could have prevented the failure. Learning from these trajectories alone leaves the relative value of unchosen actions unexplored.

To address this gap, we introduce a framework that uses counterfactual rollouts to supervise action selection. We obtain these labels directly from the environment. At each decision point, we clone the environment state, execute each legal meta-action for one turn, and continue under the same frozen policy (Figure 1). These counterfactual branches provide an executable label for every available action at that state. A separate controller then learns to choose among those actions while the underlying policy remains unchanged. For each candidate action, the controller predicts task success, interaction cost, and critical-error risk, combines these predictions using a predefined utility function, and selects the action with the highest predicted utility. However, accurate absolute outcome predictions may still fail to capture the small utility differences that determine action rankings. To address this limitation, we directly supervise pairwise comparisons between actions at the same decision point using a ranking loss. That loss is ordinary learning to rank applied to an unusual source. Although the loss follows

Agents' Last Doubt

standard learning-to-rank principles, its supervision comes from environment-generated counterfactual outcomes. We also establish a theoretical limitation: with only one stochastic rollout per action, observed utility differences may produce rankings that disagree with the expected utilities. We demonstrate this through a bounded counterexample (Appendix B).

Adding the pairwise ranking loss improves action ranking over a matched regression-only objective across hundreds of family-held-out partitions. However, these partitions reuse the same family pool, and the improvement becomes less conclusive under family-level resampling. End-to-end evaluation further highlights the importance of intervention frequency, with performance closely associated with how often the controller overrides the original agent across five decision intervention-control rules.

Motivated by this observation, we introduce a simple stopping criterion: the controller remains active until it selects the same action three consecutive times, after which control returns to the original agent for the remainder of the episode. This criterion improves performance across both evaluation pools, with gains assessed against serving noise measured within each job. Among the five intervention-control rules evaluated, it is the only one that maintains a positive effect after reweighting by task family. Positive mean improvements are observed with Qwen3-4B, Qwen3-8B, and Qwen3-14B backbones (Table 3), and the system outperforms two adapted decision rules evaluated under the same experimental framework.

Our main contributions are the following.

  • Executable Counterfactual Supervision. A procedure that makes the environment the evaluator, branching a live checkpoint across every legal action and scoring each continuation under a frozen policy. On ToolSandbox it yields 1,036 checkpoints from 378 task IDs and 82 families, carrying 3,115 scored action outcomes (Table 2).

• Theoretical analysis of action ranking. We establish a bound connecting within-decision-point ranking errors to decision regret and characterize how stochastic single-rollout supervision can misalign learned action rankings with expected utility.

  • SURE-Act with Intervention-Aware Control. We develop a controller that predicts action utility and introduce a preregistered stopping criterion that limits unnecessary interventions. The resulting approach yields positive mean improvements across the evaluated pools and three backbone sizes, and outperforms two adapted decision rules.

References (47)