nightlane
nightlane checks what any agent did. Wake up to commits, not claims.
For developers who let a coding agent (Claude Code, Codex, Gemini CLI, any other) work on their repo while they are away, and want to know afterwards what was really done.
You give the agent a plan as a Markdown checklist. Each item is a unit (- [ ] U2 Add the --json flag), and the agent ticks it when it says it is done (- [x] U2 … done: <sha>). Your agent says "done, all tests pass"; nightlane doesn't take its word for it: for every tick it looks for the commit in git and runs that unit's own test (its verify: line) itself. A tick that fails is rejected and goes back to the agent; the report separates what git can prove from what the agent only claims. Python 3.9+, no runtime dependencies.
Try it in a minute, on any branch whatever agent did the work:
pipx install nightlane
nightlane demo # 10 s, no API key: a fake agent's night, one bad tick rejected
nightlane verify PLAN.md --run-verify --at-commit # your plan: which ticks git proves; each verify: re-run at its own commit
The same check runs in CI as a GitHub Action. Or let nightlane run the agent too: a lane is one Claude Code session working through one plan, unattended, in its own git worktree and branch, with every tick checked:
cd your-project
nightlane "fix the flaky login test" --for 8h
# go to sleep
nightlane report
A real morning report (nightlane working on itself, 1 Dec; trimmed):
▶️ NIGHTLANE-wave6-realrepo.md — still running, cycle 5/25
⎇ branch nightlane/wave6-realrepo
VERIFIED (git): 24 commits · 42 files +2682/-100 · units proven by git: U1, U2, U3 · 401k tokens
spend: $5.91
tests: no new failures
✓ U1 VERIFIED 4890b25 feat: U1 fix the public-safety failure: the CHANGELOG and… · +3/-3, 2 files
rules: U1 rejected — verify-all: Verify-all has a new failure: test_release_u29.Changelog.test_public_safe
rules: U1 passed — commit ok, tests ok, kept-tests ok, lint ok, secrets ok, deps ok, verify ok, verify-all ok
✓ U2 VERIFIED b9ef81f feat: U2 dependencies in every checkout nightlane makes… · +577/-33, 10 files
✓ U3 VERIFIED 8a7cce0 feat: U3 a tracked settings.local.json is never left… · +353/-7, 4 files
→ Next: U4 — plan quality on real repos
The agent ticked U1 with a CHANGELOG line that named a private repo; nightlane ran the suite itself, a test caught it, the tick was rejected, and the agent fixed it in the next cycle (4890b25). A tick only counts when its commit is real and the checks pass. Nothing is pushed.
1. Install
pipx install nightlane && pipx ensurepath # then open a new terminal if `nightlane` isn't found
No pipx? uvx --from nightlane nightlane --help runs it without installing.
2. Watch a night of three lanes in about 10 s (no API key)
nightlane demo
A fake agent works three lanes at once on a toy repo, each in its own git worktree and branch: a bug fix, a small feature, and docs with tests. Every tick is a real commit, and nightlane checks each one itself. One agent ticks a rounding fix and says "fixed, all tests pass", but its test still fails: nightlane runs the unit's verify: command, rejects the tick live, and the next cycle commits the real fix. In the morning: one report across the lanes, and nightlane status listing every lane. From a real run (nightlane demo --fast --no-open, trimmed):
fix-rounding U2 rejected by nightlane — verify: U2's verify command fails at ea1bec7 (exit 1): FAILED (failures=1)
☀️ nightlane morning report · Dec 2 02:33 · 3 lanes, 1 needs you: NIGHTLANE-docs-tests.md · 7 of 8 units VERIFIED by git · 2 ready to land
❓ NIGHTLANE-docs-tests.md — waiting on the owner (1 question)
➜ needs you: U3: publish to PyPI as tinyshop or tinyshop-demo?
VERIFIED (git): 2 commits · 2 files +15/-1 · units proven by git: U1, U2 · 14k tokens
✅ NIGHTLANE-fix-rounding.md — done, all 2 units closed
➜ ready to merge
VERIFIED (git): 3 commits · 2 files +13/-2 · units proven by git: U1, U2 · 15k tokens
✓ U1 VERIFIED 9ad9471 test: U1 failing test for total() rounding · +9/-0, 1 file · git show 9ad9471
✓ U2 VERIFIED 37767c9 fix: U2 total() rounds to cents · +4/-1, 2 files · git show 37767c9
rules: U2 rejected — verify: U2's verify command fails at ea1bec7 (exit 1): FAILED (failures=1) | commit ok, judge ok, tests ok, kept-tests ok, lint ok, secrets ok…
rules: U2 passed — commit ok, judge ok, tests ok, kept-tests ok, lint ok, secrets ok, deps ok, verify ok, verify-all ok
Land it: nightlane land fix-rounding
▶ nightlane status — every lane in one table
finished 3/3 proven cycle 3/8 last 0 min ago NIGHTLANE-add-discount.md model reported DONE
finished 2/2 proven cycle 3/8 last 0 min ago NIGHTLANE-fix-rounding.md model reported DONE
finished 2/3 proven cycle 3/8 last 0 min ago NIGHTLANE-docs-tests.md needs you: U3: publish to PyPI as tinyshop or tinyshop-demo?
Git proves 7 of the 8 units. Two lanes are ready to land, and "Land it" is offered only for those. The third lane stopped on a question only you can answer instead of guessing. The demo uses its own temp state and never touches your lanes, config or notifier; it removes its temp folder on exit (--keep keeps it to look around, --fast skips the pauses, --no-open skips the dashboard, --lanes 1 runs the older single-lane demo with a usage limit, about 14 s).
3. A real lane in 5 minutes
You need git and the claude CLI. In your project, one command:
nightlane "add a --json flag to export" # also: nightlane '#42', an issue URL, nightlane -f task.md
It checks your setup and fixes what it can (hooks, permission rules; one fixed: line each), has claude plan the task into units (each with a verify: command that runs on your code today, the last one a review of the whole diff), shows the plan in about 10 lines and starts on Enter. The lane works in its own git worktree on branch nightlane/<task> (your checkout is not touched), in permission mode auto, never pushes, and stops when done or after 10 hours (--for 8h / --until 07:00 to change). --dry-run shows the plan and the exact run it would do; --yes starts without asking (needed when there is no terminal). A vague task gets at most 3 questions, each with a default Enter accepts. In the morning: nightlane report. Step by step on a toy repo: Your first night.
By hand
Want to write the goal file yourself? In your project:
nightlane init # wires the hooks into .claude/settings.local.json (not committed; yours are kept, with a backup)
# and writes .claude/plans/active/NIGHTLANE-main.md + its PROGRESS file
Fill in the goal file, or let nightlane plan "add a --json flag to export" write one for you (also --from-issue 42). A goal file is plain Markdown:
- [x] U1 Parse the config file. done: 3fb69ae
- [ ] U2 Add the --json flag after:U1
- verify: `python3 -m unittest tests.test_cli`
- [ ] U3 Pick the default output format after:U2
- BLOCKED(owner): JSON or YAML? — since 2026-11-28
A tick only counts as proven when its done: <sha> is a real commit. A BLOCKED(owner) unit waits for you; the lane does not keep restarting on it. Commit the goal file, check your setup, and start:
git add .claude/plans/active && git commit -m "goal"
nightlane doctor # read-only check of everything a lane needs, with a fix for each problem
nightlane run .claude/plans/active/NIGHTLANE-main.md --worktree --for 8h --permission-mode auto
run opens a new tab in your terminal (herdr, tmux or cmux) and starts claude there; with no terminal it runs headless in the background. Without --permission-mode the lane stops at every permission prompt; auto is the one we recommend. A lane can't git push unless you pass --allow-push, and it won't start on main/master without --worktree (the lane gets its own branch nightlane/<goal> in a separate git worktree; init and plan add it to the command they print when you are on one) or --allow-protected. See Safety.
4. In the morning
nightlane report # per lane: what git proves, what is only claimed, questions for you
nightlane accept .claude/plans/active/NIGHTLANE-main.md U3 --sha 1a2b3c4 # you checked a claimed unit: point it at its commit
nightlane reject .claude/plans/active/NIGHTLANE-main.md U3 --note "no test" # it is not done: untick it for the next run
accept is refused when git does not have the commit. reject unticks the unit and writes why under it, so the next nightlane run does it again.
Words
- lane: one agent working through one goal file on its own branch, until done, the deadline or the cycle cap.
- goal file: the Markdown plan a lane follows, a checklist of units (
.claude/plans/active/NIGHTLANE-<name>.md). - unit: one checklist item (
- [ ] U3 …), small enough for one cycle. The agent ticks it (- [x]) withdone: <sha>of its commit. - [P]: on a unit, it may run in parallel with other
[P]units (after:U1names what it waits for). - cycle: one turn of the agent: fresh context, read goal + progress, do the next unit, commit, stop.
- progress file: the lane's notebook next to the goal file (
…-PROGRESS.md): what each cycle did, what is next. - VERIFIED: a tick git proves: its
done: <sha>is a real commit and nightlane's checks passed. - CLAIMED: what the agent says it did (ticks, progress lines) that git does not prove.
- rules gate: the checks nightlane runs on every tick itself; a failing tick is unticked, and blocked the second time.
- Verify-all: the goal file's whole-suite command; a tick counts only when it adds no new test failure.
- supervisor: a background loop with no model calls: resumes stalled lanes, waits out usage limits, sends the report.
- manager: optional, a tab you pick (
nightlane supervisor manager <tab>) where finished lanes report.
The same list in your terminal: nightlane help words. A whole first night on a toy repo, start to land:
Your first night.
Why not just a while-loop?
When nightlane runs the agent too, a lane survives the night: one unit per cycle with a fresh context, for as long as you allow, through usage limits, stalls, a sleeping laptop and a lane stuck in a loop. while :; do cat PROMPT.md | claude -p; done gets surprisingly far. These are the things that go wrong around 3 am:
| What breaks | What nightlane does |
|---|---|
| The agent says "done", but nothing landed | A tick counts only with a done: <sha> that git confirms. Unproven ticks are flagged in the report. |
| It loops on the same thing for hours | 3 cycles with no commit, no tick and the same Next: stop the lane. |
| The context fills up and quality drifts | Every cycle starts clean. The goal and PROGRESS files carry the state. |
| A usage limit hits mid-night | The lane waits for the reset, never past your deadline. |
| The tab goes quiet (crash, a dialog, a lost prompt) | A supervisor resumes the lane. It never types over your draft or into a busy tab. |
| The laptop sleeps | Sleep is not counted as a stall, and a live lane keeps the machine awake. |
| It runs away with the budget | A deadline, a cycle cap, and spend caps (--max-tokens 2M, --max-cost 5). |
More in How it works.
How it compares
| What it is | Where nightlane differs | |
|---|---|---|
| Ralph loop | a bash loop that feeds the same prompt back until a completion phrase | The same core idea, plus fresh context per cycle, git-verified ticks, limit handling and a report. |
| herdr, tmux, cmux | keep your agent sessions alive | nightlane runs inside them and makes a lane finish a goal and prove it. |
| firstmate, claude-squad, Conductor | run a crew of agents in parallel worktrees | nightlane runs one bounded lane per goal, unattended, and audits it against git. |
Claude Code /loop, scheduled tasks |
re-run a prompt on an interval, or on a schedule in the cloud | nightlane runs a goal file unit by unit on your machine and checks each tick against git. |
Claude Code /goal |
keeps Claude working until a goal is met; a model judges that from the transcript | nightlane's judge is not a model reading the transcript: it runs each unit's tests itself and reads git, and a tick that fails is rejected. |
Claude Code agent view (claude agents) |
runs sessions in the background, keeps them going and lists them by state (needs input, working, done) | nightlane adds the checking: each cycle's tick is judged by running its tests and reading git, and one report says what is proven. It can run its lanes on those sessions (--backend claude-bg, experimental). |
Also works with
- Any agent run, not only nightlane's:
nightlane verify <goal.md>checks every tick against git (CLI), also as a CI check with the GitHub Action - Claude Code plugin with
/nightlane:start,:status,:report,:verify: Claude Code plugin - herdr, tmux, cmux, or no terminal (headless): Backends · in cmux every lane of a project on one screen: Your tabs in cmux · herdr plugin
- Codex CLI and Gemini CLI lanes, and a fallback agent during a usage limit: Backends
- MCP clients (Claude Code, Cursor, Codex, Gemini): MCP server
- Your phone: notifications by ntfy, Slack/Discord webhook, Telegram or desktop (Notifications); the dashboard, offline or
--served (Dashboard) - A sandbox for
bypassPermissions: Sandbox
Docs
Docs home · Your first night · How it works · CLI · Your tabs in cmux · The inbox page · Crash recovery · Goal file · Hooks · Configuration · Contributing · Changelog · Security
macOS and Linux, Python 3.9+. MIT licensed.
Metadata
Release files for nightlane 3.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| nightlane-3.1.0.tar.gz | 995.2 kB | Without provenance | Details for nightlane-3.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nightlane-3.1.0-py3-none-any.whl | Python 3 | none | any | Details for nightlane-3.1.0-py3-none-any.whl |
Total release size: 1.5 MB
Release files / nightlane-3.1.0.tar.gz
| Download URL | nightlane-3.1.0.tar.gz |
|---|---|
| Size | 995.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
23928a398b2d50b8e4d2188171282d88db43b8dd52040d057482724be9fa9dca
|
|
BLAKE2b-256 checksum How to use checksums |
6814770287e7b598a63cf9eb5a05c257f231d4540d2798eaaf99a13b230ff40b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.15.0
|
Release files / nightlane-3.1.0-py3-none-any.whl
| Download URL | nightlane-3.1.0-py3-none-any.whl |
|---|---|
| Size | 485.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c6148f54f3c11e3ac7b39a6e7de33ff88a2777ec9e4bb6e7d05f7c6ae602008b
|
|
BLAKE2b-256 checksum How to use checksums |
74a9e274740bb0fa0301df5669d6dd3c254ce75dd9344c8b2e44a8fe81b2a61b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.15.0
|
Security for nightlane 3.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.