← Back to archive

Repo of the Day

orwa-mahmoud/nightshift: Accountable long-running coding shifts for Codex and Claude Code. Safe autonomy, recovery, and a clear view of what’s done, in progress, parked, or blocked—without scrolling a marathon chat.

Published: Sep 3, 2026

Open repository ↗

Accountable long-running coding shifts for Codex and Claude Code. Safe autonomy, recovery, and a clear view of what’s done, in progress, parked, or blocked—without scrolling a marathon chat. - orwa...

Summary

Nightshift is an MIT-licensed plugin for Claude Code, OpenAI Codex, and Cursor that wraps long AI coding sessions in a "shift" contract with persistent state, item-by-item verification, and reviewable receipts. It adds no separate service and requires no API key, relying on the host agent and on-disk files like .nightshift/punch-list.md. It targets engineers who want overnight or unattended agent runs to leave an auditable trail rather than a truncated chat log.

What it is useful for

Nightshift fits work where an agent should grind through a defined task set while preserving context across compaction, restarts, or host handoffs. The README describes two shift shapes: a finite punch list where each item has a title, bounds, verification step, and commit message, and a clock-bounded goal such as Hunt or Quality that composes work like dependency upgrades, defect repair, or accessibility audits.

Mechanics it names: a punch list that survives context compaction; a clock-out gate that rejects premature stopping; a parking lot for deferred decisions with reversible defaults; a watchman that recovers failed sessions under host failure signals; and per-item receipts recording runtime-measured tokens and duration, with host-specific gaps marked explicitly.

Documented trade-offs: an item "tick" is the agent's self-reported completion, not independent proof of quality; unattended runs cannot approve prompts; recovery requires positive failure evidence and has host boundaries; and ChatGPT scratch conversations cannot preserve project changes, so setup redirects to Codex.

How engineers can use it

Start with one small item in a trusted project. A documented first task is "Document how to run the tests": find the configured command, add it to the README with prerequisites, verify by running it, and commit as docs: explain how to run the tests.

Installation commands from the README:

Codex:

codex plugin marketplace add orwa-mahmoud/nightshift
codex plugin add nightshift@nightshift

Claude Code:

/plugin marketplace add orwa-mahmoud/nightshift
/plugin install nightshift

Cursor: add the GitHub repository via Customize → Add → From GitHub Repository, then import from the marketplace.

Claude Code slash commands listed are setup, start, status, doctor, stop, and archive. Setup asks before applying permissions; Start refuses to run an empty list; Doctor reports state without changing it. macOS and Linux use a bundled Bash runtime; native Windows uses bundled PowerShell, and WSL setups must keep the host, plugin, repo, and watchman inside one Linux distribution.

The README cites two documented runs: a four-hour first night that produced nine reviewable commits, and a 45-hour contract that survived a host handoff and became a 67-commit PR.