long-running-task-plan
Plan a task that an AI agent will work on for hours or across several sessions: the goal as a checkable end state, milestones, what to write down at each checkpoint, when to stop and ask, and what the agent may and may not do unattended. Use when asked to plan a long agent task, set up an overnight run, break this into checkpoints, make this resumable, or my agent lost track halfway through. Produces a task brief, a milestone list with a verification step for each, a checkpoint note format, stop and escalation rules, a permission boundary and a resume procedure.
Try your first task
A source-grounded starter task has not been verified for this skill yet.
SKILL.md
name: long-running-task-plandescription: "Plan a task that an AI agent will work on for hours or across several sessions: the goal as a checkable end state, milestones, what to write down at each checkpoint, when to stop and ask, and what the agent may and may not do unattended. Use when asked to plan a long agent task, set up an overnight run, break this into checkpoints, make this resumable, or my agent lost track halfway through. Produces a task brief, a milestone list with a verification step for each, a checkpoint note format, stop and escalation rules, a permission boundary and a resume procedure."Long-Running Task Plan Skill
An agent can now work for hours. Whether the result is usable depends less on the model than on the plan: a goal it can check for itself, points where progress is written down outside its own memory, and rules for when to stop. Without those, long runs fail in familiar ways. The agent drifts from the goal, repeats work after its context is summarised, or continues confidently past the point where it should have asked. This skill writes the plan before the run starts. To hand unfinished work to someone else at the end, use session-handoff; to split work across parallel agents, use subagent-orchestration.
Not quite this? Use
session-handofffor the note at the end of a session, andexecuting-plansto carry out a plan that already exists.
What This Skill Produces
- A task brief: the goal as an end state someone could verify, and what is out of scope
- Milestones, each with a check the agent runs before moving on
- A checkpoint note format: what gets written to a file at each milestone
- Stop and escalation rules: when to pause and ask a person
- A permission boundary: what may be done unattended, and what never
- A resume procedure for a fresh session
Required Inputs
Ask for these if not provided:
- The goal, and how anyone would know it is done
- The environment: what the agent can read, write and run
- What must not be touched: production systems, shared data, money, messages to people
- The time or cost budget
- Who is available if it needs a decision, and how
If "done" cannot be stated as something checkable, resolve that before planning: a long run toward a vague goal produces a long vague result.
Framework: Verifiable, Written Down, Bounded
- State the end state. Not "improve the tests" but "every module in this folder has tests, and the suite passes". Add what is explicitly not part of the task.
- Cut into milestones that can each be checked. Each ends with a command to run or a condition to confirm. A milestone with no check is a hope.
- Order by risk. Do the step most likely to reveal that the plan is wrong first, while changing course is cheap.
- Write state to a file, not to memory. At every milestone the agent updates a progress note: done, verified how, decisions made and why, what is next, open questions. A fresh session must be able to continue from that file alone.
- Record decisions with reasons. The most expensive thing to lose is why an approach was rejected. Without it, the agent tries it again.
- Set stop rules. Stop and ask when: a check fails twice, the task needs something outside the permission boundary, the plan turns out to be wrong, the budget is nearly spent, or an action cannot be undone.
- Draw the permission boundary. List what may be done unattended. Anything that sends, publishes, deletes, spends or changes a shared system waits for a person unless it was approved in advance, by name.
- Prefer reversible steps. Work on a branch or a copy. Commit at each verified milestone so any step can be rolled back.
- Define the resume procedure. Read the progress note, re-run the last check to confirm the state is as recorded, then continue.
- End with evidence. The final report says what was done, how each part was verified, and what was not done.
Output Format
Long-Run Plan: [task]
Done means: [the checkable end state] · Budget: [time or cost] · Ask: [who, how] Out of scope: [what will not be done]
Milestones
| # | Milestone | Check before moving on | Reversible? |
|---|
Progress Note (PROGRESS.md, updated at every milestone)
Goal:
Done and verified: [milestone, how it was checked]
Decisions: [what, why, what was rejected]
In progress:
Next:
Open questions:
Stop and Ask When
- [rule]
Permission Boundary
| May do unattended | Needs a person first | Never |
|---|
Resume Procedure
- Read
PROGRESS.md. - Re-run the check for the last verified milestone.
- Continue from "Next", or stop if the state does not match.
Final Report Must Include
[What was done · how each part was verified · what was not done and why]
Quality Checks
- The end state can be verified by a command or an observable condition
- Every milestone has its own check
- State is written to a file a fresh session can continue from
- Decisions are recorded with reasons
- Stop rules cover repeated failure, irreversibility, budget and a wrong plan
- Sending, publishing, deleting and spending are outside the unattended boundary unless named
Anti-Patterns
- Do not start a long run on a goal nobody can check
- Do not rely on the agent remembering earlier work
- Do not let it continue after the same check has failed twice
- Do not give blanket permission for irreversible actions
- Do not accept "done" without the evidence
Example Trigger Phrases
- "Plan this as a long agent task with checkpoints."
- "Set up an overnight run for this migration."
- "My agent lost track halfway through. Make it resumable."
- "What should the agent be allowed to do unattended?"
Run this skill in your browser: https://mohitagw15856.github.io/pm-claude-skills/skill/long-running-task-plan.html