Skip to content
  1. How-to
  2. In real projects
  3. Big changes: hand it over at night, check in the morning

Big changes: hand it over at night, check in the morning

In one lineBefore bed, give it a goal and a pass-or-fail done condition. Let it run all night, then check the evidence in the morning.

5 minutes before bed, 15 minutes in the morningFor: You have a big, mechanical migration and want the AI to run it overnight, then review it with confidence in the morningFull guide step 7: Let it run on its own

Copy this first

The bedtime handoff
/pstack:poteto-mode I'm going to bed. In a fresh worktree off <base>, migrate every caller to the new parser.
Done means: zero old callers, all parser fixtures pass, and the old API is deleted.
Keep a decision log. You don't need to ask me before committing.
/loop until done. If you're truly stuck after a few hours, stop and write up why.

The original wording, from pstack’s docs:

The original wording
/pstack:poteto-mode im going to bed. migrate every caller to the new parser in a fresh worktree off <base>.
done means zero old callers, all parser fixtures pass, old api deleted.
keep a decision log. don't ask me before committing.
/loop until done. if you're truly stuck after a few hours, stop and write up why.

What each line does

  • “I’m going to bed”: don’t stop to ask you. Keep going.
  • “Done means”: a check it can run every round.
  • “A fresh worktree”: a separate workspace (a worktree), so it doesn’t touch your other open work.
  • “You don’t need to ask me before committing”: answers the question it would otherwise stop to ask.
  • /loop until done: makes it keep coming back to the done condition. /loop is built into Cursor and Claude Code. It isn’t a pstack skill.
  • The way out: if it’s truly stuck, it stops and explains why, instead of grinding all night.

Time spent isn't a done condition

“Work on this for 4 hours” gives it nothing to check. Give /loop a condition that can pass or fail.

A Chrome extension example

Dozens of files call chrome.storage.sync directly. You wrote a new settings module and want every call moved over, then the old getPref deleted.

Chrome extension example
/pstack:poteto-mode I'm going to bed. In a fresh worktree off main, move every direct call to chrome.storage.sync over to the new settings module.
Done means:
1. grep -rn "chrome.storage.sync" src/ finds only the one call inside the settings module;
2. npm test passes completely;
3. the getPref function and its tests are deleted;
4. opening the options page with a test profile that had the old version installed shows every setting exactly as before the migration. Send me a screenshot.
Keep the behavior exactly the same. If you find bugs during the migration, note them down. Don't fix them along the way.
Keep a decision log. You don't need to ask me before committing.
/loop until done. If you're truly stuck, stop and write up why.
  • Four done conditions: one grep, one test run, whether two names still exist, one screenshot. Each passes or fails. In the morning, check just these four.
  • “Don’t fix bugs along the way”: so before and after compare directly.

Before you let go: can it check itself?

Letting it run all night only works if it can check its own work. Otherwise it just piles up unchecked code faster. Let go only when all four are true:

  1. You’ve done it once. By hand, or by watching the AI. You know what done looks like.
  2. It has the tools. The verification skill, profiler, and logs you’d use.
  3. Each step proves itself. It can stop when a step falls short.
  4. Repeat mistakes are covered. You read its transcripts and turned repeat errors into checks.

If not, run it while you watch.

Where to look in the morning

Morning audit
/pstack:show-me-your-work tell me what you did last night

Read the Attention section at the end first. A helper from a different model family reads the log first. Attention lists what deserves a closer look, like decisions with weak evidence. Follow those log lines.

The decision log is decisions.tsv in the work folder by default, and isn’t committed. Each row is one decision, with its reason and evidence.

Just want a quick status? Type /pstack:ketchup in the running conversation. It only reads. It tells you what changed and what’s waiting for your call.

Stopping partway

If you need to close your laptop or restart your editor, say “pause” or “I’m going offline.” It commits unsaved work as a wip: commit and writes notes for picking up later. Start a new conversation and have it take over. It continues from the notes.

“Keep going” or “continue” never makes it pause.

More than one job overnight

For a series of changes, or a project that runs for days, there are three playbooks:

  • Autopilot-stack: doesn’t merge. In the morning you see verified PRs and decide yourself.
  • Autopilot-full: merges. Each PR merges only after a different helper verifies it.
  • Orchestrate: multi-day projects. The coordinator writes no code itself.

Not sure? Pick Autopilot-stack. You still get the final say before merging.

Stuck?

In the morning it says “done,” but I'm not sure.

Don’t trust the summary. Look at the evidence. Rerun the done-condition checks yourself, like the grep and the test run. Then read the Attention section of the /pstack:show-me-your-work reply.

It stopped in the night to ask me something, and sat idle.

The handoff was missing up-front permission. Next time add “I’m going to bed” and “you don’t need to ask me before committing.”

It loosened the done condition, then declared victory.

It isn’t supposed to. Reply: “The done condition stays. Run the original four checks one by one and show me.”

I said “continue,” and it made a pause commit.

That shouldn’t happen. Reply: “I didn’t ask you to pause. Keep going.”

An unofficial beginner's guide to pstack, not its official docs. pstack is made by poteto; the official repo is the source of truth for commands and behavior. The original guide source is on GitHub.

Hosted by airali. Adapted from Xiaoxiaodong's MIT-licensed guide.