ntm checkpoint save
Restore a session in place, or as a new one with --as. Optional AES-256-GCM at rest.
- scrollback
- layout
- launch commands
- git patch
- assignments
Open sourcev1.40.0Linux and macOS
NTM runs Claude Code, Codex, Grok Build and nine other coding-agent CLIs as one team in tmux. It reads every pane, hands each idle agent its next task, keeps agents off each other’s files, and picks up where it left off after a crash.
$ curl -fsSL …/install.sh | bash -s -- --easy-mode▶ bd-3u9 Retry webhook sends with backoff
● Read(internal/webhook/sender.go)
└ Read 214 lines
● Update(internal/webhook/sender.go)
└ Updated with 9 additions and 3 removals
● Bash(go test ./internal/webhook/...)
▶ bd-26s Dry-run mode for refunds
● Read(internal/refunds/plan.go)
└ Read 214 lines
● Update(internal/refunds/plan.go)
└ Updated with 9 additions and 3 removals
● Bash(go test ./internal/refunds/...)
▶ bd-3co Detect conflicts on restore
● Read(internal/ledger/restore.go)
└ Read 214 lines
● Update(internal/ledger/restore.go)
Finished. 1 file changed, tests green.
›
▶ bd-2aw Idempotency keys on /charges
• Explored
└ Read charges.go
• Edited internal/api/charges.go (+14 -2)
• Ran go test ./internal/api/...
└ ok 0.51s
▶ bd-41k Split invoice renderer
▸ read internal/billing/invoice.go
▸ plan: 3 edits, 1 new test
▶ bd-1qz Fix flaky settlement test
✓ read internal/settle/batch.go
✓ edit batch.go +7 −1
✓ bash go test ./internal/settle
PASS
⎋ Working…
Compose the swarm
The command
ntm spawn api --cc=3 --cod=2 --grok=1 --omp=1ntm --robot-terse
S:api|A:7/7|W:6|I:1|E:0|C:36%|B:R12/I6/B4|M:0|^:0|!:06 working 1 idle 0 rate limited
0 tasks closed12 ready
A simulated session. Pane titles, Agent Mail names, states and the status line follow NTM’s formats; the agents’ output and the activity feed are illustrative. Change the mix and the window re-tiles. When an agent goes idle it is handed the next ready task.
ntm serve runs.How it fits together
It drives each agent the way you would, by reading its screen and typing into its pane, and writes what it decides to local stores that scripts, agents and later runs can read.
Who drives it
Yountm commands, the dashboard and the palette
Agents and scripts178 --robot-* commands, one JSON envelope
Services275 REST operations, SSE and WebSocketsNTM · one Go binary
tmux session
12 built-in agent CLIs. Every pane stays an ordinary tmux pane: attach, zoom in and type.
01Sessions
ntm spawn payments --cc=3 --cod=2 --omp=1 opens a tmux session with one titled pane per agent (payments__cc_1, payments__cod_2), each launched with its own model, persona and Agent Mail name. Grow it later with ntm add, or give every agent its own git worktree with --worktrees.
Built-in harnesses
Launching, prompting, compacting, rotating and restarting all read one declarative table: how each CLI takes Enter, how it quits, its compact command, its context window, and whether a prompt must wait for an empty composer (seven of them).
Every built-in harness, as NTM declares it
| Agent CLI | Provider | Enter | Exit | Compact | Waits for an empty composer | Context window | Send checked on screen |
|---|---|---|---|---|---|---|---|
Claude Code--cc | Anthropic | once | Ctrl+C twice | /compact | ✓ | 200K | ✓ |
Codex CLI--cod | OpenAI | twice | /exit | – | ✓ | 128K | ✓ |
Gemini CLI--gmi | twice | Esc, then Ctrl+C | – | – | 1M | – | |
Antigravity CLI--agy | twice | Esc, then Ctrl+C | – | ✓ | 1M | – | |
Grok Build--grok | xAI | once | Ctrl+C twice | – | ✓ | 256K | ✓ |
Opencode--oc | opencode | once | Ctrl+C twice | – | ✓ | 200K | ✓ |
Oh My Pi--omp | omp | once | Esc, Ctrl+C, Ctrl+D | /compact | ✓ | 200K | ✓ |
Pi Agent--pi | pi | once | Ctrl+C twice | /compact | ✓ | 200K | ✓ |
Cursor--cursor | cursor | once | Ctrl+C | – | – | 200K | – |
Windsurf--windsurf | windsurf | once | Ctrl+C | – | – | 200K | – |
Aider--aider | aider | once | Ctrl+C | – | – | 128K | – |
Ollama--ollama | ollama | once | Ctrl+C | – | – | 128K | – |
agent.AllHarnesses() and the last column from the Verify…SubmissionContext functions in internal/tmux, read when this page was built. Custom agents can be added as TOML plugins with their own readiness patterns. Cursor, Windsurf, Aider and Ollama are recognised from a few generic screen patterns, so expect less precise state readings for them than for the others.Thundering herd
Five agents told “pick the best ready task” at the same second all get the same answer, and only one can claim it. --stagger-mode=fixed --stagger-delay=90s spaces their first prompts so each has claimed something before the next one looks; smart uses learned rate-limit timing.
Change the spacing and watch who gets which task
--spawn-stagger-* flags pace --robot-spawn and assignment prompts.02Pane state
Agent CLIs have no API for their state, so NTM reads their screens: a spinner means working, a quiet composer means idle, a quota notice means rate limited. Assignment, restarts and rotation act on what it reads.
DO_NOT_INTERRUPT to SAFE_TO_RESTARTThe parser
This is NTM’s own internal/agent parser, compiled to WebAssembly and running in this tab. Delete the spinner line and a working agent goes idle; type “You’ve hit your limit” and it is rate limited.
Pick a screen, then edit it and watch the reading change
NTM reads
Working
DO_NOT_INTERRUPT
The agent is producing work. NTM won’t type into this pane, restart it or rotate it while it does.
ccVerdict computed by internal/agent when this page was built
Operator views
ntm dashboard shows every pane, its context, the ready work, alerts and locks on one screen. ntm palette sends a saved prompt to all agents, one type or chosen panes with a single key, and ntm web serves the same view in a browser.
The terminal dashboard, on a seven-pane session

Open the screenshot at full size (3300 × 1051)
ntm dashboard on a terminal wide enough for its six-panel layout, watching a live session of three Claude Code, two Codex and one Gemini agent answering questions about NTM's code in a copy of its repository. The Beads panel is NTM's own backlog. Rendered by a real terminal emulator (vhs) in the dashboard's default Catppuccin Mocha theme.ntm palette · who receives the prompt
03Delivery
tmux send-keys types and returns; it can’t tell if the agent was ready, if a menu ate the Enter, or if the pane now runs something else. NTM checks all three before it reports a delivery.
--op-idntm send
Pick an agent and a prompt, then break something. Every step follows the send path that ntm send, --robot-send and the REST API share.
Choose an agent and a prompt, then add trouble
needsBufferSend, the guarded key sends and the Verify…SubmissionContext functions) and internal/dispatch. Gemini CLI, Antigravity, Cursor, Windsurf, Aider and Ollama have no post-send screen check yet; their sends are reported once tmux accepts the keys.Idempotent sends
Agents retry when a call times out. With --op-id, NTM records the send in SQLite before touching a pane; a retry gets the recorded outcome back and types nothing, and a different message under the same id is refused.
Send, then retry the way a flaky client would
0 prompts typed into panes 0 calls
ntm --robot-send-receipt=deploy-42 reads one back. Per target, the admission state is one of submitted, rejected, not_attempted or unknown.04Work and files
With Beads (br), an issue tracker that keeps tasks and their dependencies in the repo, NTM picks each idle agent’s next task, claims it atomically, reserves its files and sends it to the pane.
ntm assign --watch --strategy=dependency
Press play. Each idle agent gets the ready task that unblocks the most. human-gated work waits for a person, epics are never dispatched, and tasks sharing a mutex: label never run together.
Play, or step through it one assignment at a time
bv --robot-plan supplies the ranking, and NTM claims inside one transaction on Beads' SQLite database, checking open status, blockers, operator-gated labels, deferred and template flags, and mutex: groups (internal/bv/bv.go). Built-in gate labels are operator-gated, human-gated, needs-operator and business-input; a project can add its own but not remove these.Agent Mail reservations
Agents reserve paths through Agent Mail before editing, and NTM keeps the leases alive. The pre-commit guard refuses a commit that touches someone else’s reservation and names the holder.
Read guards_check.goPlay out a conflict, one step at a time
automation.force_release (never, approval or auto; approval by default), and an approval is spent once, on the exact reservation it names.05Safety
Every Claude Code agent NTM launches checks each shell command against NTM’s policy before it runs, even under --dangerously-skip-permissions, and a git reset --hard hidden in $(…) is caught like the plain one.
ntm safety check
NTM’s own internal/policy package and default rules, compiled to WebAssembly and running in this tab: the check ntm safety check and the Claude Code hook both run. Try hiding a dangerous command behind a safe one.
Pick an example or type your own command
Blocked
Hard reset loses uncommitted changes
Verdict computed by internal/policy when this page was built
Blocked by default
Need approval
Explicitly allowed
policy.DefaultPolicy() defines them; ntm policy edit changes them per user or project. In a pane, a command needing approval is refused with the reason rather than queued. Other agents: with [integrations.dcg] enabled = true, NTM also checks command lines it sends to Codex, Gemini and other panes, but it can’t intercept commands those agents decide to run themselves.ntm approve
Force-releasing another agent’s reservation files an approval request instead of running. Someone else must grant it, and the approval is spent on exactly one run.
pendingAn agent asks to force-release another agent’s reservation. Nothing is released yet.
Policy never refuses it outright.
approvedA different operator grants it with ntm approve <id>.
Same OS user, pane, SLB session or Agent Mail name: refused.
The original command finds the grant, bound to that exact reservation.
The reservation changed since: target_changed.
consumedThe release runs once and the grant is used up.
Denied or expired first: it stays that way.
Every change of state is a guarded SQLite update, so a denial that lands first is never overwritten, and a crash mid-release reports consumption_unknown instead of releasing twice. ntm policy automation --force-release chooses never, approval (the default) or auto.
06Durability
NTM records what it is about to do before doing it. On resume, finished work keeps its result and anything uncertain waits for a person, so a prompt is never sent twice by accident.
ntm pipeline resume
Run a five-step pipeline, crash it anywhere, then resume it the way NTM does. Switch to “A retry loop” to see what a plain rerun would repeat.
Run it, crash it, resume it
continue, restart-failed and force-iter resume modes. An uncertain receipt is settled only by ntm pipeline recover … --accept-delivery (or --accept-command, --accept-selector) after a person has checked, and that records an observation without sending anything.ntm rotate context
NTM forecasts when each agent’s context runs out, tries the agent’s own compaction first, and if that isn’t enough hands the task, identity and reservations to a fresh pane.
Read the forecast rulesRun a long task and watch the context meter
idledraininghanding_offverifyingactiventm rotate context recover … --action=accept or --action=abort instead of starting again. Both panes are fenced against new work while ownership moves.Durable state
These are the records NTM keeps, and what each one lets you get back. Its runtime store alone has 48 SQLite tables.
ntm checkpoint saveRestore a session in place, or as a new one with --as. Optional AES-256-GCM at rest.
ntm sessions saventm sessions resume puts each agent back into its own conversation, and stops rather than guess.
The next ntm spawn of the session hands the latest one to the new agents before your prompt.
Resume reuses settled steps and stops on uncertain ones; cleanup keeps any run with an open receipt.
Each entry carries the SHA-256 of the one before; ntm audit verify checks the chain. Tamper-evident, not signed.
A cursor lets a dashboard or an agent ask for everything since the last event it saw.
07Robot mode and API
NTM is built to be run by agents as much as by people: every --robot-* command prints one JSON envelope with fixed exit codes, the binary describes its own surface, and ntm serve puts the same operations behind REST and live streams.
ntm --robot-capabilities
The list the binary reports about itself, read when this page was built. Search it, filter by area, open any command for its parameters and examples.
Search the robot surface, then open a command
robot.GetCapabilities(). Exit codes: 0 success, 1 error (success: false with an error_code such as SESSION_NOT_FOUND or TIMEOUT), 2 unavailable (NOT_IMPLEMENTED, skip it gracefully). Critical arrays such as sessions and panes are always present, and empty means “checked, found nothing”.--robot-format=toon
An agent pays for every token it reads, so robot output can also come as TOON: tab-separated rows under a schema header. Real envelopes from NTM’s token corpus, encoded by its production renderer.
Compare one envelope in both encodings
{
"success": true,
"timestamp": "2026-08-16T12:00:00Z",
"version": "1.0.0",
"output_format": "json",
"schema_id": "ntm:robot:status:v1",
"schema_version": "1.0.0",
"generated_at": "0001-01-01T00:00:00Z",
"overall_status": "degraded",
"system": {
"version": "1.24.0",
"commit": "abcdef1234567890",
"build_date": "2026-08-01T00:00:00Z",
"go_version": "go1.24",
"os": "darwin",
"arch": "arm64",
"tmux_available": true
},
"sessions": [
{
"name": "proj-a",
"attached": true,
"agent_count": 2,
"health": {
"status": "healthy"
}
},
{
"name": "proj-b",
"agent_count": 3,
"health": {
"status": "warning",
"reason": "agent idle \u003e10m with pending work"
}
},
{
"name": "proj-c",
"attached": true,
"agent_count": 4,
"health": {
"status": "critical",
"reason": "agent idle \u003e10m with pending work"
}
}
],
"summary": {
"total_sessions": 3,
"total_agents": 9,
"attached_count": 2,
"claude_count": 6,
"codex_count": 3,
"gemini_count": 0,
"antigravity_count": 0,
"grok_count": 0,
"cursor_count": 0,
"windsurf_count": 0,
"aider_count": 0,
"opencode_count": 0,
"omp_count": 0,
"pi_count": 0,
"ollama_count": 0,
"agents_by_state": {
"active": 6,
"idle": 3
},
"agents_by_type": {
"claude": 6,
"codex": 3
},
"ready_work": 6,
"in_progress": 1,
"health_score": 0.88,
"health_status": "healthy",
"alerts_active": 0,
"mail_unread": 0,
"mail_urgent": 0
},
"beads": {
"available": true,
"project": "ntm",
"total": 110,
"open": 40,
"ready": 6,
"closed": 65
}
}--robot-terse packs a session’s state into one line.ntm serve
ntm serve runs the same operations over HTTP, described by an OpenAPI 3.1.0 document that NTM generates from its own router (853 schemas), with Swagger UI built in.
Operations per area of the API
GET 157 · POST 102 · DELETE 8 · PATCH 4 · PUT 4
Local loopback by default. API keys, OIDC (RS256, PS256, ES256, ES384, EdDSA) or mutual TLS for remote use, with role-based scopes.
A credential buys a 30-second, single-use ticket, so tokens never appear in URLs or logs.
Per-IP and per-principal token buckets, 100 requests per second with a burst of 200 by default.
ntm web serves the browser dashboard together with the same API.08Reasoning ensembles
ntm ensemble gives one question to several agents, each told to reason a different way, then merges what they find and can file the findings as Beads tasks.
ntm ensemble
Every square is a mode; brighter squares are the core tier. Pick an ensemble to light the modes it uses and see how it merges their answers.
Pick an ensemble, or point at a mode
AFormal
BAmpliative
CUncertainty
DVagueness
EChange
FCausal
GPractical
HStrategic
IDialectical
JModal
KDomain
LMeta
Point at or tap a square to read the mode.
EmbeddedEnsembles, read when this page was built. Each mode runs in its own pane with its own instructions; ntm ensemble synthesize merges the outputs and ntm ensemble export-findings turns them into Beads.09Design
Agent CLIs are terminal programs, and you need to be able to watch one, take over and hand back. tmux gives every agent a real terminal you can attach to over SSH that outlives a dropped connection; NTM makes it dependable to drive.
ADR-0002
Every pane is still an ordinary tmux pane you can attach, zoom into and type in. A headless agent protocol was considered and deferred until CLIs offer one a person can still watch.
The same jobs, with plain tmux and with NTM
| You need to… | tmux by itself | With NTM |
|---|---|---|
| Run agents side by side | Yes, by hand: split panes and start each CLI yourself. | ntm spawn with counts per agent type, named panes, models, personas, worktrees. |
| Know which agents are working | Look at each pane. | Parsed from every pane, with a confidence, as JSON or on the dashboard. |
| Know a prompt went in | send-keys returns when the keys are typed. | Readiness check, transport choice, identity fence and, for six CLIs, a check of the screen afterwards. |
| Choose the next task | You decide and type it. | Graph-ranked, claimed atomically, gated labels respected. |
| Keep agents off each other’s files | Nothing. | Reservations, renewal and a commit guard that names the holder. |
| Stop a destructive command | Nothing. | A policy hook in every Claude Code pane; dcg checks for text sent to others. |
| Recover after a crash | Panes are gone; tmux-resurrect can bring back the layout. | Checkpoints, saved sessions with native resume, receipts that refuse unsafe replays. |
| Let a program drive it | tmux commands and string parsing. | 178 robot commands and a REST API with one JSON contract. |
Graceful degradation
Each of these tools adds something when it is installed. When one is missing, NTM says so and carries on without it.
Uninstall a tool and see what NTM does without it
The task database NTM claims work from, atomically, in its SQLite file.
Without it No task assignment; sessions and sending still work.
Graph ranking of ready work: what unblocks most, critical path, bottlenecks.
Without it ntm work and auto-assignment report it missing, with an install hint.
Agent identities, messages, file reservations and build slots.
Without it No reservations; the commit guard warns and lets commits through unless strict mode is on.
Relevant snippets from past agent sessions added to prompts, marked as untrusted data.
Without it Prompts go out without history context.
Procedural rules injected into sends and handoffs with --with-memory.
Without it Sends go out unchanged and the skip is noted in the JSON.
A second destructive-command check, also on text NTM sends to non-Claude panes.
Without it That check is skipped; the Claude policy hook still runs.
Picks which subscription seat a new pane uses, and switches accounts on rate limits.
Without it Panes launch on whatever account their command names.
Mirrors two-person approval requests.
Without it NTM keeps its own approval records.
Connections per agent process, in the dashboard’s network panel.
Without it The panel says why it is empty instead of showing zero traffic.
Classifies agent processes as useful, waiting, idle, stuck or zombie.
Without it No process triage signal.
Scans staged files in the pre-commit hook.
Without it The scan passes with a note.
Sends agents’ builds to remote workers through a Claude Code hook.
Without it Builds run locally.
With tmux alone NTM still spawns swarms, reads every pane, checks every send, runs the Claude Code policy hook, saves checkpoints, and serves robot mode and the API.
ntm deps -v lists what NTM found on this machine. Each tool is detected through its adapter in internal/tools, and a missing one is reported, never treated as success.Install
NTM needs tmux and whichever agent CLIs you want to run. All twelve harnesses are built in; Beads, bv, Agent Mail, CASS and the rest add features when they are installed and stay out of the way when they are not. ntm deps -v tells you what it found.
Install script (Linux, macOS)
curl -fsSL "https://raw.githubusercontent.com/Dicklesworthstone/ntm/main/install.sh?$(date +%s)" | bash -s -- --easy-modeHomebrew
brew install dicklesworthstone/tap/ntmDocker
docker run --rm -it ghcr.io/dicklesworthstone/ntm:1From source (Go 1.26.11+)
git clone https://github.com/Dicklesworthstone/ntm.git && cd ntm && go install ./cmd/ntm# Shell integration, then check what NTM can see
eval "$(ntm shell zsh)"
ntm deps -v
# A project directory and a mixed swarm in it
ntm quick payments --template=go
ntm spawn payments --cc=2 --cod=1 --grok=1
# Watch it, and give it something to do
ntm dashboard payments
ntm send payments --cc "Map the auth layer and propose a refactor plan."
# What an agent would call instead
ntm --robot-snapshot
Facts on this page were read from commit fbe8b0ff11 (2026-12-05) when the site was built.