Documentation

Configure Nightshift safely

Set deadlines, stalls, command rules, path protections, identity expectations, and question-tool behavior.

Updated

SHORT ANSWER

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.

01

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.
02

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.
Owner rules and elevation ↗
03

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.

TRY IT

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.
BOUNDARIES

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.
SOURCES

Evidence and sources

These links support the released behavior, public outcomes, or problem language described on this page.

Owner configuration referenceThe released rule keys, defaults, and enforcement boundaries.Open evidence ↗Rules file schemaEvery supported key in .nightshift/rules.json with its type, default, and description.Open evidence ↗Setup skillThe shipped setup, workspace, rules, and first-run guidance.Open evidence ↗First-night checklistThe attended checks required before trusting an unattended run.Open evidence ↗
RELATED QUESTIONS

Continue from the question you have

set a deadline for an autonomous coding agentRead the answer →protect files and Git identity during a shiftRead the answer →prepare an unattended first runRead the answer →