Skip to content
FossShelf
Home / Categories / For Engineers

Nightshift

Accountable autonomous coding shifts for AI agents

Replaces —

457 starsMITlast commit 14 Nov 2026
Screenshot of Nightshift

Who it's for

Overnight feature work

A developer designs a multi-item feature in the plan room, sets evidence requirements and budgets, and starts the shift before logging off. The watchman handles any API errors during the night. In the morning, per-item receipts show what was committed, what was tried and rejected, and the total token cost.

Quality debt sweep

A team lead runs the quality shift to survey tests, accessibility, dependencies, documentation drift, and security. Nightshift's 32 ready-made shifts include dependency upgrades, vulnerability sweeps, flaky-test repair, and release readiness checks that can be composed and reviewed before running.

Team already has automated quality pipelines covering all these areas

Multi-agent continuity

When one agent runs out of allowance mid-shift, the maintainer stops it and starts a second agent in a different host. The punch list, receipts, parked decisions, and snag log on disk let the new agent carry on with nothing to re-explain.

Work fits within a single agent session

Non-code research and documentation

Artifact mode supports shifts in plain folders without a Git repository, leaving local receipts instead of commits. This covers research reports, SEO audits, and documentation work alongside code-focused shifts.

All work involves a Git repository

The problem

Coding agents working on multi-item tasks have no durable contract with the work. A long conversation compacts, a session restarts, or the agent declares itself finished while items remain open, and the agreed plan disappears with the context. There is no mechanism to enforce that every item is completed before the agent stops, no per-item record of what was tried and why, and no measured cost per item from the host's own records. Developers either babysit long runs or come back to incomplete results with no evidence of what happened.

How it works

Clock-out gate

The gate refuses an early clock-out while approved items remain open on the punch list. When the agent declares itself finished with work still pending, the gate hands back the contract and the agent continues.

Durable punch list

The authoritative work list lives on disk in the project, not in conversation history. It survives compaction, session restarts, and agent handoffs. Switching from Claude Code to Cursor mid-shift is a stop in one host and a start in the other; the new agent reads the punch list and carries on.

Per-item evidence and receipts

Each item can require screenshots at named widths, before-and-after benchmarks, sample responses, or other artifacts. The gate can be configured to hold the item open until the named file exists. The finished receipt shows what was delivered, what was tried and rejected, which checks ran, and working time and token usage measured from the host's own records.

Item budgets

Soft and hard limits per item in working time, tokens, or both. At the soft limit the agent is told to finish the item. At the hard limit it commits work in progress, writes a receipt, and moves to the next item so the shift continues.

Watchman recovery

A watchman process outside the session monitors the shift and resumes interrupted work. If the host's API returns 500 errors overnight, the watchman retries and resumes when the service responds. It also handles crashes, stalls, and usage limits using the host's own recovery signals.

Plan room

Before any code is written, the plan room keeps the project read-only while you and the agent explore approaches, run a pre-mortem and edge-case pass, check item ordering and risk, and settle on outcomes, verification, and evidence per item. Past receipts are used to estimate working time and token usage for the new plan.

Features

  • Clock-out gate
  • Durable punch list
  • Per-item evidence and receipts
  • Item budgets
  • Watchman recovery
  • Plan room

How to install

# Claude Code /plugin marketplace add orwa-mahmoud/nightshift /plugin install nightshift@nightshift # Codex codex plugin marketplace add orwa-mahmoud/nightshift codex plugin add nightshift@nightshift

Recommended for this setup

Strengths

  • No external dependencies: Nightshift installs as a native plugin with no separate app, server, or API key. It runs in your existing Claude Code, Codex, or Cursor session on macOS, Linux, and Windows.
  • Local-first and agent-portable: All shift state, the punch list, receipts, parked decisions, and snag log live on disk. Two agents can work the same plan in sequence: a 45-elapsed-hour real run spanned Claude Code and Cursor on the same branch and resulted in 67 merged commits and 57 closed issues.
  • Measured, not estimated, usage: Token counts and working time per item come from the host's own records at the tick. The documentation states that unavailable is never written as zero.
  • Extensible catalog: Receipt templates, morning summaries, evidence instructions, gate stacks, edge-case packs, and shift entries are all editable files. An entry with the same name as a shipped one replaces it. Custom entries can be kept per-project or in a personal catalog used across repositories.

Trade-offs

  • First shift should be attended: The documentation recommends running one small task attended before leaving an unattended shift. This is the only way to verify that permissions, gates, stop behavior, and recovery work correctly in the specific environment.
  • Does not prove correctness: The clock-out gate prevents approved work from being quietly abandoned; it does not verify that the code is correct. Item definitions, project checks, and human review remain the quality gate.
  • Does not push or merge by default: Nightshift leaves local commits for owner review. External actions such as pushing or merging require explicit authorization in the shift contract.
  • Plugin installation required per host: Nightshift must be installed as a native plugin in each host: Claude Code, Codex, and Cursor each have a separate install path. It is not available as a standalone CLI or web app.

Tech stack

Languages
Shell, PowerShell, Awk, Python, jq, Dockerfile, JavaScript, HTML
Frameworks
—
Databases
—
Tooling
—

FAQ

Does Nightshift work without a Git repository?

Yes. Artifact mode supports compatible research, documentation, SEO, and writing shifts in persistent folders, leaving local receipts instead of commits.

How does Nightshift recover from an interrupted shift?

A watchman process running outside the session monitors the shift. If the host's API returns 500 errors, it retries and resumes when the service responds. It also handles crashes, stalls, and usage limits using the host's own recovery signals. The punch list and saved progress on disk allow the shift to continue from where it stopped.

Can I switch between Claude Code, Codex, and Cursor mid-shift?

Yes. Because the entire shift state lives on disk, stopping in one host and starting in another is enough. The new agent reads the punch list, receipts, parked decisions, and snag log and carries on without needing a re-briefing.

What happens when the agent wants to stop with items still open?

The clock-out gate refuses the early exit and returns the agent to the punch list. The shift ends only when every approved item is checked off, or when the owner explicitly runs a stop command.

How is token usage measured?

Token counts and working time per item come from the host's own records at the tick, not from the agent's estimates. The documentation states that unavailable is never written as zero.

Similar tools

More in Engineers