| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 21.2 KB |
| agents/inspector-context.md | markdown | 11.6 KB |
| agents/inspector-control.md | markdown | 6.0 KB |
| agents/inspector-maintainability.md | markdown | 3.6 KB |
| references/durable-context.md | markdown | 2.0 KB |
| references/long-running-agents.md | markdown | 1.8 KB |
| references/maintainability-findings.md | markdown | 8.3 KB |
| references/prune.md | markdown | 8.3 KB |
| scripts/block-pipe-to-shell.py | script | 11.4 KB |
| scripts/check-agent-context.sh | script | 2.6 KB |
| scripts/check-doc-refs.sh | script | 2.6 KB |
| scripts/check-maintainability.sh | script | 2.6 KB |
| scripts/check-verifier-output.sh | script | 2.6 KB |
| scripts/check_agent_context.py | script | 69.5 KB |
| scripts/check_doc_refs.py | script | 7.8 KB |
| scripts/check_maintainability.py | script | 43.5 KB |
| scripts/check_moved_lines.py | script | 6.2 KB |
| scripts/check_verifier_output.py | script | 3.5 KB |
| scripts/collect-data.sh | script | 39.7 KB |
| scripts/conversation_audit.py | script | 34.6 KB |
| scripts/read_skill_description.py | script | 1.7 KB |
| scripts/run-health.ps1 | script | 14.1 KB |
| scripts/scan_skill_security.py | script | 19.5 KB |
references/long-running-agents.md
View on GitHub# Long-Running Agent Stop Conditions
Loaded from `health` Step 1c when the project uses `/loop`, autonomous agents, or any long-running agent flow. Skip entirely for projects without one.
The project must define explicit stop conditions. An agent that never stops is a budget and safety incident waiting to happen.
Audit for these four hard stop signals; flag the absence of each as a Structural finding:
1. **No progress across two consecutive checkpoints.** Same files touched, same errors logged, no new commits/tests/output. Recommend killing the loop and surfacing the state, not retrying.
2. **Repeated identical failure.** Same stack trace, same error message, same failed assertion three times in a row means the hypothesis is wrong; more attempts will not help.
3. **Cost or token budget exceeded.** Project should declare a per-run budget (tokens, API spend, wall-clock minutes). Loop exits when the budget is hit, not when work is done.
4. **External blockers.** Merge conflict on the target branch, dependency lock the agent cannot resolve, missing credential, network unreachable. Any of these halt the loop and ask the user, not retry forever.
The stop conditions should live in tracked project docs (`AGENTS.md`, the loop's launch script, or a dedicated config), not only in the agent's prompt. Prompts are forgettable; tracked config is enforceable. Recommend hooks (PostToolUse on the relevant tools) over prompt instructions when the project supports them: a hook physically cannot be skipped, a prompt instruction can. Confirm the host's hook coverage before recommending one: some agents only fire PostToolUse for a subset of tools (for example, a runtime may match shell/Bash only), so a fixup that must run after file edits belongs on a Stop or session-end hook there instead.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |