agent-autoloop: What Is It? A Self-Hosted Loop That Lets CLI Agents Work in the Background — and Only Pings You When It Matters
A self-hosted loop that lets CLI agents work in the background and only pings you when a call needs your judgment.
1. What it is: a backstage for CLI agents
2. How one job flows: the five-step loop
3. The kernel's four mechanisms: free waiting, traceable when things go wrong
4. Do the math: waiting costs nothing, an 18.2% fork ratio, one release a day
5. What plugs in: agents, events, channels, and delivery can all change
6. Who it fits, who should wait, and sources
Comparison: how the built-in agents plug in
| Agent | How it plugs in | Session resume | Verified status |
|---|---|---|---|
| Claude Code | Built-in plugin | Multi-round resume supported | Multi-round Q&A and cross-process resume verified |
| Codex | Built-in plugin | Multi-round resume supported | Multi-round Q&A and cross-process resume verified |
| ACP (Gemini CLI, OpenCode, etc.) | use: “acp” | Supported | Handshake verified (Gemini CLI 0.67.0, OpenCode 1.1.2); multi-round Q&A and resume not yet run |
| DeepSeek Harness (dsh) | Built-in plugin (0.2.2 and above) | Not stated separately | Older connection commands taken from official docs, not run one by one |
| ZCode | Built-in plugin | Supported | Ask, answer, and resume of the original session verified |
| Generic command (pi, OpenClaw, Hermes, Cursor, CodeBuddy, etc.) | use: “command”, {prompt} passed as a separate argument | Depends on the agent | Commands taken from each project's official docs, not run one by one |
Frequently Asked Questions
How is agent-autoloop different from just babysitting Claude Code?
Babysitting means a human at a terminal: you type a sentence, watch it run, and wait for it to ask what is next — and the work stops the moment you walk away. Autoloop puts a backstage hub in the middle: cron jobs, GitHub Issues, and production errors become events that reach an agent on their own, the agent finishes a round and exits, and only the calls it cannot make alone arrive as a card for your approval — while it waits, it holds no process and burns no tokens. You keep the same agent; you just stop having to watch it.
Does it burn tokens while it waits for my decision?
No. While it waits for your call, the agent process exits outright and the waiting state lives in a database — three days without an answer means no agent process running and no tokens spent for three days, only a very light hub waiting in the background. The moment you answer, it resumes the original conversation. That is the kernel's zero-cost suspension by design, not a trick.
Which agents does it support?
Built in: Claude Code, Codex, ACP, DeepSeek Harness, ZCode, and a generic command; one line of configuration also plugs in pi, OpenClaw, Hermes, Cursor, CodeBuddy, and other command-line tools, and agents that speak ACP (Gemini CLI, OpenCode) connect with use: “acp”. Verified in practice are multi-round Q&A and session resume for Claude Code, Codex, and ACP, plus asking and resuming for ZCode; the other generic commands were taken from each project's official docs and have not been run one by one.
What can I use straight out of the box?
The repository ships eight templates: a morning brief, GitHub Issue follow-up, production alert triage, user feedback handling, website watch, a Feishu weekly brief and business summary, inbox triage, and PR auto-delivery — plus Claude delegating web work to Codex and a weekly code sweep. Merge the sample rules into ~/.agent-autoloop/rules.json, replace the machine name and paths, and run agent-autoloop check to enable them.
Is it safe? Will it send my credentials or code anywhere?
It is designed to run locally: it calls command-line tools that are already installed and logged in on your machine, and it never reads or transfers your account credentials — credentials stay inside their own plugins. Instruction-data separation guards against prompt injection: text arriving from outside is treated as data, never spliced into prompts. The delivery pipeline reads configuration only from main and never checks out or runs code from a PR on the machine that takes the jobs. Model calls are billed to your own account, and API keys are recommended for high-frequency automation rather than personal subscriptions.
What do I need to run it? Can one computer do it?
Yes. The requirements are Windows, macOS, or Linux, Node 24 or newer, Git, and a CLI agent that is already logged in; macOS and Linux also need curl, and no GitHub account is required. No cloud server to buy, no public port to open. Installation is one command, and agent-autoloop try walks a real round of “ask → exit and wait → approve → finish” with your own agent to verify the setup.