Autonomous Agent Loop
Use this skill when the task should finish without repeated user nudges.
Start: make the contract durable
Keep exactly one active outcome. Record:
Outcome: the single requested end state.
Done when: the observable stopping condition.
Proof: the commands, diffs, rendered output, smoke checks, logs, or artifacts that establish it.
Derive repository facts before asking. Request only missing product intent or authority. If a durable goal tool exists and no active goal covers the work, create one; do not add a task store or second goal-tracking convention. Prefer goalize and goal-continue-audit, and keep project-specific details in the goal or repository docs.
Work loop
Repeat until the only valid return state is done or genuine blocked:
- Choose the next low-risk step that reduces uncertainty or advances the outcome.
- Run it and inspect fresh evidence.
- Update the plan from that evidence.
- Record unrelated discoveries as
Parked, then resume the active outcome.
- Before proposing scope expansion, state what current work it would displace.
- Continue without waiting unless tools, access, or a required decision make progress impossible.
- 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, agent-actionable next steps, untriaged validation failures, or partial completion. Do not add a scheduler, dashboard, coordinator process, or notification policy; existing durable-goal tools are the execution mechanism.
Delegation return contract
When a primary delegates a bounded task, require one compact structured progress
report from the worker:
status: DONE, CONTINUE, PARTIAL, or BLOCKED.
changed_paths: every created, modified, or deleted path.
verification: exact checks and evidence, including failures.
landing_state: UNLANDED, READY_FOR_DONE, LANDED, or BLOCKED.
next_action: exactly one concrete follow-up, or none when no follow-up is needed.
The primary must wait for each worker. Follow up CONTINUE and PARTIAL results
or take the next bounded step; a worker's DONE only completes its assignment.
Durable goals are checkpoints, not wake schedulers: an active goal does not relaunch
a stopped worker. Keep the goal open through done, and close it only after
landing_state is LANDED or the outcome is genuinely BLOCKED.
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 smallest durable surface that future agents read:
AGENTS.md, an
existing skill, a prompt template, a repo doc, or a deterministic check.
Blocked stop format
Return blocked only when completion is impossible. Report:
- attempted paths
- evidence gathered
- exact blocker
- unmet requirements
- exactly one smallest human action needed to continue
Never mark a durable goal done while any requirement is unverified, narrowed, deferred, or merely locally checked when authorized landing remains.
1---2name: autonomous-agent-loop3description: Maintains durable goal and handoff state. Use for explicit goal-management requests, resuming a recorded goal, or diagnosing agents that stall and need repeated prompts.4---56# Autonomous Agent Loop78Use this skill when the task should finish without repeated user nudges.910## Start: make the contract durable1112Keep exactly one active outcome. Record:1314- `Outcome`: the single requested end state.15- `Done when`: the observable stopping condition.16- `Proof`: the commands, diffs, rendered output, smoke checks, logs, or artifacts that establish it.1718Derive repository facts before asking. Request only missing product intent or authority. If a durable goal tool exists and no active goal covers the work, create one; do not add a task store or second goal-tracking convention. Prefer `goalize` and `goal-continue-audit`, and keep project-specific details in the goal or repository docs.1920## Work loop2122Repeat until the only valid return state is `done` or genuine `blocked`:23241. Choose the next low-risk step that reduces uncertainty or advances the outcome.252. Run it and inspect fresh evidence.263. Update the plan from that evidence.274. Record unrelated discoveries as `Parked`, then resume the active outcome.285. Before proposing scope expansion, state what current work it would displace.296. Continue without waiting unless tools, access, or a required decision make progress impossible.307. 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.3132Do not stop at a plan, agent-actionable next steps, untriaged validation failures, or partial completion. Do not add a scheduler, dashboard, coordinator process, or notification policy; existing durable-goal tools are the execution mechanism.3334## Delegation return contract3536When a primary delegates a bounded task, require one compact structured progress37report from the worker:3839- `status`: `DONE`, `CONTINUE`, `PARTIAL`, or `BLOCKED`.40- `changed_paths`: every created, modified, or deleted path.41- `verification`: exact checks and evidence, including failures.42- `landing_state`: `UNLANDED`, `READY_FOR_DONE`, `LANDED`, or `BLOCKED`.43- `next_action`: exactly one concrete follow-up, or `none` when no follow-up is needed.4445The primary must wait for each worker. Follow up `CONTINUE` and `PARTIAL` results46or take the next bounded step; a worker's `DONE` only completes its assignment.47Durable goals are checkpoints, not wake schedulers: an active goal does not relaunch48a stopped worker. Keep the goal open through `done`, and close it only after49`landing_state` is `LANDED` or the outcome is genuinely `BLOCKED`.5051## Evidence-first debugging5253When behavior is “rough” or repeatedly needs kicks:5455- Search session/log history for repeated user follow-ups: `continue`, `try again`, `did that fix`, `how is it going`, `commit`, `rerun`, `still broken`.56- Compare the first ask to the final answer: did the agent deliver artifacts and verification, or just recommendations?57- Identify missing feedback loops: no build/test, no smoke check, no rendered UI inspection, no deploy verification, no issue update.58- Patch the smallest durable surface that future agents read: `AGENTS.md`, an59 existing skill, a prompt template, a repo doc, or a deterministic check.6061## Blocked stop format6263Return `blocked` only when completion is impossible. Report:6465- attempted paths66- evidence gathered67- exact blocker68- unmet requirements69- exactly one smallest human action needed to continue7071Never mark a durable goal `done` while any requirement is unverified, narrowed, deferred, or merely locally checked when authorized landing remains.