Install
openclaw skills install @jhauga/handle-big-tasksInstructions for breaking large tasks across multiple agentic runs instead of one response. Use when implementing a plan file, doing a large refactor, or any multi-phase task that won't fit in a single response. Covers the CONTINUE? Y or N and TASK COMPLETE! end-of-response markers, plus bash and CM
openclaw skills install @jhauga/handle-big-tasksUse this skill for large tasks whose work spans multiple agentic runs and responses, rather than one response to one prompt.
Each response delivers one complete phase, then hands control back with a marker that says whether more work remains. A person can answer the marker, or one of the loop scripts in the skill's scripts folder can answer it and start the next run.
Do not use this skill for small, self-contained requests that finish cleanly in one response. The markers add friction with no benefit there.
The end of every response is a status signal. One of the following two markers closes each response, unless a phase is blocked on something only a person can resolve (see Marker Rules).
If a phase is complete but the task as a whole is not, the last line of the response is:
CONTINUE? Y or N
If the entire task is complete, the last line of the response is:
TASK COMPLETE!
The loop scripts in the scripts folder read the last line of each response to decide what happens next. Each marker must appear verbatim and unquoted as the final line of the response, alone on that line, with no trailing punctuation and no markdown wrapping: no backticks, bold, blockquote, list bullet, or code fence. The fences above only display the markers in this document.
CONTINUE? Y or N while phases remain, or TASK COMPLETE! once the whole task is done.Y, begin the next phase. On N, stop and leave the remaining phases unstarted. Treat any other reply as feedback or a question about the current phase: address it, restate the phase plan if it changed, and close with the correct marker again.TASK COMPLETE! means the whole task is done, not just the current phase.CONTINUE? Y or N.Y.The scripts in the scripts folder drive the GitHub Copilot CLI through a plan file and answer Y after each phase, so nobody has to wait at the keyboard between runs.
| Script | Shell |
|---|---|
| scripts/loop-copilot.sh | bash (Linux, macOS, WSL, Git Bash) |
| scripts/loop-copilot.bat | Windows CMD |
Both take the same arguments, <plan-file> [interval-minutes], and run from the project folder Copilot should work in. For a skill installed in the project's .github/skills folder:
.github/skills/handle-big-tasks/scripts/loop-copilot.sh docs/migration-plan.md 15
.github\skills\handle-big-tasks\scripts\loop-copilot.bat docs\migration-plan.md 15
Each loop:
CONTINUE? Y or N, waits the interval (default 10 minutes), then answers Y in the same session.TASK COMPLETE!. Exits with code 1 when copilot fails, a response ends without a marker, or the safety cap of runs is reached. Exits with code 2 when it cannot start.<plan-file>.loop.log next to the plan file. When it stops early, it prints the copilot --resume command that picks the session up by hand.| Variable | Purpose |
|---|---|
LOOP_MAX_ITERATIONS | Safety cap on runs (default 50) |
LOOP_COPILOT_ARGS | Extra copilot flags separated by spaces, for example --model <model> or --allow-tool=write |
-p cannot stop for tool approval. Grant what the plan needs through LOOP_COPILOT_ARGS, such as --allow-tool=write and --allow-tool=shell(git:*), and reserve --allow-all-tools for workspaces you trust.--add-dir, so the agent can read it.--continue, which resumes the most recent Copilot CLI session wherever it was started.The user, or a loop script, asks:
Implement the migration plan in docs/migration-plan.md
First response:
Phase plan: (1) add the new config loader, (2) port call sites, (3) remove the legacy loader.
Phase 1 complete: added the new config loader and its tests. Call sites still use the
legacy loader and move in phase 2.
CONTINUE? Y or N
After Y, the second response:
Phase 2 complete: ported all call sites to the new loader. Legacy loader removal remains.
CONTINUE? Y or N
After Y, the third response:
Phase 3 complete: removed the legacy loader and its tests. Every phase of the migration
plan is done.
TASK COMPLETE!
| Issue | Solution |
|---|---|
| Unsure whether the task is large | Estimate the phases. Two or more reviewable phases means use this skill. |
| Phase boundaries are unclear | Split at points where the work is verifiable and the workspace is left usable. |
| A phase ran long and only partly finished | Report exactly what landed and what did not, then close with CONTINUE? Y or N. |
| Tempted to finish two phases at once | Do not. One phase per response keeps review points intact. |
| Task finished early, before the planned final phase | Close with TASK COMPLETE! and explain why the remaining phases were unnecessary. |
| Another active agent or instruction says never to pause for confirmation | Follow the user's most specific request. If the user asked to work phase by phase, use the markers. Otherwise, skip this skill and keep working. |
| The session was reset, compacted, or resumed partway through the task | Re-read the phase plan or the document it came from, check the workspace for what already landed, restate the remaining phases, then resume at the next unfinished phase. |
| A loop script stopped because the last line was neither marker | Read the last response in <plan-file>.loop.log. It usually hit a blocker, wrapped the marker in formatting, or added text after it. Fix the cause, then resume with the printed command or start the loop again. |
| Every phase reports that a tool was denied | Grant the permissions the plan needs, as described in Loop Scripts, then start the loop again. |