Continue
For crash or restart recovery, first read the installed
pause recovery procedure. Combine available
checkpoints with newer relevant logs and live state; a missing handoff is not
a blocker. Verify uncertain external effects before replaying them. Preserve
intentional pauses, expired windows and budgets; recovery grants no new authority.
Resume the current task. Before doing any new work, re-establish context so work does not drift or
repeat:
- Repo rules - Read
AGENTS.md first so repo-specific commands, formatting, boundaries, and
safety rules are current before acting.
- Where we are - Summarize in 2-4 lines what is already done (cite files, commits, PRs, issues,
or linked planning docs) and the current goal. If there is no task currently in progress (no prior
conversation, no staged work, no recent commits on this branch, and no open PR or issue context),
say so and ask the user what to continue instead of inferring a goal. If the goal is unclear but
prior work exists, state your best inference and proceed only when confidence is reasonable; for
low-confidence inference, state the hypothesis and ask the user to confirm before acting.
- What is next - List the remaining steps to reach done, refresh their live dependencies, then
pick the next coherent objective. Treat a saved next-step ordering as a stale hypothesis, not an
instruction to block on its first item.
- Definition of done - Restate the overall success criteria in one line, plus the command or
test that will verify it. If there is no runnable check, state how completion will be confirmed.
- Continue through the authorized outcome, completing the remaining coherent objectives.
Advance independent in-scope work while a command, check, review, or agent is pending. Stop
when the outcome is verified, a genuine blocker requires input, or the user requests a pause.
Honor an explicit one-step or otherwise bounded request; completing that boundary is then done.
Re-run the applicability gate before consuming a persisted
coordination_not_applicable outcome whenever the resume crosses a controller
or session boundary, relies on durable handoff or crash recovery, or changes the
target set or topology. Each of those is itself a requiring condition, so the
persisted outcome is stale evidence there, not authority. A replacement actor or
a replacement chat resuming from a durable handoff does not re-verify: it is
coordination_required, per the restart prompts in
docs/agent-runner-restarts.md. Only a relaunch of the same controller over the
same exact target set, with no other actor able to mutate it, can re-verify as
coordination_not_applicable.
When the gate still resolves to coordination_not_applicable, consume that
outcome, skip every coordination and typed-event call, and never report
coordination as unavailable or degraded, even when the repository configures a
real backend. Recover the lane from durable local state instead.
For a resumed coordination_required PR-batch lane, complete bounded ownership
recovery before any
write. If a new actor takes over abandoned ownership, emit private-backend
human_intervention with kind: takeover; if a fenced replacement supersedes
the prior actor, use kind: supersede. A routine same-thread resume with the
same verified holder is neither a takeover nor a supersede and emits no event.
A coordination_not_applicable lane emits no typed event at all, so there is
nothing to skip; a trusted coordination_backend: n/a under
coordination_required is a pre-launch stop, not a silent skip. Typed-event transport is optional: when an active
private backend does not advertise it or reports it
unsupported, record typed event transport: unavailable, skip the emission,
and continue without marking the event emission UNKNOWN. Only after the
transport is advertised does an attempted write that fails, degrades, or is
rejected become UNKNOWN handoff evidence. Every attempted advertised
typed-event write must resolve the backend-advertised event executable and
ordered opaque argv; a missing, malformed, or unsafe advertisement is an
attempted-write failure. Run that exact executable and separate argv without
shell evaluation, with a finite deadline in its own process group, preserving
each opaque argument; on expiry terminate the whole group with TERM, then
KILL after a finite grace period. A deadline expiry, forced termination, or
any other advertised-support write failure records best-effort UNKNOWN event
evidence; the primary operation continues immediately without waiting further
on the event.
If the user supplied focus text or arguments, treat it as additional direction or a narrowed scope
for what to continue.
- Do not re-do completed work, and do not ask the user to repeat context you can reconstruct from
the conversation, open files, or git state.
- Before another bounded poll or sleep, finish every runnable in-scope closeout task; wait only when no such work remains.
- When continuation is driven by a Goal monitor, require a material state-change
delta or a typed terminal action with
wake_parent: true before rebuilding
task context for deterministic-watcher decisions. An unchanged deterministic
probe is a persisted heartbeat, not a reason to continue. A model-polling-only
fallback wake refreshes the minimal live blocker evidence, submits the next
observation, and follows that decision; do not suppress the bounded fallback
merely because its prior fingerprint was unchanged. After durably enqueuing
each fallback continuation, acknowledge its wake_id before submitting the next observation;
otherwise restart-safe redelivery intentionally fences newer evidence. On a changed fingerprint or typed terminal action,
accept only the compact decision, refresh live dependencies, and rerun the
task's security, origin, coordination, overlap, review, readiness, and
exact-head gates before acting. A stale or duplicate probe remains suppressed;
a terminal, non-resumable, user-input, or budget outcome stays stopped or
paused with its restart-safe handoff.
- Honor
AGENTS.md boundaries and safety rules while resuming; never push or take irreversible
actions unless the task already authorized them.
- End with a
$status report when that companion skill is installed; otherwise use the same four
sections directly: Done, In progress, Blocked / needs input, and Next. Treat this closing summary
as a report of the resumed work within the authorized outcome from step 5.
On Cursor, resume this same chat. Do not use claude --resume. Cursor /loop
is a model-polling fallback, not an out-of-context watcher.
1---2name: continue3description: Resume an in-progress task with a structured checkpoint instead of a bare "continue", re-establishing what is done, what is next, and how done is verified. Use when resuming work after an interruption, handoff, or a vague "keep going".4---56# Continue78For crash or restart recovery, first read the installed9[pause recovery procedure](../pause/references/recovery.md). Combine available10checkpoints with newer relevant logs and live state; a missing handoff is not11a blocker. Verify uncertain external effects before replaying them. Preserve12intentional pauses, expired windows and budgets; recovery grants no new authority.1314Resume the current task. Before doing any new work, re-establish context so work does not drift or15repeat:16171. **Repo rules** - Read `AGENTS.md` first so repo-specific commands, formatting, boundaries, and18 safety rules are current before acting.192. **Where we are** - Summarize in 2-4 lines what is already done (cite files, commits, PRs, issues,20 or linked planning docs) and the current goal. If there is no task currently in progress (no prior21 conversation, no staged work, no recent commits on this branch, and no open PR or issue context),22 say so and ask the user what to continue instead of inferring a goal. If the goal is unclear but23 prior work exists, state your best inference and proceed only when confidence is reasonable; for24 low-confidence inference, state the hypothesis and ask the user to confirm before acting.253. **What is next** - List the remaining steps to reach done, refresh their live dependencies, then26 pick the next coherent objective. Treat a saved next-step ordering as a stale hypothesis, not an27 instruction to block on its first item.284. **Definition of done** - Restate the overall success criteria in one line, plus the command or29 test that will verify it. If there is no runnable check, state how completion will be confirmed.305. Continue through the **authorized outcome**, completing the remaining coherent objectives.31 Advance independent in-scope work while a command, check, review, or agent is pending. Stop32 when the outcome is verified, a genuine blocker requires input, or the user requests a pause.33 Honor an explicit one-step or otherwise bounded request; completing that boundary is then done.3435Re-run the applicability gate before consuming a persisted36`coordination_not_applicable` outcome whenever the resume crosses a controller37or session boundary, relies on durable handoff or crash recovery, or changes the38target set or topology. Each of those is itself a requiring condition, so the39persisted outcome is stale evidence there, not authority. A replacement actor or40a replacement chat resuming from a durable handoff does not re-verify: it is41`coordination_required`, per the restart prompts in42`docs/agent-runner-restarts.md`. Only a relaunch of the same controller over the43same exact target set, with no other actor able to mutate it, can re-verify as44`coordination_not_applicable`.4546When the gate still resolves to `coordination_not_applicable`, consume that47outcome, skip every coordination and typed-event call, and never report48coordination as unavailable or degraded, even when the repository configures a49real backend. Recover the lane from durable local state instead.5051For a resumed `coordination_required` PR-batch lane, complete bounded ownership52recovery before any53write. If a new actor takes over abandoned ownership, emit private-backend54`human_intervention` with `kind: takeover`; if a fenced replacement supersedes55the prior actor, use `kind: supersede`. A routine same-thread resume with the56same verified holder is neither a takeover nor a supersede and emits no event.57A `coordination_not_applicable` lane emits no typed event at all, so there is58nothing to skip; a trusted `coordination_backend: n/a` under59`coordination_required` is a pre-launch stop, not a silent skip. Typed-event transport is optional: when an active60private backend does not advertise it or reports it61unsupported, record `typed event transport: unavailable`, skip the emission,62and continue without marking the event emission `UNKNOWN`. Only after the63transport is advertised does an attempted write that fails, degrades, or is64rejected become `UNKNOWN` handoff evidence. Every attempted advertised65typed-event write must resolve the backend-advertised event executable and66ordered opaque argv; a missing, malformed, or unsafe advertisement is an67attempted-write failure. Run that exact executable and separate argv without68shell evaluation, with a finite deadline in its own process group, preserving69each opaque argument; on expiry terminate the whole group with `TERM`, then70`KILL` after a finite grace period. A deadline expiry, forced termination, or71any other advertised-support write failure records best-effort `UNKNOWN` event72evidence; the primary operation continues immediately without waiting further73on the event.7475If the user supplied focus text or arguments, treat it as additional direction or a narrowed scope76for what to continue.7778- Do not re-do completed work, and do not ask the user to repeat context you can reconstruct from79 the conversation, open files, or git state.80- Before another bounded poll or sleep, finish every runnable in-scope closeout task; wait only when no such work remains.81- When continuation is driven by a Goal monitor, require a material state-change82 delta or a typed terminal action with `wake_parent: true` before rebuilding83 task context for `deterministic-watcher` decisions. An unchanged deterministic84 probe is a persisted heartbeat, not a reason to continue. A `model-polling-only`85 fallback wake refreshes the minimal live blocker evidence, submits the next86 observation, and follows that decision; do not suppress the bounded fallback87 merely because its prior fingerprint was unchanged. After durably enqueuing88 each fallback continuation, acknowledge its `wake_id` before submitting the next observation;89 otherwise restart-safe redelivery intentionally fences newer evidence. On a changed fingerprint or typed terminal action,90 accept only the compact decision, refresh live dependencies, and rerun the91 task's security, origin, coordination, overlap, review, readiness, and92 exact-head gates before acting. A stale or duplicate probe remains suppressed;93 a terminal, non-resumable, user-input, or budget outcome stays stopped or94 paused with its restart-safe handoff.95- Honor `AGENTS.md` boundaries and safety rules while resuming; never push or take irreversible96 actions unless the task already authorized them.97- End with a `$status` report when that companion skill is installed; otherwise use the same four98 sections directly: Done, In progress, Blocked / needs input, and Next. Treat this closing summary99 as a report of the resumed work within the authorized outcome from step 5.100101<!-- host-branch: cursor-only start -->102On Cursor, resume this same chat. Do not use `claude --resume`. Cursor `/loop`103is a model-polling fallback, not an out-of-context watcher.104<!-- host-branch: cursor-only end -->