Beyond Clumsy Agentic Tool Calling: How Cueing and Spotting Make the Difference
Authors: Xindi Yang, Yan Liu, Jiajun Sun
Organizations: School of Computer Science and Technology, Tongji University, Shanghai, China · Shanghai Highly Electrical Appliance Co., Ltd, Shanghai, China
LLM-based task-oriented agents depend on tools to interact with their environments, but may overlook execution feedback, repeat ineffective calls, or persist with unproductive strategies. These behaviors can hinder agents' ability to use tools autonomously and sustain task progress. We characterize tool-use symptoms at two temporal granularities: local clumsy tool-use behaviors and tool-use detours spanning multiple interactions. Towards greater autonomy in tool use, we present ToolPulse, an online middleware supporting autonomous tool use through cueing and spotting. ToolPulse tracks execution state and temporal interaction patterns, monitoring proposed calls before dispatch and inspecting execution feedback prior to the agent resumes reasoning. It combines state-based rules, semantic sequence analysis, and interaction-feature similarity to identify intervention opportunities and provide verbal reminders, structured feedback, or context-specific advice from auxiliary models. Our process-oriented evaluation distinguishes trigger validity, behavioral cessation, and substantive correction alongside task outcomes and resource costs. Using SWE-agent with three backbone models, we evaluate 1,350 trajectories on 90 Python, C++, and Java bug-fix tasks, comparing unassisted execution with four assistance strategies. Substantive responses follow 61.6-90.9% of valid triggers for tool-use detours. Concise reminders achieve the highest observed aggregate substantive-response rate; more elaborate assistance offers symptom-dependent benefits and can be less effective. Aggregate repair outcomes remain close to baseline, with token savings in selected settings. These findings support proactive runtime assistance for autonomous tool use. The gap between behavioral adjustment and aggregate repair gains calls for careful decisions on intervention timing and assistance strategy in autonomous agents.
Figures & tables
Figure 1: An example of ToolPulse’s verbal cueing, showing repeated search calls, a runtime reminder, and the agent’s subsequent switch to testing.
Group
Trajectory Representation
Sequence Detection
G1
A sequence of discrete symbols, each representing a tool name.
Sequitur identifies recurring and nested tool-name sequences through incremental hierarchical grammar induction ( Nevill-Manning and Witten, 1997 ) .
G2
A sequence of bug-fix-oriented labels assigned to interactions according to their function and execution result.
Sequitur identifies recurring functional patterns, allowing calls with different tool names or arguments to share the same symbolic representation.
G3
A sequence of numerical feature vectors describing model behavior and task state.
Matrix Profile identifies approximately recurring trajectory segments through nearest-neighbor distances between fixed-length subsequences ( Yeh et al., 2016 ) .
Table 1: Trajectory representations and sequence detection methods in the pilot study.
Functional Level
Label
Meaning
Retrieve
Ls
search
Lt
targeted read
Lb
browse whole file
Operate
E
environment setup
P
edit
Ps
edit with syntax error
Table 2: Bugfix-oriented action labels and their definitions.
LLM
Task
Baseline
Intervention Strategy
Sequitur
Semantic Sequitur
Matrix Profile
DeepSeek-V4-Pro
30
21
21 (2/2)
22 (1/0)
21 (2/2)
Qwen3-Coder-Plus
30
19
18 (1/2)
18 (0/1)
17 (0/2)
Table 3: Performance comparison under different intervention groups. Task is the number of bug-fix instances evaluated for each LLM. Baseline is the number of instances whose patch passes the issue-specific tests without intervention. Each intervention strategy cell has the form P(G/L) : P is the number passing under that strategy, G is the number that fails under baseline but passes with intervention (newly passed), and L is the number that passes under baseline but fails with intervention (regressed). All comparisons use the same task instances within each LLM.
Figure 2: Relative changes in total token usaage against the paired baseline for different intervention strategies under two backbone LLMs. Points show relative changes in summed tokens, negative values indicate savings, and error bars show 95% paired bootstrap confidence intervals obtained by resampling instances with replacement, retaining baseline–method pairs, and recomputing the relative change; resampling in (b) is conducted within each difficulty stratum.
Model
Group
Duplicate Action (%)
Loop Action (%)
Failed Action
Escape
Recurrence
Any-pattern
Same-pattern
Mean
Max
DeepSeek-V4-Pro
Baseline
100.00 (3/3)
0.00 (0/3)
33.33 (1/3) 0.00 (0/1) 88.89 (32/36)
0.00 (0/3) 0.00 (0/1) 61.11 (22/36)
8.66
22
Sequitur
80.00 (4/5)
0.00 (0/5)
0.00 (0/2)
0.00 (0/2)
8.17
46
Semantic Sequitur
58.33 (7/12)
11.11 (1/9)
0.00 (0/3)
0.00 (0/3)
7.76
33
Matrix Profile
88.89 (8/9)
12.50 (1/8)
75.00 (21/28)
50.00 (14/28)
7.55
24
Qwen3-Coder-Plus
Baseline
N/A
N/A
25.00 (1/4) 0.00 (0/1) 84.21 (16/19)
0.00 (0/4) 0.00 (0/1) 63.16 (12/19)
7.30
11
Table 4: Escape is the percentage of Duplicate Action triggers followed by a different tool call at the next step. Recurrence is the percentage of task instances with Duplicate Action in which it recurs later. Any-pattern and Same-pattern are the percentages of Loop Action triggers followed by another Loop Action of any pattern or the same pattern, respectively, in the remaining trajectory. The three baseline entries in each Loop Action column correspond to Sequitur, Semantic Sequitur, and Matrix Profile, from top to bottom. Mean is the mean Failed Action count per task instance containing at least one Failed Action; Max is the largest within-instance count of any single tool–error-type pair. Parentheses give numerator/denominator counts in the corresponding statistical unit; n/a indicates no eligible triggers or task instances.
Figure 3: ToolPulse overview. At step t , rt , at , and ot denote the agent’s reasoning record, proposed tool call, and execution result, respectively. The pre-execution context Ht− comprises the task input, prior trajectory, rt , and at ; the post-execution context Ht+ adds ot . Red and green dashed arrows mark the respective pathways. ToolPulse tracks the evolving state flow, detects clumsy tool-use behaviors and tool-use detours, and provides assistance mt under one of four conditions (one per run). The agent receives ot=mt for intercepted calls or ot=ot⊕mt otherwise, where ⊕ denotes joint presentation of tool output and assistance, and remains responsible for subsequent decisions and actions. Wandering Flood is assessed after task completion through candidate screening and contextual assessment of the complete trajectory, without triggering online assistance.
Dimension
Symptom
Category
Description
Exploration
Wandering Flood
Clumsy tool-use behavior
Excessive exploration whose scope is insufficiently constrained and may incur substantial hidden costs.
Progress
Calling Repetition
Clumsy tool-use behavior
Consecutive calls with identical tool names and arguments.
Progress
Functional Cycle
Tool-use detour
Periodic repetition of an ordered sequence of actions with the same semantic functions.
Progress
Strategic Fixation
Tool-use detour
Sustained similarity in multistep interaction features within a short sliding window.
Grounding
Blind Command
Clumsy tool-use behavior
A potentially risky action taken before the relevant environment state has been established through observation.
Recovery
Failure Inertia
Tool-use detour
Repeated tool failures without a substantive recovery action.
Table 5: Clumsy tool-use behaviors and tool-use detours considered in ToolPulse. Observations of repeated calls, recurring action patterns, and repeated failures in the pilot study (Section 3 ) informed this organization and motivated closer attention to exploration scope, task progress, action grounding, and recovery efforts.
Symptom
Affected Trajectory
Event
Valid
Ceased
Substantive Response
Calling Repetition
34 / 1,080
164
Rule-defined
80 / 164 (84 persists)
20 / 80 (60 non-substantive)
Functional Cycle
42 / 1,080
48
29 / 48 (19 invalid)
19 / 29 (10 persists)
19 / 19 (0 non-substantive)
Strategic Fixation
570 / 1,080
1,841
1,134 / 1,841 (700 invalid)
715 / 1,134 (417 persists)
699 / 715 (16 non-substantive)
Blind Command
36 / 1,080
86
Rule-defined
67 / 86 (19 persists)
41 / 67 (26 non-substantive)
Failure Inertia
101 / 1,080
154
110 / 154 (42 invalid)
100 / 110 (10 persists)
100 / 100 (0 non-substantive)
Table 6: Online clumsy tool-use behaviors and tool-use detours in 1,080 assisted trajectories. Affected Trajectory counts runs with at least one trigger; Event counts step-level triggers. Valid is judge-valid triggers over all triggers (rule-defined for Calling Repetition and Blind Command). Ceased is stopped over valid triggers, or over all triggers for the two rule-defined categories. Substantive Response is substantive over ceased events. Discrepancies between totals and category counts reflect cases judged unclear
Figure 4: Occurrence rates of six tool-use symptoms per 100 agent steps, grouped by backbone model, programming language, and task difficulty. Darker cells indicate higher occurrence rates.
Symptom
Candidate Trajectory
Event
Verdict
Positive Trajectory
Wandering Flood
935 / 1,350
3,191 candidates judged
799 / 3,191 (2,391 no)
400 / 1,350
Table 7: Offline Wandering Flood analysis across 1,350 trajectories. Candidate Trajectory counts runs with at least one screened step; Event counts candidates judged. Verdict is positive over judged candidates. Positive Trajectory counts runs with at least one positive step. Discrepancies between totals and category counts reflect cases judged unclear
Symptom
Reminder-Only Verbal Cueing
Guided Verbal Cueing
Visual Cueing
Tactile Spotting
Calling Repetition
16, [0.09]; 4/16
27, [0.15]; 6/27
68, [0.38]; 4/68
53, [0.30]; 6/53
Functional Cycle
12, [0.07]; 7/9
15, [0.09]; 6/11
15, [0.08]; 6/7
6, [0.03]; 0/2
Strategic Fixation
236, [1.35]; 118/169
236, [1.35]; 96/162
245, [1.39]; 106/171
1,124, [6.40]; 379/632
Blind Command
16, [0.09]; 9/16
14, [0.08]; 11/14
16, [0.09]; 10/16
40, [0.23]; 11/40
Failure Inertia
32, [0.18]; 20/23
43, [0.25]; 22/24
36, [0.20]; 26/27
43, [0.24]; 32/36
Table 8: For each symptom and assistance condition, each cell reports the trigger count, triggers per 100 attempted agent tool actions in brackets, and substantive corrective responses / eligible triggers. Eligible triggers are rule-defined for Calling Repetition and Blind Command and judged valid otherwise.
Condition
Trajectory with Run
Trigger in Runs
Run Length
Reminder-Only
0 / 140
0 / 236
N/A
Guided Verbal Cueing
0 / 140
0 / 236
N/A
Visual Cueing
0 / 146
0 / 245
N/A
Tactile Spotting
107 / 144
974 / 1,124
3 [2, 5], 30
Table 9: A run is a maximal sequence of at least two consecutive Strategic Fixation triggers. Trajectory with Run reports trajectories containing runs / trajectories with any Strategic Fixation trigger. Trigger in Runs reports triggers in runs / all Strategic Fixation triggers. Run Length reports the median [Q1, Q3] and maximum.
Language
LLM
Task
Baseline
Assistance Strategy
Reminder-Only Verbal Cueing
Guided Verbal Cueing
Visual Cueing
Tactile Spotting
Python
DeepSeek-V4-Pro
30
21
22 (2/1)
22 (2/1)
22 (1/0)
23 (2/0)
Qwen3-Coder-Plus
30
19
18 (1/2)
18 (2/3)
17 (0/2)
17 (0/2)
Qwen3.6-27B
30
21
20 (1/2)
21 (1/1)
21 (2/2)
22 (2/1)
C++
DeepSeek-V4-Pro
30
12
12 (1/1)
12 (0/0)
11 (0/1)
12 (1/1)
Qwen3-Coder-Plus
30
5
6 (2/1)
7 (2/0)
5 (1/1)
6 (3/2)
Table 10: Task outcome comparison under different conditions. Task is the number of bug-fix instances evaluated for each language–LLM pair. Baseline is the number of instances whose patch passes the issue-specific tests without assistance. Each assistance cell has the form P(G/L) : P is the number passing under that condition, G is the number that fails under baseline but passes with assistance (newly passed), and L is the number that passes under baseline but fails with assistance (regressed). All comparisons use the same task instances within each language–LLM pair.
Figure 5: Relative change in total token usage under the four assistance strategies compared with the paired baseline, grouped by programming language and backbone model. Points show percentage changes in summed input and output tokens, including auxiliary-model tokens where applicable. Error bars indicate 95% paired bootstrap confidence intervals; negative values indicate lower token usage.
Figure 6: Relative change in total token usage across easy, medium, and hard tasks, grouped by programming language and backbone model. Points show percentage changes relative to the paired baseline, including auxiliary-model tokens where applicable. Lines connect difficulty levels within each assistance condition, and error bars indicate 95% paired bootstrap confidence intervals.
Related work
Main approach
ToolPulse’s advantage
ACE ( Zhang et al., 2026 )
Supplies accumulated playbook strategies as context for new tasks, refining reusable guidance through reflection and curation of execution experience.
Activates guidance when a tool-use symptom is detected, matching the cue and its delivery point to current execution evidence.
Wink ( Nanda et al., 2026 )
Inspects trajectories asynchronously at fixed step intervals, providing corrective guidance when an observer’s assessment becomes available to the agent.
Inspects every tool interaction before and after execution, enabling call interception and feedback-grounded assistance at the corresponding decision point.
LivePlan ( Liu et al., 2026 )
Detects drift through graph revisits, repeated cycles, and prolonged or missing problem-solving phases, then supplies corresponding corrective advice.
Combines semantic sequence detection with continuous interaction-feature similarity, adding approximate multistep recurrence to the conditions that can trigger assistance.
Outcome Monitors ( Panthi and Abdelfattah, 2026 )
Checks individual tool results against outcome contracts and appends violation receipts that identify diagnostic evidence and publicly available recovery tools.
Extends monitoring to relationships across calls, capturing functional cycles and strategic fixation even when individual tool results remain valid.
Sentry ( Ji et al., 2026 )
Uses LLM-based failure diagnosis and an evolving playbook of verified recoveries to select guidance for the agent’s current difficulty.
Determines intervention triggers through executable state and temporal criteria, enabling direct replay of detection decisions from recorded tool interactions.
Table 11: Related approaches and ToolPulse’s corresponding engineering advantages for supporting autonomous tool use.
Figure 7: ToolPulse reference implementation. Framework-specific parsers, semantic labelers, and lifecycle connections link agent frameworks to shared state-flow tracking, symptom detection, and assistance components. Minimal ReAct demonstrates explicit integration at individual interaction steps, while the SWE-agent adapter encapsulates integration with an existing framework’s execution and message lifecycle. Orange denotes framework-specific adaptation, and blue denotes shared capabilities. Solid connections indicate implemented integrations; dashed elements identify extension points.
Appendix figures & tables4 assets
Supplementary material from the paper’s appendix.
Appendix
No.
Difficulty
Task instance ID
1
Easy
astropy__astropy-7166
2
Easy
django__django-13516
3
Easy
django__django-13794
4
Easy
fastapi__fastapi-1524
5
Easy
psf__requests-1921
6
Easy
pytest-dev__pytest-7982
Appendix
Table 12: The 30 Python task instances used in the pilot study.
No.
Difficulty
Task instance ID
1
Easy
catchorg__Catch2_2288
2
Easy
fmtlib__fmt_1390
3
Easy
fmtlib__fmt_1407
4
Easy
fmtlib__fmt_2070
5
Easy
fmtlib__fmt_2310
6
Easy
fmtlib__fmt_2940
Appendix
Table 13: The 30 C++ task instances used in the main experiments.
No.
Difficulty
Task instance ID
1
Easy
alibaba__fastjson2_2559
2
Easy
apache__dubbo_11781
3
Easy
elastic__logstash_15697
4
Easy
fasterxml__jackson-core_1142
5
Easy
fasterxml__jackson-core_1208
6
Easy
fasterxml__jackson-databind_4050
Appendix
Table 14: The 30 Java task instances used in the main experiments.
Table 15: Manual verification of 100 randomly sampled LLM-judge outputs by one expert. Arrows indicate revisions from the judge’s label to the expert’s label.
Large language model (LLM) agents increasingly interleave natural language reasoning with external tools such as web search and code execution. These tool-use policies are often optimized via reinforcement learning (RL), which can amplify spurious correlations in the training data. In this work, we study when and why RL-trained agents learn shortcut tool-selection policies: invoking tools based on superficial prompt cues rather than genuine task requirements. We construct controlled synthetic environments combining factual question answering and mathematical reasoning tasks, and inject cues that are strongly correlated with specific tools during training but causally irrelevant to tool necessity. Across counterfactual evaluations where cues are present but the associated tools are not required, agents exhibit substantial shortcut behavior, with spurious tool invocation rates increasing by up to 39 percent. However, shortcut formation is not universal: across the conditions we test, it arises only when the agent has already learned to use the target tool reliably, suggesting that task competence, rather than dataset imbalance alone, is a key factor in shortcut learning. A swapped-cue analysis further shows that semantic alignment between cues and tools substantially amplifies this effect. To mitigate these failures, we introduce a dense, decision-level reward in which an LLM judge evaluates the necessity of each tool call. This tool-necessity reward effectively suppresses cue-driven tool use while preserving task performance, providing a practical approach to improving the robustness of LLM agent tool-use policies.
Yiwei Yang, Haoxiang Zhang, Bingbing Wen +6
University of Washington · University of California San Diego · Stanford University
Tool-augmented LLM agents tend to call tools indiscriminately, even when the model can answer directly. Each unnecessary call wastes API fees and latency, yet no existing benchmark systematically studies when a tool call is actually needed. We propose When2Tool, a benchmark of 18 environments (15 single-hop, 3 multi-hop) spanning three categories of tool necessity -- computational scale, knowledge boundaries, and execution reliability -- each with controlled difficulty levels that create a clear decision boundary between tool-necessary and tool-unnecessary tasks. We evaluate two families of training-free baselines: Prompt-only (varying the prompt to discourage unnecessary calls) and Reason-then-Act (requiring the model to reason about tool necessity before acting). Both provide limited control: Prompt-only suppresses necessary calls alongside unnecessary ones, and Reason-then-Act still incurs a disproportionate accuracy cost on hard tasks. To understand why these baselines fail, we probe the models' hidden states and find that tool necessity is linearly decodable from the pre-generation representation with AUROC 0.89--0.96 across six models, substantially exceeding the model's own verbalized reasoning. This reveals that models already know when tools are needed, but fail to act on this knowledge during generation. Building on this finding, we propose Probe&Prefill, which uses a lightweight linear probe to read the hidden-state signal and prefills the model's response with a steering sentence. Across all models tested, Probe&Prefill reduces tool calls by 38% with only 1.7% accuracy loss, while the best baseline at comparable accuracy only reduces 6% of tool calls, or achieves a similar tool call reduction but incurs a 5× higher accuracy loss. Our code is available at https://github.com/Trustworthy-ML-Lab/when2tool
LLM agents use tools to access information and perform computations beyond their parametric knowledge. Existing tool-use benchmarks evaluate whether agents select and call the right tools, assuming that tool returns are reliable. However, tools can return plausible but incorrect outputs. We evaluate 14 models with three tools (web search, an LLM sub-agent, and a code executor), corrupting their returns to examine whether agents overrely on unreliable tools. Agents adopt corrupted returns at high rates, with mean adoption exceeding one third for every tool and reaching 68.0% for web search. Corrupted returns also frequently override correct answers that agents give without tools, and this reliance persists in more complex tasks and in tasks that combine multiple tools. Agents often make more tool calls under corrupted returns, and reasoning traces show them questioning a return and even stating the correct answer. Nevertheless, they still pass the corrupted content to users, rarely warning them of the conflict. We further test interventions spanning prompts, tool metadata, post-training, and activation steering. Verification prompts reduce adoption across all three tools while largely preserving accuracy with correct returns, and reliability labels provide partial mitigation in web search. The tested post-training methods offer limited gains, and the effect of activation steering depends on the model and intervention strength. Overall, our findings provide a basis for diagnosing tool overreliance and for developing agents that assess tool returns rather than assuming their reliability.
Hoyeol Yang, Woojung Song, Taewon Kim +3
Seoul National University, Seoul, Republic of Korea