Documentation
Configure Nightshift safely
Set deadlines, stalls, command rules, path protections, identity expectations, and question-tool behavior.
Updated
How should I configure Nightshift for an unattended run?
Start with the smallest configuration that expresses the boundary you need. Keep the rules understandable, run the first shift attended, and add cost or stall limits when a finite task must not run indefinitely.
Cost and time boundaries
Finite work normally ends when the list is complete. Open-ended walkthroughs require a deadline. Past quitting time, Nightshift starts nothing new but finishes the current unit before clocking out.
- Deadline: the boundary for open-ended work.
- Stall maximum: how many no-progress cycles are tolerated.
- Watch interval: how frequently recovery checks run.
One rules file
Setup copies a ready template to .nightshift/rules.json, and that one file holds every knob: the elevation categories denied by default, the optional command, path, identity, and secret guards, the question-tool policy, the watchman cadence, the clock-out text, and the remembered composition choices. Hooks read it on every tool call, so an edit applies from the next action; tonight's resolved snapshot lives in shift-policy.json and is guarded once the shift arms.
- Prefer explicit paths over broad wildcards.
- Never weaken a known house rule during a shift; the shift session cannot edit the file anyway.
- Keep secret values out of committed configuration.
- Run the resolve table to see every effective value and where it came from.
Permissions are separate
An unattended process cannot approve prompts. Configure host permissions before leaving, while remembering that Nightshift’s own guards remain active inside the permissions mode you choose.
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.
Review Nightshift's available rules for this project and propose a minimal configuration with a deadline, STOP path, and only the guards I need.What this workflow does not claim
- Broad regular expressions can block legitimate work and should be tested attended.
- Secret-pattern checks reduce accidental commits but do not replace secret management.
Evidence and sources
These links support the released behavior, public outcomes, or problem language described on this page.