Skip to content

Add configurable escalation for repeated tool-call loops#3702

Closed
andrew-ellis-engineering wants to merge 1 commit into
HKUDS:nightlyfrom
andrew-ellis-engineering:feat/tool-loop-escalation-policy
Closed

Add configurable escalation for repeated tool-call loops#3702
andrew-ellis-engineering wants to merge 1 commit into
HKUDS:nightlyfrom
andrew-ellis-engineering:feat/tool-loop-escalation-policy

Conversation

@andrew-ellis-engineering
Copy link
Copy Markdown

Closes #3700

Adds configurable turn-level escalation for repeated identical tool-call patterns, with deterministic interrupt behavior, logging, and tests.

@chengyongru
Copy link
Copy Markdown
Collaborator

Thanks for the PR. Closing this for similar reasons as #3701:

  1. Already coveredmax_iterations caps loop length; repeated_external_lookup_error handles external lookups. Turn-level escalation for identical calls is solving a problem that hasn't been reported by users.

  2. ToolLoopEscalationInterrupt unconditionally raises RuntimeError, ignoring the fail_on_tool_error flag — once a threshold is hit, the entire run is killed with no graceful fallback.

  3. Duplicates Guard repeated identical local tool calls in a single turn #3701 — both PRs add near-identical signature/count logic and thread the same parameter dicts through _run_tool/_execute_tools.

  4. The repeated_tool_call_escalation_threshold field is added to AgentRunSpec but has no config-layer exposure, so it's unreachable for actual users.

Appreciate the effort though!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants