[Feature] Bound repeated tool-validation failures while allowing corrected calls

Open
#11,086 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
python
Domain
ai, backend

Research direction

Start by reading #7388 and #7387 for the existing repeated-call notices, then review the runner and tool-validation paths that classify failures before execution. The issue calls for agreement on the threshold, opt-in mechanism, and error classification before a general implementation; verify that corrected calls and successful repeated calls remain available, while unchanged validation failures are bounded within one run.

Written by the indexing model from the issue text.

Description

Feature Description

Provide a bounded recovery policy for repeated, deterministic tool-validation failures while allowing corrected requests to proceed.

In a scheduling incident, the agent made 16 invalid future_task(action="create") calls: 12 omitted the one-time switch and four later omitted reminder content. All failed before persistence. Repeated-call notices were logged, but the run continued making invalid calls.

#7388 already supplies escalating notices after repeated calls. This discussion concerns what should happen when the model continues submitting the same arguments and receives the same deterministic validation error despite those notices.

Proposed Behavior for Discussion
  • Identify pre-execution validation failures reliably, preferably through explicit error classification rather than matching arbitrary error text.
  • Track the same tool, equivalent arguments, and validation failure within one run. Reset the streak when arguments are corrected or execution succeeds.
  • After a small bounded number of unchanged failures, stop executing that offending tool for the current run and have the agent report that the requested operation was not completed. Keep unrelated tools available and restore normal availability on the next run.
  • Preserve successful repeated calls and legitimate polling; a repeated tool name alone is insufficient evidence of failure.
  • Treat uncertain outcomes such as network timeouts separately. A create request may already have succeeded, so state verification and request idempotency need separate design rather than blind retry.

The threshold, tool opt-in mechanism, and error classification should be agreed before implementing a general runner change. A local future_task-specific mitigation has been isolated and tested, but this issue does not propose importing the broader #6259 patch or claim a generic solution is already implemented.

Use Case

Natural-language reminders and other state-changing tools whose missing arguments can otherwise consume the entire agent step budget without making progress. The focused companion fix for one-time reminder inference is #11085, addressing #11084.

Related Work
  • #6259: closed, unmerged proposal containing error-loop protection and other mechanisms.
  • #7388 and #7387: repeated-call notices and the original looping report.
  • #8163: configurable notice thresholds; related, but does not itself specify a bounded response to deterministic validation failures.
Checklist
  • Searched existing issues and PRs; related and historical proposals are linked above.
  • This concerns AstrBot core rather than a plugin.
  • Read and will follow the project Code of Conduct.
Dominant language
Python
Stars
46.9k
Forks
3.6k
Avg merge
1d 6h
Merged PRs (30d)
136

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from AstrBotDevs/AstrBot

All issues in AstrBotDevs/AstrBot

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.