fix(loop-detection): escalate generic_repeat to critical at criticalThreshold#60248
fix(loop-detection): escalate generic_repeat to critical at criticalThreshold#60248jwchmodx wants to merge 2 commits intoopenclaw:mainfrom
Conversation
Greptile SummaryThis PR correctly fixes the Confidence Score: 5/5Safe to merge — logic is correct, all call sites are updated, and only P2 suggestions remain. No P0 or P1 issues found. The critical-threshold check for generic_repeat is correctly ordered before the warning check, matching the established pattern. The mattermost DM threading guard is complete and tested. Remaining comments are style suggestions only. No files require special attention.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e02478669a
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9a02183ce7
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
…hreshold The generic_repeat detector only checked warningThreshold and always returned level "warning", making criticalThreshold effectively a no-op for the most common runaway loop pattern (same tool + same args). Add a critical-threshold check before the warning check, consistent with how known_poll_no_progress and ping_pong already behave. Fixes openclaw#60111 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
9a02183 to
9fd4b85
Compare
|
ProjectClownfish pushed a narrow repair to this branch so the original contributor path can stay canonical. Source PR: #60248 |
|
Codex review: needs changes before merge. What this changes: This PR changes Required change before merge: This is a narrow automation-safe PR repair: update the existing branch's e2e and diagnostic expectations for the already-chosen no-progress-gated behavior, without needing product, security, or release approval. Security review: Security review cleared: Security review cleared: the current diff touches loop-detection logic, tests, docs, and changelog only, with no dependency, CI, release, secret, or package execution changes. Review findings:
Review detailsBest possible solution: Land the no-progress-gated Do we have a high-confidence way to reproduce the issue? Yes. Source and test inspection on current main shows Is this the best way to solve the issue? No, not as currently submitted. The no-progress-gated critical path is the narrow maintainable direction and avoids progressive-output false positives, but the PR needs the before-tool-call e2e and diagnostic expectations updated before it is the best mergeable fix. Full review comments:
Overall correctness: patch is incorrect Acceptance criteria:
What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against a256745323ab. |
Summary
Fixes #60111.
The
generic_repeatdetector only checkedwarningThresholdand always returnedlevel: "warning", makingcriticalThresholda no-op for the most common runaway loop pattern (same tool, same arguments, repeated calls).criticalThresholdcheck in thegeneric_repeatcode path, before the existingwarningThresholdcheckThis makes
generic_repeatconsistent withknown_poll_no_progressandping_pong, which both escalate to"critical"atcriticalThreshold.known_poll_no_progressping_ponggeneric_repeat(before)generic_repeat(after)Test plan
level: "critical"anddetector: "generic_repeat"atcriticalThreshold🤖 Generated with Claude Code