Skip to content

feat: gate loop detection on repeated tool calls - #2124

Open
avoidwork wants to merge 1 commit into
mainfrom
feat/tool-call-loop-detection
Open

avoidwork wants to merge 1 commit into
mainfrom
feat/tool-call-loop-detection

Conversation

@avoidwork

Copy link
Copy Markdown
Owner

Description

Adds a separate loop-detection mechanism that flags a loop when the same tool is called repeatedly against the same target (same tool name + same target/argument) with no state change between calls. This is distinct from the existing word-chain text detector. This PR contains the OpenSpec proposal, design, spec delta, and task breakdown for the change.

Type of Change

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactor (no functional changes)
  • Performance improvement
  • CI / build / tooling

Testing

Spec and task breakdown only in this commit; implementation and tests follow in subsequent commits. Verification will run npm run test, npm run lint, and npm run coverage.

Coverage

  • Line coverage maintained

Checklist

  • npm run lint passes
  • Tests pass with maintained line coverage
  • No forbidden patterns used
  • Conventional Commit style applied

Closes #2120

Adds the OpenSpec proposal, design, spec delta, and task breakdown for
gating loop detection on repeated tool calls to the same target.
@avoidwork avoidwork self-assigned this Nov 26, 2026
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.

feat: gate loop detection on repeated tool calls

1 participant