nightqueue
OfficialCreates pull requests for completed coding jobs and can merge them through a recorded pipeline.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@nightqueuequeue a fix for the flaky worker and remember the root cause from last night"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
nightqueue
Issues in. Pull requests with proof out.
Every job is proved before it ships. Bugs and risky changes are reproduced first, root-caused, fixed and attacked by adversarial QA, then checked at runtime; a docs or config change just runs your project's own checks. The pull request ships with Report → Cause → Changes → QA. A job that can't prove its fix stops at a gate with a written notice instead of opening a PR.
Queue the work during the day. Start the batch when you step away. Come back to pull requests — and to an agent that remembers what it learned last night.
Operate it however you work. nq in the terminal, the Studio in the
browser, or straight from Claude Code and Claude Desktop through the MCP server.
Same queue, same pipeline, same memory underneath.
What it is
nightqueue turns a coding request into a full pipeline run instead of a chat session. Bugs and risky changes are triaged against real evidence, explored, planned, implemented, attacked by an adversarial QA and verified against the checks your project already defines; a docs or config change just runs those checks. Then it opens the pull request. Every phase hands off through a file, so a run can be inspected, resumed and audited after the fact.
It runs on Claude Code, with your own subscription, on your own machine. Nothing leaves it.
Related MCP server: Agent Memory Engine
What it does
A backlog, not a chat.
nightqueue queue addrecords a deliverable;nightqueue queue runworks through the whole backlog unattended and comes back with one pull request per job.An 8-phase pipeline. On bugs and risky changes: triage, exploration, architecture, implementation, adversarial QA, verification, runtime validation, commit and report — each phase run by a dedicated agent, each one gated by the previous artifact.
A memory that compounds. Lessons, project memories and structural indexes survive between runs. The recall is hybrid (BM25 + optional local embeddings), scoped per project and per org, and every run makes the next one cheaper.
Human gates, not silent failures. A job that needs a decision stops with a written notice; you answer it with one command and the job goes back to the queue.
Orgs and projects. One home, many repositories, grouped by org, each with its own lessons and memory.
How a job runs
queue add ─▶ triage ─▶ explore ─▶ architect ─▶ implement ─▶ adversarial QA ─▶ verify ─▶ runtime check ─▶ commit + PR
│ │
└── every phase writes an artifact the next one is gated on; a gate stops the job ────────┘
with a written notice, and `queue retry <id> --note` sends it backA low-risk change (docs, copy, config) skips straight to implement → verify → commit + PR.
Each phase is a dedicated subagent with its own instructions (plugin/agents/),
running inside a git worktree of your repository, in a job environment it cannot
leave. What it learns — lessons, memories, structural indexes of the codebase —
is written to a local SQLite home and recalled by the next job through the
nightqueue MCP server. The full promise between the pipeline and the runner is
written down in docs/runtime-contract.md.
Where jobs come from, where you drive them
In | Out |
A Linear issue, queued with | The Studio in the browser: queue, jobs and settings ( |
One line in the terminal: | The CLI: |
A plan under discussion in Claude Code: | The MCP server, from any Claude client: |
Why nightqueue
A chat session | nightqueue | |
Who drives | you, prompt by prompt | the pipeline, phase by phase |
Root cause | fixes what you described | reproduces first and fixes the cause on bugs and risky changes; proves every job |
Memory | gone when the window closes | lessons and memories persist per org |
Quality gate | whatever you remember to ask | your project's own checks on every run, plus adversarial QA on complex jobs |
Output | a diff in a terminal | a reviewable pull request with a report |
When it runs | while you watch | while you sleep |
Free, local and yours. A hosted Team tier — one shared queue and memory per org, runners on your team's machines — is planned; the local product stays free and is never degraded to push it.
Quick start
Requirements: Claude Code and Node >= 22.
npx @nightqueue/nq init # install the runtime and set Claude Code up
# open a new terminal so `nightqueue` (and its shortcut `nq`) resolves
nightqueue doctor # check the host and the home
nightqueue queue add "fix the flaky worker" # queue one deliverable
nightqueue queue add "add the retry to the uploader" # and the next one
nightqueue queue run # start the batch, detached, when you step away
nightqueue queue status # the next morning: what each job became
nightqueue queue retry 7 --note "rename the column" # answer a gate and send the job backInside Claude Code, /nightqueue:queue turns the plan under discussion into a
job, and /nightqueue:resolve <request> runs the pipeline on the spot.
Commands
The full reference is in docs/cli.md; this is the daily set.
# queue
nightqueue queue add [project] "<request>" [--tier trivial|simple|complex] [--priority 1-9] [--run]
nightqueue queue run [--watch [s] [--from HH:MM] --until HH:MM] [--job J-<id>] [--stop]
nightqueue queue status [J-<id>|<PR URL>] [--follow] [--json]
nightqueue queue log <id> [--follow]
nightqueue queue session <id> [--print]
nightqueue queue retry <id> --note "<answer>"
nightqueue queue cancel <id> --reason "<why>"
nightqueue queue close <id> [--force] [--foreground] [--json]
nightqueue queue close --merged [--json]
nightqueue queue pause | resume
nightqueue studio [--port <n>] [--no-open] # the queue in the browser, on 127.0.0.1
# memory
nightqueue memory stats
# home
nightqueue org add|list|rename|key|remove|repair
nightqueue project add|list|key|move|remove
nightqueue connection bind|test|list|remove
echo "$LINEAR_API_KEY" | nightqueue connection add linear --type linear # Linear issues, one per home
nightqueue doctor
nightqueue update [<version>]Writing a job. One job is one self-contained deliverable that can be
reviewed and merged on its own. Large work is ONE job with numbered stages in
the prompt (Stages: 1) ... 2) ...), never several jobs that depend on each
other. See Writing a job.
Closing a job. A job ends done with an open pull request, and becomes closed
only when nightqueue queue close <id> merges that pull request through a recorded
pipeline - preflight, conflict, merge, settle - that resumes where it stopped.
--force skips the pull request checks and the rebase suite, never the job's status,
its attribution or a real conflict. A job you give up on is queue cancel-ed instead,
which also releases its worktree. See Closing a job.
Running the queue overnight. nightqueue queue run --watch --from 22:00 --until 04:00 works the queue only inside that local time window, then exits - a
midnight-crossing window needs no special syntax. It is one-shot: nothing brings it
back once it closes, so a nightly schedule is an OS-level job (launchd, systemd)
you set up yourself. The machine is kept awake while a runner or a job needs it
(queue.keepAwake), but the display can still sleep - a closed lid with no external
display still stops the run, so keep it open. See Running the
queue.
Status
nightqueue is pre-1.0 and used daily on real repositories. The CLI, the MCP tools and the on-disk formats can still change between minor versions; every change a user would notice is in CHANGELOG.md, and a breaking one is marked as such. Bugs and ideas go to the issues; see CONTRIBUTING.md before opening a pull request and SECURITY.md for anything a guard should have caught. Everyone here follows the code of conduct.
Documentation
| |
jobs, runners, tiers, gates, logs, writing a job | |
lessons, memories, recall, the MCP tools | |
every command, configuration, | |
what the pipeline and the runner promise each other | |
tests, releases, contributing |
License
Business Source License 1.1 — use it in production, for any purpose, including
inside a company; do not offer it to third parties as a hosted service or a
competing product. On 2029-09-04 it becomes Apache 2.0. LICENSE is the text
that governs.
This server cannot be deployed
Maintenance
Related MCP Connectors
Shared memory for coding agents. Stop re-explaining your codebase every session.
Project memory for coding agents: requirements, decisions, code graph and delivery telemetry.
Project memory, semantic code search, and grounded agent context.
Give your AI agent a persistent map of your project's structure, dependencies, and bugs.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceProvides durable project context for coding agents, including project maps, session history, and explicit memories, all stored locally.21 npm7MIT
- AlicenseAqualityBmaintenanceProvides coding agents with persistent, evidence-backed project memory and knowledge across sessions, using a structured memory tree and local knowledge base.6127MIT
- AlicenseNot gradedqualityCmaintenanceProvides persistent project memory for AI coding agents, enabling context retention across sessions via event logging, briefing generation, and querying.MIT
- AlicenseNot gradedqualityAmaintenanceProvides persistent cognitive memory for AI coding agents, enabling them to recall architecture decisions, coding preferences, and project facts across sessions.68MIT