Add AutoGPT runaway task loop detection rule (CRE-2025-0171)#151
Open
Sahelisaha04 wants to merge 2 commits intoprequel-dev:mainfrom
Open
Add AutoGPT runaway task loop detection rule (CRE-2025-0171)#151Sahelisaha04 wants to merge 2 commits intoprequel-dev:mainfrom
Sahelisaha04 wants to merge 2 commits intoprequel-dev:mainfrom
Conversation
Implements critical failure detection for AutoGPT autonomous agents that enter runaway task execution loops, causing resource exhaustion and system unresponsiveness. Addresses GitHub issue prequel-dev#129 bounty challenge requirements. Key features: - Detects infinite task retry cycles and recursive task generation - Monitors CPU, memory, and API quota exhaustion patterns - Critical severity (0) for immediate incident response - 4-stage sequence detection with 180s window - Comprehensive mitigation strategies for production environments Test scenario reproduces realistic failure: API rate limiting causing infinite retry loops with escalating resource consumption.
- Updated category from 'ai-agent-problem' to 'task-management-problem' - Removed invalid tags and kept only validated tags from tags.yaml - Added comprehensive PR.md documentation for bounty submission - Rule now passes make validation successfully Ready for GitHub issue prequel-dev#129 AutoGPT bounty submission.
Contributor
|
Hi @Sahelisaha04 thanks for submitting the CRE! mostly LGTM please take a look at the review. |
Contributor
Author
|
@amanycodes did u added the review ? |
Contributor
yes! |
Contributor
Author
Screencast.From.2025-10-30.16-04-51.mp4@amanycodes there is no review |
amanycodes
approved these changes
Oct 30, 2025
Contributor
|
@Sahelisaha04 I think now they would be visible. thanks for letting me know. |
amanycodes
suggested changes
Oct 30, 2025
| - regex: "(Starting task.*|Executing.*|Task created:|Creating subtask)" | ||
| - regex: "(Starting task.*|Executing.*|Task created:|Creating subtask)" | ||
| - regex: "(Starting task.*|Executing.*|Task created:|Creating subtask)" | ||
| - regex: "(Memory usage.*[0-9]+MB|CPU usage.*[0-9]+%|API calls.*rate limit|Resource exhaustion detected|Out of memory|System overload)" No newline at end of file |
Contributor
There was a problem hiding this comment.
the regex expression: regex: "(Starting task.|Executing.|Task created:|Creating subtask)" is being repeated. Also, this regex is noisy as "starting task", "executing task" and "creating subtask" are informational messages, we don't want our CRE to trigger when this is logged. we can remove these.
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.
Overview
This PR implements CRE-2025-0171, a critical failure detection rule for AutoGPT autonomous agents that enter runaway task execution loops. This addresses the bounty challenge outlined in GitHub issue #129.
Problem Description
AutoGPT agents can enter infinite task retry cycles when encountering API rate limits or resource constraints, leading to:
Solution
CRE Details
Test Results
$ cat test.log | preq -r autogpt-runaway-task-loop.yaml -dThe rule successfully detects 4 critical hits in the test scenario, demonstrating effective pattern matching for runaway task loops with resource exhaustion.
/claim #129
fixes #129