Skip to content

fix(fullsend): add safe-retry skill to prevent fix agent retry loops - #3462

Merged
durandom merged 1 commit into
redhat-developer:mainfrom
gabemontero:fix/fullsend-self-inflicted-error-guard
Jun 19, 2026
Merged

fix(fullsend): add safe-retry skill to prevent fix agent retry loops#3462
durandom merged 1 commit into
redhat-developer:mainfrom
gabemontero:fix/fullsend-self-inflicted-error-guard

Conversation

@gabemontero

Copy link
Copy Markdown
Contributor

Add a new safe-retry skill that guards against infinite retry loops when the fix agent introduces syntax or parse errors during edits. The skill requires error diagnosis before retrying any failing command and enforces hard stop thresholds (3 total failures → stop with tests_passed: false).

Wire the skill into the fix harness alongside fix-review and monorepo-workspace-routing.

addresses non-productive looping like we saw the agent fall into with https://github.com/redhat-developer/rhdh-plugins/actions/runs/27780243879 for #3442

Hey, I just made a Pull Request!

✔️ Checklist

  • [n/a] A changeset describing the change and affected packages. (more info)
  • [/] Added or Updated documentation
  • [n/a] Tests for new functionality and regression tests for bug fixes
  • [n/a] Screenshots attached (for UI changes)

@rhdh-qodo-merge

Copy link
Copy Markdown

PR Summary by Qodo

Add safe-retry skill to stop fix-agent infinite retry loops
🐞 Bug fix ⚙️ Configuration changes 📝 Documentation 🕐 10-20 Minutes

Grey Divider

Description

• Add a safe-retry skill that forces error diagnosis before rerunning failing commands.
• Enforce a hard stop after repeated failures to prevent non-productive retry loops.
• Wire safe-retry into the Fullsend fix harness alongside existing fix skills.
Diagram

graph TD
  A["Fullsend fix harness\nfix.yaml"] --> B["Fix agent\nfix.md"] --> C["Skill: fix-review"] --> D["Skill: monorepo-routing"] --> E["Skill: safe-retry"]
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Enforce retry limits in runner scripts (hard guardrail)
  • ➕ Prevents looping even if the agent ignores skill instructions
  • ➕ Can count failures deterministically from command exit codes/logs
  • ➕ Doesn’t rely on prompt compliance
  • ➖ More invasive change (scripts + state tracking)
  • ➖ Higher risk of false positives if failures are expected in some flows
2. Add output-schema/validation-loop checks for repeated failures
  • ➕ Keeps guardrails within the existing validation loop mechanism
  • ➕ Can force an early stop when structured output indicates repeated failures
  • ➖ Only triggers if the agent produces/updates structured output correctly
  • ➖ May not catch loops that occur before schema output is emitted
3. Fold safe-retry guidance into the base fix agent prompt (instead of a skill)
  • ➕ Simpler wiring: no separate skill directory to maintain
  • ➕ Guarantees all fix runs use the guidance
  • ➖ Less modular; harder to iterate on guidance independently
  • ➖ May be undesirable if other harnesses shouldn’t inherit the behavior

Recommendation: The current approach (a dedicated safe-retry skill wired into the fix harness) is a good low-risk first step because it’s modular and directly targets the observed looping behavior. If looping persists in practice, follow up with a script-level retry limiter to make the guardrail non-bypassable (prompt compliance is not guaranteed).

Files changed (2) +54 / -0

Documentation (1) +52 / -0
SKILL.mdAdd safe-retry skill with diagnosis-first and failure thresholds +52/-0

Add safe-retry skill with diagnosis-first and failure thresholds

• Introduces a new skill that explicitly forbids retrying failing commands without code changes, requires diagnosing likely self-inflicted errors, and mandates stopping after 3 total failures with 'tests_passed: false'.

.fullsend/customized/skills/safe-retry/SKILL.md

Other (1) +2 / -0
fix.yamlEnable safe-retry skill in fix harness +2/-0

Enable safe-retry skill in fix harness

• Documents safe-retry as a harness customization and adds it to the enabled skills list so the fix agent receives the new retry/diagnosis guidance during runs.

.fullsend/customized/harness/fix.yaml

@rhdh-qodo-merge

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Qodo Logo

@rhdh-qodo-merge rhdh-qodo-merge Bot added documentation Improvements or additions to documentation enhancement New feature or request bug_fix labels Jun 18, 2026
Add a new safe-retry skill that guards against infinite retry loops when
the fix agent introduces syntax or parse errors during edits. The skill
requires error diagnosis before retrying any failing command and enforces
hard stop thresholds (3 total failures → stop with tests_passed: false).

Wire the skill into the fix harness alongside fix-review and
monorepo-workspace-routing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: gabemontero <gmontero@redhat.com>
@gabemontero
gabemontero force-pushed the fix/fullsend-self-inflicted-error-guard branch from 49d5597 to 2afff9b Compare June 18, 2026 20:19
@durandom
durandom merged commit 7ccaff1 into redhat-developer:main Jun 19, 2026
19 checks passed
@sonarqubecloud

Copy link
Copy Markdown

@gabemontero
gabemontero deleted the fix/fullsend-self-inflicted-error-guard branch June 19, 2026 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug_fix documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants