Docs / Workers and automation / Connect a runner
Connect a runner
A runner is your own worker: a sign-in on a machine of yours that picks up items and schedules handed to it, then tells you or runs your agent. CommonRig never wakes anything itself.
Your own runner
Approve Custom system as the runner harness, then create executor.json in ~/.commonrig-runner (or COMMONRIG_RUNNER_DIR). Only this local file chooses the executable and fixed arguments. Work records never choose a command. Use an executable directly, with an interpreter as command for scripts; custom commands never run through a shell.
{"command":"/usr/bin/python3","args":["/home/me/worker.py"]}node <plugin folder>/helper/helper.mjs runner --loop --execute customContract: UTF-8 brief on stdin, zero exit code for success, nonzero for failure. Output tail is masked for the run summary; no output is reported when linked keys were used. The helper claims first, reports started, runs it, then reports done or failed and pings a schedule. A zero exit records a successful run; it does not prove the item is finished.
For your own HTTP loop, use the runner device sign-in and its OAuth token with the workspace MCP endpoint. POST JSON-RPC tools/call with Content-Type application/json and Accept application/json, text/event-stream. Support token refresh and stop on revoked access. Poll runner_due every two minutes; it returns handle, runner and due. Claim an item with item_claim before running, report started with runner_report, then done or failed with a summary; pass handle on calls. For a schedule, schedule_ping records its outcome. Honour prompt mode, refused calls and the approved harness. Never execute when harness is null.
{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"runner_due","arguments":{}}}An MCP SDK calls those same tools directly. An ordinary hosted agent instead calls start first and uses its narrow agent connection, never the runner token for general work. Configure each coding client with its own agent MCP sign-in before delegating work to it.
For agents runner_due item_claim runner_report schedule_ping: a runner calls runner_due, item_claim, runner_report and schedule_ping, and nothing else. Applies when you are a runner, signed in with the runner scope.
How a runner works
- A runner is its own sign-in, apart from capture and your agents: you approve it in a browser on a page of its own, and it shows under Agents, Connections, with one-click revoke.
- At sign-in you choose its reach: the whole workspace, one project, or only records that name this runner. You also say which agent execute mode may start on it: Claude Code, Codex, OpenCode, a custom system or none.
- It sees only what is handed to it, inside that reach. Assignees stay people: the runner works for its person, and its claims show beside theirs on Who's on what.
- There is one delegate per item or schedule: any of your runners, or one by name. If you have two, the first to claim wins and the other is told who has it. Your own agent can take a claim your runner holds.
- Its own calls are few: what is due, claim, ping a schedule, say how a run went, and pull your daily copy if you switched it on. It reads nothing else.
- Run one loop a runner sign-in. A second machine, or a second loop, signs in as a runner of its own.
- An item runs once: when a run has started, or its runner has said how it ended, it stays put until you delegate it again, while a schedule keeps coming round. Where you approve work before it starts, an unapproved item does not run.
Prompt or execute
| Prompt (the default) | Execute (opt in) | |
|---|---|---|
| What the runner does | Tells you the work is ready, with a command to run it | Runs your agent headless on that machine |
| Who says go | You | Nobody: you said yes when you chose execute for that record |
| Needs | Nothing more | An agent installed on the runner's machine, named at sign-in, and the loop started with --execute for it |
| Good for | Most work: you stay in the loop | Routine runs you trust, overnight checks |
Mode is set per item and per schedule, in its dialog, beside the delegate picker. A schedule whose turn is a person's never goes to a runner.
Start runner
Start runner, beside the delegate picker on an item, queues one run of that item on one of your own runners. Pick the runner, read the brief it will get, and add a direction for this run. Tick save as my default to start from the same words next time, in any project.
- The brief opens with what to call and the item's id, then your direction, then everything the item holds (title, project, done criteria, words) in one fenced section marked as data. Nothing in the item can close that fence or pass as your direction. A delegation made with the picker gets the same brief with no direction.
- The press approves that one start: on that runner, with that direction, and the brief as you read it, so a later edit to the item doesn't change the run. It replaces any delegate already set. Anyone changing the delegate afterwards, you included, takes the approval back, and it ends with the run. While that run is going, the approval counts for any of your own agents, as the one the runner starts signs in like the rest. A runner with no agent named at sign-in is prompt only: it queues, and you run it yourself.
- An item assigned to someone else, a closed item and an epic are refused: a runner works for the item's assignee. A runner signed in for one project is offered only on that project's items.
- The item gets one runner thread: your direction, then a line when the run starts and when it ends, with the runner's summary marked as its output. Nothing in it pings anyone or waits on anyone. No live output: just the start and the end.
- Only your own press starts one. An agent can't, even one acting for you.
Set one up
- On the machine that will run the work, with the plugin installed, sign the runner in: in Claude Code,
/commonrig:runner connect. It prints a short code: type it on the device page in any browser where you are signed in, over SSH too. The page asks its reach and the agent it may run: pick them and allow it. - Run it once (
/commonrig:runner): it lists what is ready, each with the command that runs it. When that looks right, leave it looping. - In the app, open an item or schedule, set Delegate to your runner, and pick prompt or execute.
- Agents, Connections lists each runner with its reach, what it may run and its last poll.
node <plugin folder>/helper/helper.mjs runner connect <workspace mcp url>node <plugin folder>/helper/helper.mjs runner --oncenode <plugin folder>/helper/helper.mjs runner --loop --execute claudenode <plugin folder>/helper/helper.mjs runner --loop --execute codexnode <plugin folder>/helper/helper.mjs runner --loop --execute opencodeAn always-on coordinator
Some people keep one agent running all day, on a spare machine or in an always-on harness, to take what comes in and hand it out. CommonRig calls it your orchestrator.
- Connect it as a hosted agent, or as a runner if it should only work what you hand it.
- Under Agents, Connections, mark that connection as your orchestrator. You have one at a time.
- From then on, a thread you start on a report, and an ask you send from the Inbox, go to it first. For 10 minutes from your latest word only it hears you; after that any agent that sees the record may answer.
- Its
starttells it that it is your orchestrator, so it knows to watch for your threads and asks. - A workspace owner can switch orchestrators off for the workspace, and a project can switch them off for itself.
- It still works only with your rights and the agent grid, and it still never wakes by itself: an always-on harness polls, or a runner loop does.

- Each connection: what kind it is, what it captures, its claims and its last call.
- Pause or revoke one at once.
- Pick your orchestrator: the connection that hears your threads and asks first.
- Runners signed in on your machines.
For agents start thread_post ask_answer dispatch: when start says you are the orchestrator, check your waiting block for threads and asks each turn, answer with thread_post or ask_answer, and hand work on with dispatch. Applies when start says you are your person's orchestrator.
Keys for a run, and a daily copy
| What it does | Where you set it | |
|---|---|---|
| Runner environment keys | An execute run that needs a key gets it as an environment variable, read on your runner from your password manager (1Password, Bitwarden or HashiCorp Vault) by that manager's own command. CommonRig keeps only the link, never the key | A project's Settings, Integration keys. A link reaches only your own runners |
| A daily copy | Once a day your runner writes your records into a folder on its machine: your own prompts and everything you can see, the same files as the download. Each pull replaces the last whole, and a failed one leaves yesterday's copy | Setup, Your data: switch it on for that runner |
- A key's name must end in _KEY, _TOKEN, _SECRET or _PASSWORD. A run that used one is reported with no output tail.
- The copy lands in an export folder beside the runner's sign-in, or in the folder COMMONRIG_EXPORT_DIR names. It holds no file bytes and nobody else's prompts.
For agents runner_export: runner_export pages through your person's own export, part by part, until done is true. Applies when you are a runner and runner_due says an export is due.
Checked against the code at e28af69c. Site built from f04f4af1.