Skip to content

Fix recovery false positive after terminal review - #393

Merged
Wibias merged 4 commits into
mainfrom
fix/recovery-terminal-false-positive
Aug 29, 2026
Merged

Fix recovery false positive after terminal review#393
Wibias merged 4 commits into
mainfrom
fix/recovery-terminal-false-positive

Conversation

@Wibias

@Wibias Wibias commented Aug 29, 2026

Copy link
Copy Markdown
Owner

Summary

Fix the Codex watchdog recovery false positive seen after a completed read-only acceptance review.

The reproduced failure is a terminal REJECTED report where no further repository action is authorised, but the Stop hook still injects recovery 1/3. After the assistant explicitly reports that no further action is authorised, the persisted recovery state can inject recovery 2/3 as well.

Root cause

Stop feeds the final assistant message through the no-progress watchdog and then treats any interrupt, including the generated-character budget, as evidence that a selected tool/action boundary is still missing. Once recovery starts, it stays active until a real tool boundary even when the corrective continuation is an explicit terminal disposition.

Fix

  • recognise explicit terminal dispositions such as No further action is authorized.
  • clear narration recovery instead of forcing another corrective continuation
  • preserve the hard stop for malformed tool-protocol emission
  • preserve active recovery when the same response announces a new tool action, so terminal wording cannot be used as a bypass
  • keep the existing normal narration recovery behaviour unchanged

Regression coverage

  1. A completed terminal report over the 12,000-character no-progress generation budget must not produce recovery 1/3.
  2. An active recovery followed by a terminal disposition must not produce recovery 2/3.
  3. A response that contains terminal wording but also announces another tool action must stay in recovery.

TDD evidence

The first commit, 67fc71b105e353122ca14d7fed32d36999a472c4, contains the two original regressions only. CI fails both assertions on the unchanged hook and returns the exact recovery 1/3 and recovery 2/3 outputs from the reported bug.

A later adversarial regression also covers the mixed terminal-plus-tool-intent bypass before the final guard was tightened.

@coderabbitai

coderabbitai Bot commented Aug 29, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 7b326232-65de-4a60-be0b-28917c8a0da1


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Wibias
Wibias merged commit cd99b70 into main Aug 29, 2026
11 checks passed
@Wibias
Wibias deleted the fix/recovery-terminal-false-positive branch August 29, 2026 07:35
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.

1 participant