/loopmaintenancemedium riskintermediatesafety D · 50 · open-endedForward Futurepre-dates current gate · under review

Leave a handoff the next agent can resume

Record state, evidence, risks, untouched scope, and exactly one safe next action before the session ends.

prompt
→ Claude
Before ending [session or work period], create a restartable handoff. Record the current goal, changes, verification evidence, untouched scope, uncertainties, open risks, off-limits areas, and last decision or gate. Check that a new human or agent could continue without guessing, then name exactly one safe next action and what they must not assume. Stop after the handoff; do not begin that action.
claude-code · codex

Use this when

Use this when a session is ending, context is becoming unwieldy, or another human or agent may need to continue the work later.

How it runs

  1. State the current goal, the work completed, and the evidence that was actually verified.
  2. Record untouched and off-limits scope, uncertainty, open risks, and the last decision or gate.
  3. Test whether a new actor could restart from the handoff without relying on hidden context or assumptions.
  4. Name exactly one safe next action, state what must not be assumed, and stop without starting it.

Done when

The next person or agent can resume without guessing. The handoff accounts for current state, evidence, untouched and off-limits scope, uncertainty, risks, the last decision, one safe next action, and assumptions the next actor must not make.

Why it works

A compact end-of-session artifact prevents context loss from turning into duplicated work, unsafe assumptions, or accidental scope expansion. The mandatory stop keeps a handoff from silently becoming authorization for more work.

Implementation note

Describe only verified state. Do not turn guesses into completed work, omit blockers, or use the handoff itself as permission to begin the next action.

Source: Forward Future

More maintenance loops

Weekly tech debt report

/scheduleloopreponew

Every Friday, compile a trend report of debt signals — TODO count, lint suppressions, type coverage, largest files — so the team sees drift before it compounds.

prompt
→ Claude
/schedule every Friday at 4pm, measure TODO/FIXME count, eslint-disable and ts-ignore counts, type coverage, and the five largest source files; append the numbers with week-over-week deltas to reports/tech-debt.md and call out the single worst trend in one paragraph
maintenancelow risk

Keep memory pins under control

/schedulenew

Audit and prune pinned memory contexts to stay under 7, replacing competing invariants atomically and checking load count before each pin.

prompt
→ Claude
/goal that must load every session (it is then surfaced deterministically by load pinned ). Pin sparingly — keep a context at ≤7 pinned (prune at 10; the pinned load cap of 100 is a safety net, not the budget). Decisions/patterns/status are NOT pin material. Before pinning, call load pinned to check the count; when an invariant supersedes an old one, unpin the old in the same step ( update memory(memory id=<old , delivery mode="on recall") ) so two competing invariants are never both pinned
maintenancemedium risk

Chase a refund until it lands

Open the claim, watch replies and deadlines, and keep the case moving until the money actually arrives.

prompt
→ Claude
Get my refund for [company and charge info]. Start the claim now through an approved support channel, then keep following up on replies, promises, and deadlines until the refund arrives. Keep a short case note so each follow-up has context. Stop only when the refund is received or you are genuinely blocked and need me.
maintenancemedium risk