Guides
Run Claude Code, Codex or Cursor overnight
Leave a coding agent working overnight safely: a bounded task list, the right permissions, an awake machine, crash recovery, and a morning review.
Updated
What does a safe overnight run need?
Prepare a finite, verifiable punch list in a persistent project, configure the host's permissions and a stop path, rehearse one small shift attended, then start the overnight run. A sleeping machine or dead container cannot run a local watchman.
Write a task list the agent can finish overnight
Choose two or three outcomes you can review independently. In .nightshift/punch-list.md, put each outcome under ## Items with the change, a Verify command, and an intended local commit. Put known later work on the drafting table. A finite shift ends when its approved boxes are ticked; an open-ended Hunt or walkthrough needs a deadline, and an opted-in stall limit can end repeated no-progress attempts.
## Items
- [ ] **1. Repair the failing release test.**
- Fix the failing path without suppressing the assertion.
- Verify: npm test -- release
- Commit: `fix: repair release test`
- [ ] **2. Document the changed behavior.**
- Update the user-facing example and link it from the README.
- Verify: npm run docs:check
- Commit: `docs: explain release behavior`Start the run in Claude Code, Codex, or Cursor
Install the released plugin and open the actual persistent project before Setup. Review the proposed gates and host permissions while you are present. Start only after the list and environment are ready.
- Claude Code: run /nightshift:setup, approve project rules, then /nightshift:start.
- Codex: install the plugin, ask 'Set up Nightshift' and then 'Start the shift' in the project. A commit-making run needs permission to write Git metadata.
- Cursor: install the plugin, open the project, invoke its Setup and Start skills. If Setup offers project hooks for CLI recovery, review that choice; IDE and CLI conversations are separate.
Keep the machine awake and the run in one place
A local watchman cannot wake a sleeping or powered-off laptop. Keep the host, plugin, repository, state, and watchman in the same live environment; verify remote logout and container lifetime separately. Pre-allow only the tools the task needs, try STOP during an attended rehearsal, then remove the test STOP and start a fresh shift. A service outage or usage limit can still delay progress.
- STOP on macOS/Linux: touch .nightshift/STOP from the workspace root.
- STOP on native Windows: New-Item -ItemType File -Force .nightshift\STOP.
- Do not close a host intentionally and call that a crash test; clean closes can pause recovery.
Review what morning actually produced
Read the morning receipt, item receipts, shift log, diffs, gate results, parked decisions, and still-open boxes. For the illustrative two-item contract above, success means two inspectable changes with their declared checks recorded; a skipped docs check stays visible as missing evidence. The tick is self-reported, so accept the work only after your own review.
Start with a bounded prompt
This prompt names the outcome and preserves Nightshift’s review boundary. Paste it into the supported coding host from the project you want to change.
Prepare a finite overnight shift in this persistent project. Show me the work, gates, permissions, STOP path, machine availability, and morning review plan before starting.What this workflow does not claim
- The first run should be attended and the machine must remain available.
- Permissions and external service availability remain host and owner boundaries.
Evidence and sources
These links support the released behavior, public outcomes, or problem language described on this page.