[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-110755":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":8,"htmlUrl":8,"language":9,"languages":8,"totalLinesOfCode":8,"stars":10,"forks":11,"watchers":12,"openIssues":11,"contributorsCount":13,"subscribersCount":13,"size":13,"stars1d":14,"stars7d":15,"stars30d":16,"stars90d":13,"forks30d":13,"starsTrendScore":17,"compositeScore":18,"rankGlobal":8,"rankLanguage":8,"license":19,"archived":20,"fork":20,"defaultBranch":21,"hasWiki":22,"hasPages":22,"topics":23,"createdAt":8,"pushedAt":24,"updatedAt":25,"readmeContent":26,"aiSummary":27,"trendingCount":13,"starSnapshotCount":13,"syncStatus":28,"lastSyncTime":29,"discoverSource":30},110755,"harness-reins","lz59970062\u002Fharness-reins","lz59970062",null,"Python",207,1,66,0,8,59,124,36,83.9,"MIT License",false,"main",true,[],"2026-11-23 12:38:54","2026-11-23 18:29:49","\u003Cp align=\"center\">\n\u003Cpicture>\n  \u003Csource media=\"(prefers-color-scheme: dark)\" srcset=\"https:\u002F\u002Fraw.githubusercontent.com\u002Flz59970062\u002Fharness-reins\u002Fmain\u002Fassets\u002Freadme\u002Fhero-dark.svg\">\n  \u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Flz59970062\u002Fharness-reins\u002Fmain\u002Fassets\u002Freadme\u002Fhero-light.svg\" width=\"100%\" alt=\"Harness Reins (reins): hand long work and child agents to an independent owner, then resume the exact session that asked\">\n\u003C\u002Fpicture>\n\u003C\u002Fp>\n\n\u003Ch3 align=\"center\">Dispatch work to any agent and route the result back to the session that asked.\u003C\u002Fh3>\n\n\u003Cp align=\"center\">\n  \u003Ca href=\".\u002FCHANGELOG.md\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Frelease-0.9.0-2a78d6\" alt=\"Release 0.9.0\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fharness-reins\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fnpm-harness--reins-2a78d6\" alt=\"npm harness-reins\">\u003C\u002Fa>\n  \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fpython-%E2%89%A53.9-2a78d6\" alt=\"Python ≥ 3.9\">\n  \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fplatforms-Linux%20%C2%B7%20macOS%20%C2%B7%20Windows-2a78d6\" alt=\"Linux, macOS, Windows\">\n  \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fagents-Codex%20%C2%B7%20Claude%20Code%20%C2%B7%20Pi%20%C2%B7%20DSH-2a78d6\" alt=\"Works with Codex, Claude Code, Pi and DeepSeek Harness\">\n  \u003Ca href=\".\u002FLICENSE\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flicense-MIT-2a78d6\" alt=\"MIT license\">\u003C\u002Fa>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"#quick-start\">Quick start\u003C\u002Fa> ·\n  \u003Ca href=\"#measured-what-waiting-costs\">Benchmark\u003C\u002Fa> ·\n  \u003Ca href=\"#how-it-works\">How it works\u003C\u002Fa> ·\n  \u003Ca href=\"#usage\">Usage\u003C\u002Fa> ·\n  \u003Ca href=\"#documentation\">Docs\u003C\u002Fa> ·\n  \u003Ca href=\".\u002FREADME.zh-CN.md\">中文\u003C\u002Fa>\n\u003C\u002Fp>\n\n---\n\n## The problem\n\nYou ask Codex, Claude Code, Pi or DeepSeek Harness to train a model, run a benchmark, or hand a review to a second agent.\nThe work takes two hours. Now what?\n\n- The agent **polls** with `sleep && tail`, burning turns, tokens and context on nothing.\n- Or the job is **owned by the agent's shell**, so it dies when the turn ends, times out, or the app restarts.\n- Or the second agent's answer lands somewhere else, and **you carry it back** to the conversation by hand.\n\n## The fix\n\n**Reins** hands the work, a command or a fresh agent in any harness, to an independent OS-native\nprocess owner. When it finishes, Reins **resumes the exact same conversation** with a short result:\nwhat it observed, what a child agent reported, where the files are, and the command to acknowledge it.\n\n```console\n$ reins run --task \"train model\" -- python train.py --config configs\u002Fexp.yaml\nreins: submitted managed task \u003Ctask-id>\nreins: execution backend: systemd\n...\n```\n\nThe agent ends its turn — zero model calls while it waits. Two hours later, the **same session**\nreceives a short envelope like this:\n\n```text\n[reins] \u003Ctask-id>-c1\nTask: train model\nResult: exited 0 · 2h 3m 32s\nFrom: run on systemd-user\nFiles: ~\u002F.reins\u002Ftasks\u002F\u003Ctask-id>\u002F (attempt-1.log)\nDetails: ...\u002Fdetails\u002F\u003Ctask-id>-c1.md (as needed)\nSession: \u003Csession-id> (only)\nACK after inspection: reins ack \u003Ctask-id>-c1\n```\n\n## Measured: what waiting costs\n\n**8× cheaper, 10× fewer model calls, and the work survives the agent being killed.**\nSame agent (Codex with Kimi K3), same task, with and without Reins.\n→ [The full benchmark](https:\u002F\u002Flz59970062.github.io\u002Fharness-reins\u002Fen\u002Fbenchmark\u002F)\n\n\u003Cp align=\"center\">\n\u003Cpicture>\n  \u003Csource media=\"(prefers-color-scheme: dark)\" srcset=\"https:\u002F\u002Fraw.githubusercontent.com\u002Flz59970062\u002Fharness-reins\u002Fmain\u002Fassets\u002Freadme\u002Fbenchmark-longrun-dark.svg\">\n  \u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Flz59970062\u002Fharness-reins\u002Fmain\u002Fassets\u002Freadme\u002Fbenchmark-longrun-light.svg\" width=\"100%\" alt=\"Over 60 hours the agent without Reins made 911 model requests and spent 287 yuan, then its session was killed and the task failed; with Reins it made 90 requests and spent 35 yuan, and finished all 72 hours\">\n\u003C\u002Fpicture>\n\u003C\u002Fp>\n\nWithout Reins the agent has to keep watch: one session polled for 60 hours, made 911 model requests and spent\n¥287, and when its process was killed the task died with it. With Reins the agent ends its turn after each step\nand is called back when there is something to do: ¥35 over the same 60 hours, nothing to kill at hour 60, and\nthe job ran to the end.\n\n\u003Cp align=\"center\">\n\u003Cpicture>\n  \u003Csource media=\"(prefers-color-scheme: dark)\" srcset=\"https:\u002F\u002Fraw.githubusercontent.com\u002Flz59970062\u002Fharness-reins\u002Fmain\u002Fassets\u002Freadme\u002Fbenchmark-time-dark.svg\">\n  \u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Flz59970062\u002Fharness-reins\u002Fmain\u002Fassets\u002Freadme\u002Fbenchmark-time-light.svg\" width=\"100%\" alt=\"Share of wall time: without Reins most of the run is spent waiting with the agent alive; with Reins most of it has no agent process at all\">\n\u003C\u002Fpicture>\n\u003C\u002Fp>\n\n| | Without Reins | With Reins |\n| --- | ---: | ---: |\n| 3-day task, cost of the first 60 h | ¥286.78 | **¥35.17** |\n| Model requests in those 60 h | 911 | **90** |\n| Every agent process killed at hour 60 | task failed | **finished all 72 h** |\n| Result back in the same session (median) | – | **2 s** |\n| 4.8-hour task, cost | ¥30.59 | **¥30.11** |\n\nReins changes what waiting costs and whether the work survives, not how well the model solves the task.\nMoney at list price (input ¥20, cache hit ¥2, output ¥100 per million tokens).\n\n## Why more than one harness?\n\nSubscriptions are the cheapest way to use frontier models, and they come tied to a harness. A Claude\nplan gives you Claude models inside Claude Code; a ChatGPT plan gives you OpenAI models inside Codex.\nThat quota generally can't be pointed at another tool, and each of these harnesses is built around its\nown vendor's models.\n\nOpen harnesses such as Pi work the other way around. They run whatever model you give them: an API key\nfrom any provider, an open-weight model on your own GPU, or a cheap fast model for routine steps.\n\nReal work rarely fits one model. Writing, coding, reviewing and long experiments each have a model that\ndoes them best or most cheaply, and models keep getting more specialized. Using the right one for each\njob means running several harnesses side by side, some closed and some open. None of them knows the\nothers exist: a Codex session can't hand a task to Claude Code and get the answer back, and a Pi agent\ncan't report to either.\n\nThis project fills that gap. From a Codex, Claude Code, Pi or DeepSeek Harness session,\n`reins agent codex|claude|pi|dsh` starts a fresh agent in any of the four as a durable job, and the\nresult comes back to the session that asked for it. Codex, Claude Code, Pi and DeepSeek Harness are harnesses; Reins is what holds all of them, which is why\nLong Task Callback became Agent Traffic Control and then **Harness Reins**.\n\n## Highlights\n\n| Feature | What you get |\n| --- | --- |\n| **No polling** | The worker and daemon wait for you. No model turns are spent while the task runs. |\n| **Same conversation** | Callbacks are bound to the original Codex (`CODEX_THREAD_ID`), Claude Code (`CLAUDE_CODE_SESSION_ID`), Pi (`PI_SESSION_FILE`) or DeepSeek Harness (`DSH_SESSION_ID`) session — never a guess. |\n| **Survives the agent** | Tasks run under systemd, launchd or Task Scheduler — not as a child of the agent turn or even the daemon. |\n| **Claude Code native** | In Claude Code (CLI or desktop app), a background `reins wait` wakes the conversation you're looking at — no headless side session. → [Claude Code guide](docs\u002Fclaude-code.md) |\n| **Pi native** | Pi's extension steers the result into the running Pi session — even mid-run, before its next model call. → [Pi guide](docs\u002Fpi.md) |\n| **DeepSeek Harness native** | A background `reins wait` runs as a DSH job; its completion notification wakes the same conversation. DSH has no headless fallback, so delivery is always the original live session. → [DSH guide](docs\u002Fdsh.md) |\n| **Any agent, any harness** | `reins agent codex\\|claude\\|pi\\|dsh` starts a fresh agent as a durable job from any of the four. It writes a structured report, shown to you as a claim, never as proof. |\n| **Sessions talk to each other** | Name a Codex, Claude Code, Pi or DSH session, then `reins send` to it from any other. Messages survive a busy or closed session, never start a process unless you ask, and agents that talk in circles get stopped. → [Guide](docs\u002Fguides\u002Fmessages.en.md) |\n| **One installation** | `reins setup` installs one canonical `~\u002F.reins\u002Fbin\u002Freins`; copies of `reins` in other environments forward to it, so versions never mix. |\n| **Multi-stage goals** | Track an objective across many callbacks with a YAML plan that the agent must verify before declaring victory. |\n| **Never reruns blindly** | Ambiguous launches, reboots and failures are reported to the agent for inspection — Reins never silently replays work. |\n| **Self-repairing setup** | When something is misconfigured, the agent gets a machine-readable repair plan and fixes it itself. |\n| **At-least-once delivery** | Durable queue, stable callback IDs, retries with backoff, and explicit ACKs. |\n\n## Quick start\n\n```bash\n# 1. Install (prebuilt for Linux x64; see below for other platforms)\nnpm install -g harness-reins\n\n# 2. Make it the installed Reins, add the skills for Codex + Claude Code, start the coordinator\nreins setup --force --enable --now\n#    Using Pi too? Add --with-pi-extension (Pi skill + live-callback extension)\n#    Using DeepSeek Harness too? Add --with-dsh (skill + launcher discovery)\n\n# 3. Check that everything is healthy\nreins --version\nreins doctor --agent codex --session \u003Csession-id>\n```\n\nWithout Node, or on macOS and Windows until their prebuilt packages ship, install from source and\nrun the same `reins setup`:\n\n```bash\npython3 -m pip install \"git+https:\u002F\u002Fgithub.com\u002Flz59970062\u002Fharness-reins.git\"\n```\n\nThat's it. `setup` installs the bundled skill, so your agent already knows when and how to use `reins`.\nFrom inside a Codex, Claude Code or DeepSeek Harness session, just ask it to run something long.\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>Platform requirements\u003C\u002Fb>\u003C\u002Fsummary>\n\n| Platform | Task owner | Coordinator | Notes |\n| --- | --- | --- | --- |\n| **Linux** | Independent systemd user service (v240+) | systemd user service | Falls back to GNU `screen` when no user systemd is available (e.g. Docker, AutoDL). See [containers](docs\u002Fcontainers.md). |\n| **macOS** | One-shot launchd job in the GUI session | LaunchAgent | No `screen` needed. See [macOS guide](docs\u002Fmacos.md). |\n| **Windows 10+** | Per-user Task Scheduler task + Job Object | Login scheduled task | Requires a logged-in session and an ACL-capable filesystem (NTFS). See [Windows guide](docs\u002Fwindows.md). |\n\nThe backend is recorded when a task is submitted and is never silently changed during recovery.\nTo use the screen compatibility backend: `sudo apt install screen` (or `dnf install screen`), then\n`reins run --backend screen ...`.\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>Codex Desktop callbacks\u003C\u002Fb>\u003C\u002Fsummary>\n\nStart Desktop normally: `auto` delivers callbacks through the native `codex queue` command, with no\nlauncher and no restart. Callback modes are explicit (`cli`, `codex-queue`, `app-server`, `manual`, `auto`).\nRead [Codex Desktop](docs\u002Fintegrations\u002Fdesktop.md) and [callback modes](docs\u002Fcallback-modes.md) for\nthe details and current limits.\n\n\u003C\u002Fdetails>\n\n### Coming from ATC (`atc`) or Long Task Callback (`ltc`)\n\nReins does not read the records of either. Move over in one explicit step:\n\n```bash\nreins migrate            # shows what would change; changes nothing\nreins migrate --apply    # archives ~\u002F.atc and ~\u002F.ltc, removes the old services, skills and hooks\nreins setup --force --enable --now\n```\n\nEach generation moves on its own: one that still has callbacks to deliver or tasks running is left\nalone and reported, so a busy LTC does not hold back an idle ATC. Add `--wait` to let the old daemons\nfinish first, or `--only atc|ltc` to move one. State directories are renamed, never deleted. ATC's\nsystemd drop-ins and its `experts.yaml` carry over to Reins.\n\n## How it works\n\n\u003Cp align=\"center\">\n\u003Cpicture>\n  \u003Csource media=\"(prefers-color-scheme: dark)\" srcset=\"https:\u002F\u002Fraw.githubusercontent.com\u002Flz59970062\u002Fharness-reins\u002Fmain\u002Fassets\u002Freadme\u002Fworkflow-dark.svg\">\n  \u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Flz59970062\u002Fharness-reins\u002Fmain\u002Fassets\u002Freadme\u002Fworkflow-light.svg\" width=\"100%\" alt=\"Five steps: submit, own, run, queue, resume; the agent submits the next stage and the loop repeats\">\n\u003C\u002Fpicture>\n\u003C\u002Fp>\n\n```text\nsystemd user service (Linux) \u002F LaunchAgent (macOS) \u002F login scheduled task (Windows)\n  └─ reins daemon                 control, recovery and callback delivery\n\nIndependent per-task service (screen for legacy tasks)\n  └─ Reins worker\n      └─ training \u002F benchmark \u002F build \u002F child agent\n```\n\n1. **Submit** — the agent calls `reins run` or `reins agent`. Reins durably records the command, environment,\n   original session binding, backend and log path, then returns immediately.\n2. **Own** — the daemon asks the OS for a separate task service. The task is *not* a child of the agent or the daemon.\n3. **Run** — the job runs for minutes or hours. Nobody polls.\n4. **Queue** — on exit, Reins stores the result and queues a callback for the original conversation.\n5. **Resume** — the same session wakes up, inspects the result, and runs `reins ack`.\n\n> **Rule of thumb:** anything reliably done in under 60 seconds can run in the foreground.\n> Anything longer — or of uncertain duration — goes through `reins run`.\n\n## Usage\n\nReins has three entry points:\n\n| Command | Use it when… |\n| --- | --- |\n| `reins run -- \u003Ccommand>` | You want Reins to **launch and own** a new long task. |\n| `reins agent codex\\|claude\\|pi -- \u003Cprompt>` | You want a **fresh child agent** to work in the background and report back. |\n| `reins done ...` | The task is **already owned** by screen, tmux, Slurm or another scheduler — just report completion. |\n\n### `run` — submit a long task\n\n```bash\nreins run \\\n  --cwd \"$PWD\" \\\n  --task \"train model\" \\\n  -- python train.py --config configs\u002Fexp.yaml\n```\n\nReturns as soon as the task is durable, printing the task ID, backend and log file:\n\n```bash\ntail -f ~\u002F.reins\u002Ftasks\u002F\u003Ctask-id>\u002Fattempt-1.log\n```\n\n### DeepSeek Harness: wake the live session\n\nDSH keeps background jobs alive across turns and notifies the conversation when one exits. After\n`reins run`, it prints the exact command to start with `run_in_background: true`:\n\n```bash\nreins wait --queue-dir ~\u002F.reins\u002Fqueue --task \u003Ctask-id>\n```\n\nRead the finished job's output with `job_output`; that output is the callback. DSH's one-shot\nrunner refuses desktop-preset sessions, and a second writer would race the live writer lock, so Reins\nnever resumes a DSH conversation headlessly: with no waiter the callback stays queued until this\nsession runs `reins wait` again. → [DSH guide](docs\u002Fdsh.md)\n\n### Claude Code: wake the live session\n\nClaude Code wakes a session when a background shell command exits. After `reins run`, it prints the\nexact command to run with `run_in_background`:\n\n```bash\nreins wait --queue-dir ~\u002F.reins\u002Fqueue --task \u003Ctask-id>\n```\n\n`reins wait` exits — and the session wakes up — as soon as the callback is queued. While a waiter is\nalive the daemon stays out of the way; if the session is gone, the daemon falls back to a headless\n`claude -p --resume` from the session's original directory. The installed Claude skill teaches\nClaude to do this on its own. → [Claude Code guide](docs\u002Fclaude-code.md)\n\n### `agent` — delegate to a background child agent\n\n```bash\nreins agent claude --cwd \"$PWD\" --task \"review parser edge cases\" \\\n  -- \"Inspect parser.py and its tests. Report concrete defects and suggested fixes.\"\n\nreins agent codex --template test --task \"write parser tests\" \\\n  -- \"Use docs\u002Fparser-contract.md to test parser.py, including invalid input and boundaries.\"\n```\n\nThe child gets its own private prompt\u002Fresult files; the callback still goes to *your* conversation.\nUse `--template` \u002F `--template-file` for reusable prompts, `--model` \u002F `--reasoning-effort` to pin\nthe child's model, and `--dry-run` to preview. → [Agent mode & templates](docs\u002Fagent-mode.md)\n\n### `done` — report an externally managed task\n\n```bash\nset +e\npython train.py --config configs\u002Fexp.yaml\nstatus=$?\nreins done --cwd \"$PWD\" --task \"train model\" \\\n  --command \"python train.py --config configs\u002Fexp.yaml\" --exit-code \"$status\"\nexit \"$status\"\n```\n\nDrop this into a screen\u002Ftmux session, Slurm epilogue, shell trap or Python `finally`. `done` only\nqueues the callback — it doesn't make the preceding process durable.\n\n### Acknowledge, inspect, cancel\n\n```bash\nreins wait --task \u003Ctask-id>         # (Claude Code \u002F DSH) block until the callback is ready, then print it\nreins ack \u003Ccallback-id>        # confirm a callback was received and inspected\nreins status                        # list callbacks that still need handling\nreins cancel --id \u003Ccallback-id>     # cancel a queued callback\nreins retry --id \u003Ccallback-id>      # re-deliver a result without rerunning the task\nreins doctor --agent codex --session \u003Cid>   # JSON readiness report + repair plan\n```\n\n### Multi-stage goals\n\nCallback ACK says *\"I saw this result.\"* Goal ACK says *\"the whole objective is done (or blocked).\"*\n\n```bash\nreins goal start --id report-goal --session \u003Csession-id> --cwd \"$PWD\" \\\n  --task \"finish the report\" --plan-file .reins\u002Fgoals\u002Freport-goal.yaml\nreins goal check --id report-goal\nreins goal ack --id report-goal --state completed --plan-sha256 \u003Cchecked-sha256>\n```\n\nThe plan is an editable YAML path of steps. Completion is rejected unless every step is `completed`\nand the digest matches a fresh `goal check`. Idle goals get a status nudge every three hours.\n→ [Goals guide](docs\u002Fgoals.md)\n\n### `send` — message another session\n\n```bash\nreins session register reviewer          # inside the session that should receive\nreins send reviewer --subject \"Check the queue change\" -m \"Branch feature\u002Fqueue is ready.\"\nreins inbox                              # what is waiting for this session\n```\n\nWorks across Codex, Claude Code, Pi and DeepSeek Harness on one machine. Messages between machines are planned.\n→ [Messages between sessions](docs\u002Fguides\u002Fmessages.en.md)\n\n### Session binding\n\nInside an agent conversation, Reins binds automatically via `CODEX_THREAD_ID` (Codex) or\n`CLAUDE_CODE_SESSION_ID` (Claude Code). You can also bind explicitly:\n\n```bash\nreins done --agent claude --session \u003Csession-id> --cwd \"$PWD\" --task \"external job\" --exit-code 0\n```\n\nIf no target can be determined, Reins fails instead of guessing; there is no \"most recent session\" fallback.\n\n## Guarantees and boundaries\n\n- **At-least-once delivery.** Unacknowledged callbacks retry with backoff. After a host failure a callback\n  may arrive twice, so resumed agents inspect existing processes and artifacts before acting.\n- **No blind reruns.** After a reboot, Reins wakes the original session with the task, log path and\n  interruption reason — the agent decides whether to resume from a checkpoint. There is no `--resume-command`.\n- **No cross-host recovery.** Reins does not move workspaces, data, checkpoints or credentials between machines.\n- **Private state.** Everything lives under `${REINS_HOME:-~\u002F.reins}\u002F`; full callback\n  details are saved privately in `details\u002F\u003Ccallback-id>.md`. An older\n  `~\u002F.codex\u002Fharness-reins\u002F` is moved there on first run and left as a symlink.\n\nMore in [recovery & self-repair](docs\u002Frecovery.md) and [architecture](docs\u002Farchitecture.md).\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>Upgrading from 0.6\u003C\u002Fb>\u003C\u002Fsummary>\n\nDrain existing work and upgrade the coordinator before submitting native tasks, or use a separate 0.7\nqueue and Agent profile — the 0.6 daemon does not understand native task records. Pass the same\n`--queue-dir \u002Fabsolute\u002Fpath\u002Fto\u002Freins-queue` to `reins daemon`, `reins run` and `reins ack`. Standalone\ncoordinators also need separate `CODEX_HOME` profiles. The submitting shell must carry the original\nAgent session ID (or pass `--session`). Old scripts may still pass `--via-daemon`; it is a hidden no-op.\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>Service management\u003C\u002Fb>\u003C\u002Fsummary>\n\n```bash\n# Linux\nsystemctl --user status harness-reins.service\njournalctl --user -u harness-reins.service -f\n# macOS\nlaunchctl print \"gui\u002F$(id -u)\u002Fharness-reins\"\n```\n\n`reins setup --service auto` picks systemd (Linux), launchd (macOS) or `windows-task` (Windows).\nUse `--service standalone --now` where user systemd is unavailable (e.g. AutoDL), or\n`--service supervisor` explicitly. Standalone setup does not register startup on its own — see\n[containers](docs\u002Fcontainers.md) for boot hooks, Supervisor and Docker restart policies.\n\n\u003C\u002Fdetails>\n\n## Documentation\n\n[中文文档站](https:\u002F\u002Flz59970062.github.io\u002Fharness-reins\u002F) · [文档源码](docs\u002Findex.md)\n\n| Topic | |\n| --- | --- |\n| Claude Code: live callbacks, binary discovery, session directories | [docs\u002Fclaude-code.md](docs\u002Fclaude-code.md) |\n| Pi: steered live callbacks, managed sessions, Pi child agents | [docs\u002Fpi.md](docs\u002Fpi.md) |\n| DeepSeek Harness: live jobs, no headless resume, DSH child agents | [docs\u002Fdsh.md](docs\u002Fdsh.md) |\n| Agent mode, templates, Claude Code config | [docs\u002Fagent-mode.md](docs\u002Fagent-mode.md) |\n| Registering templates as discoverable skills | [docs\u002Ftemplate-registration.md](docs\u002Ftemplate-registration.md) |\n| Goals and acknowledgement layers | [docs\u002Fgoals.md](docs\u002Fgoals.md) |\n| Callback format, reminder cadence, user hook | [docs\u002Fcallback-reminders.md](docs\u002Fcallback-reminders.md) |\n| Callback modes (CLI \u002F Desktop \u002F manual) | [docs\u002Fcallback-modes.md](docs\u002Fcallback-modes.md) |\n| Restart, recovery and self-repair | [docs\u002Frecovery.md](docs\u002Frecovery.md) |\n| Protocol v1 and package architecture (design) | [protocol](docs\u002Fdesign\u002Fprotocol-v1.md) · [architecture](docs\u002Fdesign\u002Farchitecture.md) |\n| Platform ownership and extension points | [docs\u002Farchitecture.md](docs\u002Farchitecture.md) |\n| macOS · Windows · Containers | [macOS](docs\u002Fmacos.md) · [Windows](docs\u002Fwindows.md) · [Containers](docs\u002Fcontainers.md) |\n| Benchmark: what waiting costs, with and without Reins | [Benchmark](https:\u002F\u002Flz59970062.github.io\u002Fharness-reins\u002Fen\u002Fbenchmark\u002F) |\n| Validation records | [0.8.0.dev0 Linux in Docker](docs\u002Fvalidation-0.8.0-docker.md) |\n| Validation records (Long Task Callback era) | [0.7.0](docs\u002Fvalidation-0.7.0.md) · [0.7.1 preview](docs\u002Fvalidation-0.7.1-preview.md) · [Linux preview](docs\u002Fvalidation-0.7.0a1.md) · [macOS](docs\u002Fvalidation-macos.md) · [Windows](docs\u002Fvalidation-windows.md) |\n| Release history | [CHANGELOG.md](CHANGELOG.md) |\n\n## Roadmap\n\n- [x] Native task owners on Linux, macOS and Windows\n- [x] Fresh child agents in Codex, Claude Code and Pi; live callbacks into Claude Code and Pi\n- [x] Protocol v1: root-plus-suffix IDs, record schemas, delivery capabilities, results that keep child reports apart from observed facts (0.8)\n- [x] One canonical installation and npm distribution for Linux x64 (0.8)\n- [ ] Prebuilt npm packages for macOS and Windows\n- [x] Messages between Codex, Claude Code and Pi sessions on one machine (0.11); DeepSeek Harness joins in the next release\n- [ ] Messages between machines, over SSH and an authenticated port ([design](docs\u002Fdesign\u002Flink-protocol.md))\n- [ ] Expert agents, and forking an expert's context from a checkpoint\n- [ ] Fan-in: one callback when a group of tasks finishes\n- [ ] More harnesses: Gemini CLI, OpenCode, and agents that speak ACP\n- [x] A first benchmark against working without Reins: Codex and Pi, Terminal-Bench 4 and a 3-day task ([results](https:\u002F\u002Flz59970062.github.io\u002Fharness-reins\u002Fen\u002Fbenchmark\u002F))\n- [ ] Benchmark with several runs per cell, more models, and injected faults on regular tasks\n\n## License\n\n[MIT](LICENSE) · Reins was previously Agent Traffic Control (`atc`) and, before that, Long Task Callback (`ltc`); see [Coming from ATC or Long Task Callback](#coming-from-atc-atc-or-long-task-callback-ltc).\n","Harness Reins 是一个用于在长时任务执行期间解耦主会话与子代理工作的 Python 工具。它将耗时任务（如模型训练、基准测试）委托给独立的 OS 进程（支持 systemd、launchd、Windows Task Scheduler），避免代理轮询或上下文丢失；任务完成后自动将结果精准路由回原始对话会话，并提供日志路径、退出状态和确认机制。核心特点是会话感知的任务托管、跨平台进程管理、多 LLM 代理兼容性（Codex\u002FClaude Code\u002FPi\u002FDeepSeek Harness）及零等待开销。适用于需要可靠异步执行并保持对话上下文连续性的 AI 代理系统、自动化工作流编排及本地大模型工具链集成场景。",2,"2026-11-24 04:39:31","CREATED_QUERY"]