This repository was archived by the owner on Mar 21, 2026. It is now read-only.
Add Officer Clancy Budget Guardian for AI agent resource management#15
Draft
Add Officer Clancy Budget Guardian for AI agent resource management#15
Conversation
…ment Co-authored-by: elasticdotventures <35611074+elasticdotventures@users.noreply.github.com>
Co-authored-by: elasticdotventures <35611074+elasticdotventures@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add Officer Clancy skill for AI persistence management
Add Officer Clancy Budget Guardian for AI agent resource management
Feb 3, 2026
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Implements budget and attempt tracking for Ralph's autonomous agent loop to prevent runaway costs and infinite loops.
Changes
New module:
ralph/budget_guardian.pyBudgetGuardianclass with attempt tracking, budget enforcement, and escalation callbacksResult[AttemptResult, BudgetExceededError]for each authorizationRunner integration
RALPH_BUDGET_ENABLED=true)Configuration
RALPH_BUDGET_ENABLEDfalseRALPH_MAX_ATTEMPTS10RALPH_BUDGET_LIMIT100.0RALPH_COST_PER_ATTEMPT10.0Usage
Also added
skills/officer-clancy/SKILL.md- skill documentationtests/test_budget_guardian.py- 24 testsralph-budget,ralph-no-budget,ralph-test-budget💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.