Autonomous Agent Loop
Use this skill when the task should finish without repeated user nudges.
Start: make the contract durable
- Restate the requested end state as an outcome, not a task list.
- Define concrete verification evidence before editing: commands, diffs, rendered output, smoke checks, logs, or artifact paths.
- If a durable goal tool exists and no active goal covers the work, create one. Do not invent a token budget.
- Prefer existing
goalizeandgoal-continue-auditprompt templates for common start/recovery loops. Keep project-specific details in the goal text or repo docs instead of creating many templates. - Inspect repo/session state before changing files; preserve unrelated user changes.
Work loop
Repeat until done or blocked:
- Choose the next low-risk step that reduces uncertainty or moves implementation forward.
- Run it.
- Inspect fresh evidence.
- Update the plan based on what happened.
- Continue without waiting for the user unless a decision/access blocker is real.
- For background jobs, use a blocking or longest bounded wait when available. After an unchanged status, increase the interval; never poll again immediately unless the status changed or a real deadline is near.
Do not stop at:
- a plan when implementation remains
- “next steps” the agent could do itself
- validation failures without triage
- partial completion without naming unmet requirements
- an optional ask when the original request already implied doing the work
Evidence-first debugging
When behavior is “rough” or repeatedly needs kicks:
- Search session/log history for repeated user follow-ups:
continue,try again,did that fix,how is it going,commit,rerun,still broken. - Compare the first ask to the final answer: did the agent deliver artifacts and verification, or just recommendations?
- Identify missing feedback loops: no build/test, no smoke check, no rendered UI inspection, no deploy verification, no issue update.
- Patch the durable surface that future agents read:
AGENTS.md, shared rules, skills, prompt templates, or repo docs.
Blocked stop format
If completion is impossible, stop with:
- attempted paths
- evidence gathered
- exact blocker
- unmet requirements
- the smallest user input/access needed to continue
Never mark a durable goal complete while any requirement is unverified, narrowed, or deferred.