fix: abort generic no-progress tool loops#80668
Conversation
|
Codex review: needs changes before merge. Summary Reproducibility: yes. from source inspection: current main records identical outcomes but generic repeats return warning-level until the global no-progress breaker, and current tests assert that behavior. I did not execute the tests because this review is read-only. Real behavior proof Next step before merge Security Review findings
Review detailsBest possible solution: Land the focused detector change once the remaining config/help text is aligned and the normal maintainer PR gates finish green. Do we have a high-confidence way to reproduce the issue? Yes, from source inspection: current main records identical outcomes but generic repeats return warning-level until the global no-progress breaker, and current tests assert that behavior. I did not execute the tests because this review is read-only. Is this the best way to solve the issue? Mostly yes: putting the critical branch in Full review comments:
Overall correctness: patch is correct Acceptance criteria:
What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 80d1df6e6830. |
|
@codex review |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
5cebcf0 to
49af9d7
Compare
49af9d7 to
7fa287c
Compare
Summary
criticalThreshold; docs and tests describe the no-progress requirement.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
Real behavior proof (required for external PRs)
pnpm test src/agents/pi-tools.before-tool-call.e2e.test.tsRoot Cause (if applicable)
criticalThresholdto repeated no-progress outcomes.Regression Test Plan (if applicable)
src/agents/tool-loop-detection.test.ts,src/agents/pi-tools.before-tool-call.e2e.test.tscriticalThreshold; changing outcomes remain warnings.User-visible / Behavior Changes
Agents with
tools.loopDetection.enablednow abort generic repeated no-progress tool loops atcriticalThresholdinstead of waiting for the global circuit breaker.Diagram (if applicable)
Security Impact (required)
Yes/No) NoYes/No) NoYes/No) NoYes/No) YesYes/No) NoYes, explain risk + mitigation: the tool loop guard can now block repeated generic no-progress tool calls sooner. It only blocks after identical outcomes, while changing outcomes remain allowed.Repro + Verification
Environment
tools.loopDetection.enabled: trueSteps
criticalThreshold.Expected
criticalThreshold.Actual
Evidence
Human Verification (required)
What you personally verified (not just CI), and how:
Review Conversations
Compatibility / Migration
Yes/No) YesYes/No) NoYes/No) NoRisks and Mitigations
tools.loopDetection.enabledandcriticalThreshold.