loop-budget

Enforces loop iteration budgets for attempts, tokens, time, sub-agents, and remote compute.

Updated Jun 6, 2026
One-click install
npx skills add https://github.com/Kirrito-k423/AutoResearch --skill loop-budget-kirrito-k423
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: loop-budget
Source: https://github.com/Kirrito-k423/AutoResearch/tree/main/.codex/skills/loop-budget
Command: npx skills add https://github.com/Kirrito-k423/AutoResearch --skill loop-budget-kirrito-k423

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Autonomous research loops can run away with unbounded attempts, token spend, and remote compute usage. This Skill enforces hard cadence and budget limits at the start and end of every loop iteration so experiments stay within daily caps and stop conditions. ## Core Features & Use Cases - Budget Enforcement: Reads loop-budget.md, STATE.md, and the last 24 hours of loop-run-log.md to enforce daily caps, switching to report-only at 80% and exiting at 100%. - Tiered Limits: Enforces L1 constraints (one candidate, zero sub-agents, zero remote compute) and L2 stop rules (three attempts per hypothesis or two identical failure signatures). - Structured Audit Logging: Appends timestamped records to loop-run-log.md with trigger, evidence/run id, candidate count, actions, attempts, escalations, duration, token estimate, verdict, and stop reason, never rewriting prior entries. - Use Case: An AutoResearch agent running overnight experiment loops invokes this Skill each iteration to guarantee it pauses when .loop-paused exists, stays under the daily token cap, and halts a failing hypothesis after repeated identical failures. ## Quick Start Run the loop-budget check at the start and end of each AutoResearch loop iteration to enforce budget limits and append a structured run record.

Frequently Asked Questions about loop-budget

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I limit token and attempt budgets in an autonomous agent loop?▼

Run a budget guard at the start and end of every loop iteration that reads the current state and recent run log, then enforces daily caps. This Skill switches to report-only at 80% of the daily cap and exits entirely at 100%.

How to stop a research loop after repeated failures?▼

Apply L2 stop rules: halt after three attempts for a single hypothesis or after two identical failure signatures, even if time and token budget remain. The stop reason is recorded in the loop run log.

Can I pause an AutoResearch loop manually?▼

Yes. Create a .loop-paused file or set the state to paused, and the budget check will exit immediately at the start of the next iteration without consuming budget.

What limits apply to L1 loop iterations?▼

L1 enforces one candidate, zero sub-agents, and zero remote compute per iteration. If nothing is actionable, the check returns a no-op in under 5k estimated tokens.

Does the loop run log get overwritten between iterations?▼

No. Each iteration appends a new structured record with timestamp, trigger, evidence/run id, candidate count, actions, attempts, escalations, duration, token estimate, verdict, and stop reason. Previous entries are never rewritten.