Security
What does Night Crew run as root, and what can it do?
Only the lid-mode helper runs as root, and only after you turn on lid mode and approve it in System Settings. The only
change it can make is switching your Mac’s sleep off with pmset, and back on. If Night Crew quits, crashes or hangs,
the helper turns sleep back on by itself. Everything else runs as you.
What runs on your Mac
| Part | Runs as | What it does |
|---|---|---|
| The Night Crew app | You | Watches your agents, asks macOS to stay awake while they work, and keeps your history. |
| The hook | You, started by your agent | Reads one event from the agent, writes one small file, and quits. |
| The lid-mode helper | Root, only if you approve it | Switches the Mac’s sleep off while lid mode holds, and back on. |
With the lid open, the app needs no special rights. It holds a standard macOS power assertion, the same request any
app can make, and macOS drops it the moment the app quits. At the battery floor it can put the Mac to sleep with
pmset sleepnow, which also needs no special rights.
The lid-mode helper
Why it exists
A Mac laptop sleeps when you close the lid, and an app’s normal stay-awake request doesn’t stop that. The system setting
that does, pmset disablesleep, can only be changed with admin rights. So lid mode needs a small helper that runs as
root.
How it gets installed
Lid mode is off until you turn it on. Night Crew then registers the helper through Apple’s SMAppService, and macOS
asks you to allow it in System Settings › General › Login Items & Extensions (called Login Items on older macOS). You
can switch it off there at any time.
What it can do
-
Run one program, one way. The helper runs only
/usr/bin/pmset, by its full path, with fixed arguments and no shell:pmset -a disablesleep 1to turn sleep off,pmset -a disablesleep 0to turn it back on, andpmset -gto read the setting. -
Read battery and heat. It reads the battery level, whether the charger is connected, and whether macOS reports the Mac as hot.
-
Remember one fact. It keeps one small file that says whether it changed the setting and when, so it can undo the change after a crash or power cut.
What it can’t do
-
Take orders from other programs. It accepts connections only from the Night Crew app signed by our Apple developer team. macOS checks the code signature and refuses anything else.
-
Do anything else the app asks. The app can only ask for a lease (“keep sleep off for now”), give it back, or ask for the current state. There is no call to run a command, read a file or change any other setting.
-
Ignore your battery or heat. Every 5 seconds the helper checks the battery and heat itself, whatever the app says, and lets go when the Mac is hot or the battery is below the floor. On battery it never goes below 20%, even if asked. Lid mode runs on the charger only unless you allow battery.
-
Undo a setting it didn’t make. If sleep was already switched off when lid mode started (by you or another app), the helper leaves it alone and never switches it back on.
It makes no network connections and reads none of your files.
How normal sleep comes back
-
The agent finishes, or you turn lid mode off. The app gives back its lease and the helper turns sleep back on.
-
Night Crew quits or crashes. macOS closes the app’s connection to the helper, and the helper releases that lease at once.
-
Night Crew hangs. The app renews its lease every 30 seconds. If it stops, the lease runs out after 90 seconds.
-
The helper is stopped, at shutdown or when you switch it off: it turns sleep back on before it exits.
-
The helper crashes, or the Mac loses power. macOS restarts the helper after a crash and starts it once at every boot. Each time, it undoes its own change before doing anything else.
You can check it yourself in Terminal: pmset -g | grep SleepDisabled shows 1 while lid mode holds, and 0 or
nothing otherwise. To undo it by hand, run sudo pmset -a disablesleep 0.
The hook
For agents you connect with one click, Night Crew adds a line to that agent’s own hook settings, such as
~/.codex/hooks.json. It saves a backup of the file first, and leaves a file alone if it can’t edit it safely. The line
points to a tiny script that hands each event to the hook tool inside the signed app; if you delete the app, the
script does nothing. Remove all hooks in Settings › Agents puts every agent’s settings back.
The hook runs as you, with your normal rights. It never blocks or changes the agent, always exits successfully, prints
nothing (except the {} Gemini CLI requires) and quits within one second.
Night Crew keeps only what tells it an agent is working: event names and times, session IDs, project folder names and scheduled-run times. It never keeps your prompts, your code or chat text. The privacy policy lists exactly what the hook reads.
Signing and notarization
The app, the helper and the hook ship together inside one app, signed with Apple Developer ID and notarized by Apple, with the notarization ticket stapled to it. The hardened runtime is on. macOS checks all of this when you first open Night Crew. To check it yourself:
spctl -a -t exec -vv "/Applications/Night Crew.app"
How updates are checked
Night Crew updates itself with Sparkle, the standard open-source updater for Mac apps. Every release is signed with an EdDSA key, and the public half of that key is built into the app. Before it installs an update, Sparkle checks the download against that key and checks the new version’s Apple code signature. An update that doesn’t match isn’t installed. The private key isn’t on the update server, so someone who took over the server still couldn’t ship an update your Mac would accept.
Updates download in the background. Night Crew then offers Restart to Update, or Install When Idle while it’s keeping your Mac awake, so an update never drops a running agent by surprise. You can turn automatic checks and downloads off in Settings › About.
The small licensing status file the app fetches each day is signed with a separate key. The app ignores it if the signature doesn’t match, if it has expired, or if it’s for other builds.
Reporting a vulnerability
If you find a security problem in Night Crew or this website, please email support@nightcrewapp.com with “Security” in the subject. Include the steps to reproduce it and your Night Crew version (Settings › About). Please give us a fair chance to fix it before you publish the details.
Sources
- Apple, SMAppService (how apps register helpers that macOS asks you to approve)
- Apple, Notarizing macOS software before distribution
- Sparkle documentation (EdDSA update signatures)
Checked 5 November 2026.