fix(agents): add failure recovery instructions to Sisyphus-Junior#1376
Open
itsmylife44 wants to merge 1 commit intocode-yeongyu:devfrom
Open
fix(agents): add failure recovery instructions to Sisyphus-Junior#1376itsmylife44 wants to merge 1 commit intocode-yeongyu:devfrom
itsmylife44 wants to merge 1 commit intocode-yeongyu:devfrom
Conversation
- Add <Failure_Recovery> section with 3-attempt threshold - Add loop detection (A→B→A→B pattern, same line 3+ times) - Add auto-continuation resistance instructions - Add mental count tracking for fix attempts - Forbid error suppression (@ts-ignore, # type: ignore, etc.) - Clarify 'same error' definition for counter reset Fixes code-yeongyu#1349
|
I have this issue consistently, would love to see this merged |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #1349 - Sisyphus-Junior stuck in infinite loop when fixing Python type hints (dict vs Dict)
Problem
Sisyphus-Junior would enter an infinite loop when encountering persistent errors (like Pyright type hint issues), consuming 140k+ tokens without stopping. The root causes were:
Solution
Added a comprehensive
<Failure_Recovery>section to Sisyphus-Junior's prompt with:1. 3-Attempt Threshold
2. Loop Detection
3. Auto-Continuation Resistance
4. Forbidden Actions
@ts-ignore,# type: ignore,# noqa, etc.5. "Same Error" Clarification
Testing
Technical Notes
cancelledtodo status (valid status recognized by todo-continuation-enforcer)Files Changed
src/agents/sisyphus-junior.ts- Added<Failure_Recovery>section (+58 lines)Summary by cubic
Adds failure recovery instructions to Sisyphus-Junior so it stops after repeated failed fixes instead of looping and burning tokens. Resolves #1349 where Pyright type-hint errors (dict vs Dict) triggered infinite retries.
Written for commit 1b73ee1. Summary will update on new commits.