Documentation
Run each coding-agent shift in a git worktree
Keep your checkout untouched: Nightshift can run each Claude Code, Codex, or Cursor shift in its own git worktree and branch, and leave the merge to you.
Updated
How do I keep my own checkout untouched during a shift?
Set shift isolation to worktree. Start adds a worktree on a shift branch from the current commit, copies only the ignored files you name, runs your prepare command, and works there. The morning page names the branch and the merge command; merging stays yours.
Turn it on
Set isolation once in the rules file, or let Hunt or Start set it for one shift.
"shift": {
"isolation": "worktree",
"prepare": "pnpm install --frozen-lockfile",
"copyIn": [".env.test"]
}What the shift works in
Start adds the worktree under .nightshift/worktrees on a branch named for the date and the shift, and records it as the shift's work target, so hooks, gates, receipts, Status, and a revived session all follow it.
- Your checkout, index, and uncommitted edits stay untouched.
- Ignored files such as .env are absent unless listed in copyIn.
- A prepare command that fails stops Start and arms nothing.
- A session already running in a linked worktree, as a host-made worktree does, is used as it is.
After the shift
The morning page names the branch, what it changed, and the command that merges it. Archive removes the worktree folder once the branch is merged and never deletes the branch.
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.
Run tonight's shift in its own git worktree, copy .env.test into it, and run the install command before the first item.What this workflow does not claim
- Ignored files are absent from the worktree unless listed in copyIn.
- Merging the shift branch stays yours; Archive never deletes the branch.
Evidence and sources
These links support the released behavior, public outcomes, or problem language described on this page.