Skip to content

fix: resolve clean_exit_no_signal false retry loop (t198)#834

Merged
marcusquinn merged 1 commit intomainfrom
feature/t198
Feb 10, 2026
Merged

fix: resolve clean_exit_no_signal false retry loop (t198)#834
marcusquinn merged 1 commit intomainfrom
feature/t198

Conversation

@marcusquinn
Copy link
Owner

Summary

Fixes the clean_exit_no_signal false retry loop that wasted retry attempts on tasks that either hit backend errors during retries or were already done/obsolete.

Root Causes Found

1. Backend error detection threshold too strict

  • evaluate_worker() used log_lines < 10 to detect short backend-error-only logs
  • Retry logs include an 8-line REPROMPT METADATA header, inflating line count to 12+
  • Backend errors like "All Antigravity endpoints failed" were misclassified as clean_exit_no_signal
  • Fix: Added content_lines metadata field that excludes REPROMPT METADATA headers

2. No detection path for "task already done"

  • Workers that determine a task is obsolete exit cleanly (EXIT:0) with no signal and no PR
  • The supervisor had no way to distinguish this from "worker ran out of context"
  • Tasks like t135.4 ("TASK ALREADY DONE") and t135.5 ("already done") were retried repeatedly
  • Fix: Added task_obsolete detection in extract_log_metadata that checks the workers final text output for explicit "already done" / "no changes needed" language, classified as complete:task_obsolete

Evidence

From production supervisor logs:

  • t135.3: 3 retries, all "All Antigravity endpoints failed" with EXIT:0 (12 lines each)
  • t135.4: Worker said "TASK ALREADY DONE" on first run, then 2 retries hit backend errors
  • t135.5: Worker said "Task t135.5 is already done" on first run, then retried

Changes

  • .agents/scripts/supervisor-helper.sh: Added content_lines and task_obsolete metadata fields in extract_log_metadata(), updated evaluate_worker() to use content_lines for backend error threshold and detect task obsolescence before falling through to clean_exit_no_signal
  • tests/test-supervisor-state-machine.sh: 4 new tests for t198 scenarios
  • tests/test-dispatch-worktree-evaluate.sh: 1 new integration test for backend error with REPROMPT METADATA

Test Results

All 4 core tests pass:

  • Backend error + REPROMPT METADATA -> retry:backend_quota_error (was clean_exit_no_signal)
  • Worker says "already done" -> complete:task_obsolete (was retry:clean_exit_no_signal)
  • Worker says "no changes needed" -> complete:task_obsolete (was retry:clean_exit_no_signal)
  • Normal incomplete exit -> retry:clean_exit_no_signal (unchanged, regression safe)

@gemini-code-assist
Copy link

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 10, 2026

Warning

Rate limit exceeded

@marcusquinn has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 14 minutes and 7 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/t198

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 and usage tips.

@github-actions
Copy link

🔍 Code Quality Report

�[0;35m[MONITOR]�[0m Code Review Monitoring Report

�[0;34m[INFO]�[0m Latest Quality Status:
SonarCloud: 0 bugs, 0 vulnerabilities, 61 code smells

�[0;34m[INFO]�[0m Recent monitoring activity:
Tue Feb 10 00:02:56 UTC 2026: Code review monitoring started
Tue Feb 10 00:02:56 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 61

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 61
  • VULNERABILITIES: 0

Generated on: Tue Feb 10 00:02:58 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

Root cause 1: Backend error detection used log_lines which includes
REPROMPT METADATA headers (8 lines). Retry logs with backend errors
had 12 total lines, exceeding the < 10 threshold. Fix: add
content_lines metadata field that excludes metadata headers.

Root cause 2: Workers determining a task is already done/obsolete
exit cleanly (EXIT:0) with no signal and no PR. The supervisor had
no way to distinguish this from 'worker ran out of context'. Fix:
detect 'already done' / 'no changes needed' language in the worker's
final text output and classify as complete:task_obsolete.

Evidence: t135.3/t135.4/t135.5 all showed repeated clean_exit_no_signal
retries. Retry logs contained 'All Antigravity endpoints failed' (backend
error) but were misclassified. Initial runs showed workers saying 'TASK
ALREADY DONE' but being retried.
@github-actions
Copy link

🔍 Code Quality Report

�[0;35m[MONITOR]�[0m Code Review Monitoring Report

�[0;34m[INFO]�[0m Latest Quality Status:
SonarCloud: 0 bugs, 0 vulnerabilities, 61 code smells

�[0;34m[INFO]�[0m Recent monitoring activity:
Tue Feb 10 01:34:31 UTC 2026: Code review monitoring started
Tue Feb 10 01:34:32 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 61

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 61
  • VULNERABILITIES: 0

Generated on: Tue Feb 10 01:34:34 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

@sonarqubecloud
Copy link

@marcusquinn marcusquinn merged commit 2829249 into main Feb 10, 2026
10 checks passed
@marcusquinn marcusquinn deleted the feature/t198 branch February 10, 2026 01:37
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