Free guide
7 rules for the AI night shift and a 10-minute morning check
Seven rules that let you run an AI agent like Claude Code overnight and have a finished task in the morning, not a startup in Japanese paid for with your card.
22:00
Brief: one task, a clear “done” and the don’ts
22:05
AI works in the project copy night/24-10
3:12
AI hit something forbidden, wrote down a question and is waiting
7:00
Report: done, tests pass
7:10
Review the changes and merge
In short
One task with a clear “done,” a list of don’ts right in the brief, a separate copy of the project, and in the morning the report first, then the changes.
7 rules
A morning without the rules
The AI redid half the project, even what it wasn’t meant to touch
Tests fail and nobody knows why
No report, just a bill for the whole night
A morning with the rules
One task done in a separate copy of the project
Tests pass
A five-line report, spending under the limit
- One task and a clear “done.” Not “finish the login,” but “email and password login works, the tests pass, change nothing else.” Without a clear “done,” the AI doesn’t know where to stop.
- A “you must not” list right in the brief: don’t publish anything, don’t sign up for services, don’t buy anything, don’t message people, don’t touch the live website or the customer database.
- A separate copy of the project. The AI works in its own copy of the project (a separate branch), not in what your customers see right now. In the morning, you decide what to take from it.
- No cards and no personal passwords. Use an AI key only with a spending limit set in your account with the service. Don’t give the AI your card, email or passwords for the night.
- Permissions, not trust. In the project settings (
.claude/settings.json), allow only the commands you need and block the dangerous ones: sending things to the server, deleting, installing unknown programs. When it runs unattended (claude -p), Claude Code has no one to ask, so anything not allowed gets denied. But the project’s permissions only apply if you’ve opened the project in Claude Code at least once and confirmed that you trust the folder. Otherwiseclaude -pskips them (the blocked commands stay blocked). - A step limit and a save after every step. When you start it with
claude -p, set--max-turnsso the AI doesn’t spin in circles until morning, and ask for a save after every step: then every step can be undone. - In the morning, the report first, then the merge. The 10-minute routine is below.
The overnight brief, ready to copy
Working in a copy of the project
Running tests
Stopping to write down a question
Publishing and buying
Messaging people
Touching the live website
The example is filled in. Replace the task, the “done” and the date in the branch name with your own.
Task: add login with email and password. It’s done when: login works and all tests pass. Work only in the branch night/24-10. You must not: publish, sign up for services, buy anything, message people, touch the live website. If you run into a choice or something forbidden, stop and write down the question. In the morning, report: what’s done, what isn’t, where a choice had to be made and what changed beyond the task.
Morning check in 10 minutes
Morning report
night copy night/24-10
Done
Login works, tests pass
6:58
A question from 3:12
I wanted to install a new package. That’s forbidden, so I left it to you.
6:58
You
Reading the report, then the list of changes.
7:02
Tick off what you’ve done:
- The report. The AI writes it point by point: what’s done, what isn’t, where it hesitated and what it changed beyond the task. Read it first.
- The list of changes.
git diffshows what actually changed in the project. Does it match the report? - The merge. Only then merge the night copy into the main version of the project. Don’t take anything extra: if there is something extra, leave the night copy unmerged for now.
Never use the no-checks mode (--dangerously-skip-permissions) overnight. Claude Code recommends it only in an isolated environment without internet access, where it can’t damage anything.
Is your task fit for the night?
Three questions, an answer right away.
Run it overnight. The brief is above, and in the morning a 10-minute check awaits you.
Not for the night yet.
- Write down when the task is done: rule 1.
- Give the AI its own copy of the project: rule 3.
- Don’t hand this to the AI overnight: rule 2.
Or we can go through it together.
Get 30 minutes freeWhat it looks like in a company
ChefLine Partner
Orders from email enter the stock records on their own, and nobody retypes them.
The demos run on made-up data: the firms, names and numbers are invented.
Want AI to work overnight without surprises in the morning?
In 30 minutes, free of charge, we’ll go through what you want to hand over to AI and tell you what to forbid and which checks to set up.
How we automate business processes