Running agents
An agent joins the plane by calling the door. It does not matter who started it: a person, a lead agent or the kernel. What changes from one harness to the next is where a person watches it and how it receives notes.
One rule comes before the rest: every agent runs where a person can see it and stop it. Claude agents run as
sessions in the Claude desktop app, and Codex agents run as threads in the Codex desktop app. Nothing runs as a
hidden command-line process: no codex exec, no claude -p, and no private Codex app-server that runs turns. The
owner set this rule on 31 October and 1 November 2026, after finding lanes that had been working out of sight.
Overview#
| How it starts | Who starts it | Where a person watches | How notes reach it |
|---|---|---|---|
| A Claude Code session | A person, or another agent through the Claude app's own session tools | Its window in the Claude app | The inbox hooks, at the next prompt or tool call |
| A Codex thread | A person, or a script that queues a brief and wakes the thread | The thread in the Codex app | The hooks of Reaktor's Codex plugin, and the next kernel result |
| A lane | Its lead, through the lane script | The lane's thread in the Codex app | The plugin's hooks, the next kernel result, and its next brief |
| A kernel run | task.start, workspace submit or plan.attach | The Codex app for Codex runs, and Hangar's Agent pane | agent.steer, and the kernel result |
| A Gemini conversation | A person, a script through the app's agent API, or Hangar for a Gemini seat | The conversation in the Antigravity app | In the next kernel result |
Whatever starts it, the agent should, in order: bind itself to its profile if it has one, read its plan, take work, and report through plan writes.
Try it#
Before editing shared files, ask who else is working on them:
{"operation": "agent.radar", "arguments": {
"paths": ["../services/reaktorWeb/docusaurus/docs/reaktor/plane-agentic/agents"],
"session": "e9fc794e-…"}}
{"type": "completed", "result": {
"modules": ["services/reaktorWeb/docusaurus"], "sessions": [], "active": 8}}
session is your own native session id, without the runtime prefix, so the answer leaves you out. The answer
lists each other active session that touches those files or their build modules, with its title, state, last
activity and the files it has edited. An empty sessions list means no one else is there; active counts every
active session in the workspace.
For Cloudflare, Supabase and Grafana operations on the attached BestBuds workspace, the owner checks existing environment credentials and then the shared checkout's root config/ files.
Claude Code#
- Register the server once per repository:
reaktor --dir <repository> mcp install. It writes thereaktorentry with the seatclaude-codeinto.mcp.json. - Keep the inbox hooks in the repository's
.claude/settings.json:UserPromptSubmitprints new notes into the next prompt, andPostToolUseshows them to the model right after any tool call, so notes arrive mid-turn. Messages and the inbox gives the commands. Reaktor's plugin for Claude Code carries the same delivery and adds recall of kept facts at the start of a session and presence at the end of a turn. On 17 November 2026 the BestBuds and Reaktor checkouts still used the hooks in.claude/settings.json. - In the session, bind to a profile with
agent.bindif the agent has a role, so its changes carry that role's four-part name.
An agent that needs another Claude agent starts it as a new session in the Claude app, with the app's own session
tools, so it shows in the app's sidebar like any other session. It never starts one with claude -p.
Claude Code feeds the model at most about 25,000 tokens of one tool result. The door returns larger answers as
paged, to be read in parts.
Codex#
A Codex agent is a thread in the Codex desktop app, which ships inside ChatGPT.app. Each thread gets the reaktor
server from .codex/config.toml with the seat codex. It receives its notes through the hooks of Reaktor's Codex
plugin, which run at the start of a session, at each prompt and after each tool call once a person has trusted them
in /hooks, and at the top of the next kernel result it gets. A thread without the hooks that never calls the
kernel never hears from the plane.
Set the app's defaults first. The app runs every thread with its own default permissions, taken from the
top-level sandbox_mode and approval_policy in ~/.codex/config.toml, whatever the thread was created with. Set
them to danger-full-access and never. Otherwise a thread stops on an approval prompt that no one sees.
Make a thread once. The app has no command for a new thread, so a script makes it through a short-lived
codex app-server that only creates and files the thread and never runs a turn:
thread/startwith the folder, the model,approvalPolicy: "never",sandbox: "danger-full-access"and the reasoning effort.thread/name/set, thenthread/metadata/updatewith the app project the thread belongs in.- Close that server without queueing anything. A message queued on the server that has the thread loaded starts the turn right there, and closing the server then aborts it.
Run a turn. Queue the brief, then wake the thread:
codex queue --thread <thread id> --message "$(cat brief.md)"
open -g codex://threads/wake/<thread id>
The app resumes the thread in its own server and sends the queued message, usually within five seconds. The turn
keeps the thread's model and effort. It has ended when the thread's rollout file in ~/.codex/sessions/ gains a
task_complete record, which carries the turn's last message.
Three things to avoid:
- Typing into a thread while it runs. That starts a second turn beside the first.
- Queueing onto a thread the app has loaded and left idle. The app may never send the message. Clear the queue
with
thread/queue/deleteand wake the thread again, or move the work onto a fork of the thread. - Expecting to interrupt a thread from outside. The app has no control channel, and its links only wake a
thread or fill a new composer. To stop a thread, first make sure no other thread is mid-turn, then stop the app's
own
codex … app-serverchild; the app restarts it within seconds.
Codex ends an MCP tool call after 60 seconds unless the reaktor entry sets tool_timeout_sec; keep each wait
short and repeat it. A Codex Stop hook, in ~/.codex/hooks.json or in Reaktor's plugin, keeps a thread working
while its plan has work left, as Keeping a session working describes. A new
or changed hook does not run until a person trusts it with /hooks.
Gemini in the Antigravity app, and other harnesses#
Gemini 4 Carbon and Gemini 4 Argon run as conversations in the Antigravity app, where a person can watch and steer
them. Antigravity reaches the door through ~/.gemini/config/mcp_config.json, which reaktor-agent workspace install
writes. Its sessions are named agy:<id>, and a fresh one is (gemini) until it binds to a profile.
- In Antigravity, a person starts a conversation directly.
- Through the kernel,
task.startstarts a conversation with the configured Gemini provider, an absolute folder and the brief asprompt. Find its address and state withagent.sessions {app: "agy"}. Send withagent.message.send {recipient: "agy:<id>", body: "…"}to deliver into the app. Read fresh replies withagent.transcript, using the receipt'ssentAtas thesincefilter. Usetask.waitfor a kernel-tracked run. - Hangar, for a seat whose runtime is Gemini, starts it through the conductor's Antigravity app runtime. The runtime starts the conversation in the app project that holds the folder, checks which model actually serves it, follows its transcript, takes the end of the turn from the app, steers it with a message and stops it with a cancel. It runs headless, with a note that says why, only when the app is missing, when the run only inspects, or when its prompt is over 120 KB.
Two cautions apply. A conversation started without the app's project has no workspace. And when the requested model is unavailable, the app's agent API serves a smaller model without saying so, so check the model the conversation reports before trusting its work.
Any harness that speaks MCP over stdio can join the same way: start the server with its own seat name, and read
notes from kernel results and message.page.
Runs the kernel starts#
task.start starts a native Codex or Claude task on that provider's quota:
{"operation": "task.start", "arguments": {
"requestId": "docs-review-1101", "provider": "Codex", "prompt": "Review …",
"model": "gpt-6.1-sol", "effort": "xhigh", "allowWrites": true, "isolation": "Worktree",
"scope": ["../services/reaktorWeb/docusaurus/docs"], "timeoutMillis": 3600000}}
requestIdmakes the call safe to repeat: the same id returns the same run.allowWriteslets the run edit.isolation: "Worktree"gives it its own git worktree;"Shared"edits the checkout.scopelists the files, folders or modules a writer holds. A writer without a scope holds the whole workspace, and every other writer is then refused with "Source scope is held by run …".timeoutMillisis the turn's budget. Give real work hours; the default is too short.
A Codex run goes to the Codex app when three things hold: the app is installed, the run asks for no structured
output, and the app's defaults give approvals never and the run's own sandbox. The kernel then queues the prompt
on the run's thread, wakes it, and follows the rollout to the end of the turn, so the run shows live in the app. If
the app applies fewer permissions than the run needs, the kernel queues a "Stop now" message to the thread and
finishes the run as failed, naming what fell short. When the three do not hold, the run uses the kernel's own
app-server, out of sight, so keep the app's defaults set.
A Claude run started this way runs claude -p in the background, which the Claude app does not show. Where the rule
at the top of this page applies, start Claude agents as app sessions instead.
Follow a run with task.wait and read it with task.read. From a terminal, reaktor-agent workspace submit --dir <repository> --request <file> starts the same kind of run from a JSON file, and workspace runs, read,
activity and cancel follow it.
A run ends when its native turn ends. To add input to a turn in flight, use agent.steer {runId, agent, text}; to
continue a finished run, start again with its threadId. plan.attach is the person's way to start a run from the
gallery: Hangar starts the profile's agent with a brief naming its seat and items.
A lead and its lanes#
When there is more work than one agent can carry, one agent leads and the others work lanes. The lead does not implement. It reads the plans, reviews each finished run against its evidence, and writes the next brief. Each lane is a long-lived Codex thread that owns a set of files and plan items. A small driver process wakes the lead whenever something happens, so no agent waits inside a turn and nobody polls.
The loop, as it has run on BestBuds since 1 November 2026 with a Codex lead and five Codex lanes:
- Brief. The lead writes a brief of at most about 60 lines: the lane's name and one line of credit for what its last run proved; the grants for this run, by plan revision and exact file; "This turn, in order", a numbered list of items, each with what done looks like; and notes on what waits on whom. The lane script appends the shared rules, so briefs never repeat them.
- Start. The lane script queues the brief on the lane's thread, wakes it in the Codex app, and records the run: the exact prompt, and the rollout file with the offset where the turn began.
- Work. The lane sets each item In progress, works only in its own files, runs focused checks, and sets an item Done only with the evidence it names. It reports through plan messages.
- Wake. The driver follows each running turn in its rollout. It wakes the lead when a lane's turn ends, a person writes, a note lands in the lead's inbox folder, a run goes quiet for 30 minutes, or 40 minutes pass with an idle lane or unread plan messages. The wake prompt lists what happened and each lane's state. A queued turn the app has not started after 3 minutes is woken again, and after 10 minutes it is reported as failed. The driver never starts two lead turns at once, so a note that arrives during a lead turn waits for that turn to end.
- Review. On each wake the lead reads its inbox and the plans since its last revision, answers what waits on it first, and checks each finished run: the items set Done carry evidence, the evidence exists, and the pictures it names show what it claims. A lane's word is not proof, so the lead reopens an item set Done without real evidence and says why. Then it starts the next runs, at most five at once.
Rules that keep lanes out of each other's way:
- One owner per file. A file belongs to one lane at a time. Ownership moves at a run boundary, with a plan message.
- Owner lines. Each item's detail starts with its owner, such as "Owner: (codex, xhigh, sol 6.1, engine)". A lane takes only items that name it, even when the scheduler suggests others.
- Messages are information. Notes from other agents and from the scheduler inform; only the lead and the owner assign work.
- One build at a time. One lane, the builder, runs the combined check for everyone and folds each reviewed change into the next run. The others run only focused checks.
- One window at a time. Only the auditor opens app windows to take pictures, one run at a time.
A person reaches the lead in three ways: a plan message, which wakes the lead at once; a file in the lead's inbox
folder; or a direct message.send to agent:codex:<thread id>. Another agent's plan message reaches the lead at its
next wake. A supervising agent uses the same ways: it revises the plan and reviews outcomes, but never starts lanes.
Asking another agent#
peer.exchange sends one read-only question, up to 6,000 characters, to a native Codex or Claude task with a
one-minute budget. It speaks the agent-to-agent message format: SendMessage returns a task id, and GetTask with
that id returns the answer once the task's state is TASK_STATE_COMPLETED, usually within a minute. Use a new
messageId for each question, because a repeated one returns the earlier answer.
For anything larger than a question, start a task, or send a message to an agent that is already working and let it answer through the plane.
Sharing a workspace#
- Before editing, call
agent.radarwith the files and your own session id, and coordinate with any session it lists. - After editing, call
checks.affectedwith your session id. It reads your whole transcript, so early edits count, and lists each affected check with its latest run.checks.runstarts them on the build worker, andrun.waitfollows the run. - Read another session's work yourself.
session.log {session}returns another session's turns, with its prompts, commands, edits and answers, so no one has to paste them. - Report through the plane. A message on a plan write reaches everyone on the plan. A person who carries text between windows is slower and loses detail.
Troubleshooting#
Every entry here happened on a real workspace between 16 October and 2 November 2026, while up to seven agents shared it. Each one gives what you see, why, and what to do.
First checks#
- Read the state first. The plane's state is in plain files under the agent home,
~/.reaktor/agents/<sha-256 of the checkout path>/.jq '.revision, .changes[-1].summary' plans/<thread>.jsonsays whether a write landed, even while the door is busy. - Ask which build answers.
kernel.statusnames the owner's jar, when it was built and when the process started. - Ask who is here.
presence.readlists every agent, whether it is live, and what it holds.
Plans#
"No answer for reaktor.plan/write within the deadline" (31 October, six agents writing). The service answered after the caller's deadline; the write usually lands seconds to minutes later. Retrying at once duplicates the write and its message. Read the plan file's revision and last change; retry only if the change is still missing after another call or two.
"A plan is at most 512 KB; group finished parts under one Done item or start a new thread" (31 October). A long-lived plan reached the store limit, and every op in the write was lost, even a single status change. A build installed that evening also started storing the agent and profile on every change, which grew the plan by about 15 percent at its next save. Only a person can remove items, so start a new thread for new work, archive the old plan, and check a busy plan's size before it nears 450 KB.
"A plan has at most 200 open items; finish or drop open work before adding or reopening it" (29 October). Adds and reopens are refused at the cap. It once counted closed items too and blocked a plan at revision 111; it now counts open items only. Close finished work, or drop what no one will do, with a reason.
"since and decide
again.
A whole add refused for its refs. A ref must name its scheme: file:<workspace-relative path>, or symbol:,
module:, graph:, op:, flow:, task: or url:. An item links at most 20 things.
"
A Preempt note from system:scheduler. Ready work ranks at least two priority levels above what you hold. The
note is information: finish what you hold unless your lead says otherwise, and acknowledge it. If your held item
mirrors urgent work elsewhere, give it the same priority so the scheduler sees the truth.
"No item on your plan links file:
refs to the item they belong to.
Messages#
A request to stop editing arrived after the edit (18 October). A message sent to a Claude desktop session while it was mid-turn waited for that turn to end, and the lane had already edited and committed. Notes through the inbox reach a session at its next tool call instead; even so, never count on a peer pausing in time, and check what landed.
A message held, then expired (24 and 29 October). A desktop session in a different permission mode cannot ask its person, so messages to it were held and expired; five of sixteen sessions missed a broadcast this way. Appending the note to the session's inbox file reaches it at its next prompt or tool call.
A Codex thread never saw its notes (29 October). It drove releases through a command-line tool and made no kernel calls, so nothing carried its notes, and it did not read its plan's news either. Follow such a thread through its own transcript and receipts.
Hundreds of notes queued in the Codex app (1 November). An older kernel queued plan notes into the app for its threads, and four lanes held 398 stale notes. The kernel no longer does this; notes travel in kernel results. Clear stale queued items before waking a thread.
"A named agent session is required" or "A canonical agent identity is required". The caller has no agent identity, such as a script calling the workspace from a terminal. Send from an agent's own session.
The same note keeps coming back. It was never acknowledged. Call message.ack with its id, including for
scheduler notes you will not act on.
Presence#
An agent that is working shows as not live. Presence counts calls. An agent that thinks or runs a long shell
command for more than five minutes without calling the door drops out of live, and after ten minutes its leases
lapse and its items return to To do. Make a cheap call, such as reading your plan, during long work.
Entries marked beforeRestart. The kernel restarted and has not heard from those agents since. The mark clears at
their next call; an agent that never calls again stays that way.
A Codex agent named only (codex). Its session is bound to no profile. Bind it with agent.bind so its changes
carry its role.
The kernel door#
A Codex call ends after 60 seconds. Codex stops any MCP tool call after 60 seconds unless the reaktor entry
sets tool_timeout_sec. Keep run.wait at timeoutSeconds 45 or less and repeat it.
Retries stacked up behind a slow call (28 October). Configuring Gradle for a deploy plan took 1.5 to 4 minutes. Callers gave up, retried, and each retry started another plan on the owner's few request threads. Make one call at a time, with a long enough client timeout, and read the run before retrying.
An approval expired (28 October). Approvals last 15 minutes from the request, approved or not. One batch expired; the next stalled at a console prompt buried under the plan the command printed. Decide approvals while they are fresh, and repeat the identical call inside the window.
"Workspace is draining" (23 October). An owner upgrade drains first and refuses new work until no run is active,
for up to five minutes, and other agents' checks kept it busy. Upgrade when idle: agent.service.drain with
enabled: false reports activeRuns without draining.
"Background service did not publish its endpoint" after an upgrade (1 November). The new owner started more
slowly than the command waited for, and came up moments later on the new jar. Read kernel.status through a fresh
door before retrying.
Every call fails after installing a new distribution (16 October). A new server asks the owner for its catalog, and an older owner cannot answer. Always upgrade the owner after installing.
"Checks could not be chosen" (20 October). An uncommitted build-model change made the installed kernel reject the
exported model. Probe atlas_query {preset: "affected-checks", from: {changed: "worktree"}} after an install, and
keep model changes in step with the installed kernel.
"Task declarations changed after catalog discovery" (28 October). Someone's build rewrote the exported build model after the catalog loaded. The owner reloads it; retry once the files are quiet.
curl to Hangar's loopback server fails with 000 or (7). A sandboxed agent may not reach 127.0.0.1 even
while the server listens. The sandbox is refusing the connection, and the server is fine.
Running agents#
Codex threads in the app waited an hour on approvals (31 October). The app applies its own default permissions
to every thread, whatever the thread was created with, and nobody answered the prompts. Set the app's defaults, the
top-level sandbox_mode = "danger-full-access" and approval_policy = "never" in ~/.codex/config.toml; the app
applies them from the next turn, without a restart. Running helpers through codex exec instead is no longer
allowed, because no one can watch them.
A queued brief never ran (1 November). The app ignores messages queued from outside for a thread it has loaded
and left idle. The four lanes' long threads, first run through codex exec, loaded in the app on wake without the
brief ever being sent, or failed to wake at all ("thread-store conflict … already has an active writer"). The lanes
moved to fresh app threads forked from the old ones, history included, and have run in the app since. Clear stale
queued items with thread/queue/delete before waking a thread. The lead's driver now wakes a queued turn again after
three minutes and reports it as failed after ten, so a stuck wake shows up on its own.
The lead answered a note one turn late (2 November). The driver picked up a note from the lead's inbox folder at
once, but it never starts two lead turns together, so the note waited for the lead's running turn to end. A person's
plan message wakes an idle lead at once; another agent's plan message waits for the next wake, at most 40 minutes. If
nothing happens at all, the driver's status command says whether it runs; it does not survive a reboot.
A cancelled run kept writing (29 October). Cancelling marked the run Interrupted while its native turn went on and wrote to the plan under its thread id. Cancelling now aborts the native turn; check the transcript stops growing.
An Interactive run ended early and sat idle (29 October). A run ends when the native turn ends, and this one ended
after answering a note. A brief for long work must say to work the whole list in one turn; continue a finished run
with its threadId.
"Source scope is held by run …" (30 October). A run with no scope holds the whole workspace as a writer, and every
other writer is refused. Cancel it and submit again with a scope that lists its files and folders.
What it improves#
| The usual approach | What goes wrong | What the plane does |
|---|---|---|
| Agents run as background processes | No one can see what they do, or stop them in time | Every agent is a window in its desktop app, and the app's defaults give it full access, so nothing stalls on an unseen prompt |
| Each agent started by hand in its own window | The person is the scheduler, and agents wait on them | A lead briefs lanes through a script, and a driver wakes the lead when something happens |
| A coordinator that checks on its helpers in a loop | Turns are spent waiting, and news arrives late | The driver reads each turn's end from its rollout and wakes the lead only when there is something to do |
| Trusting a helper's report | Work is marked done that does not work | The lead opens the evidence of every Done item and reopens what falls short |
| Two agents edit the same file | One overwrites the other, or both stall | agent.radar before editing, one owner per file, and scoped writers that refuse overlapping writes |
| Pasting one agent's output into another | Slow and lossy | session.log and peer.exchange |
Limitations#
- A Codex thread without the plugin's hooks hears only through kernel calls. If such a thread also works only through shell commands, it receives no notes until its next brief.
- The Codex app has no control channel. Nothing outside the app can interrupt a thread it hosts, and a thread it has loaded and left idle may ignore messages queued from outside.
- Kernel Claude runs are headless.
task.startwith Claude runsclaude -p, which no app shows. - The lead's kit lives in the workspace. The lane script and the driver are scripts beside the plans, reaktor does not ship them yet, and the driver does not survive a reboot.
- A scope is only as good as its list. A run started without one holds the whole workspace as a writer, and every other writer is refused until it finishes.
- Gemini can fall back silently. When the requested model is unavailable, the Antigravity agent API serves a smaller model without an error.
- Quota is unknown to the plane unless the provider reports it.
Reference#
reaktor/reaktor-conductor/src/jvmMain/kotlin/dev/shibasis/reaktor/conductor/workspace/:AgentWorkspace.kt(runs, scopes and bindings) andAgentWorkspaceConnection.kt(the client).reaktor/reaktor-conductor/src/jvmMain/kotlin/dev/shibasis/reaktor/conductor/appserver/:CodexAppServerRuntime.kt(Codex runs, withCodexDesktopSessionfor runs in the Codex app),ClaudeCodeSessionRuntime.ktandAntigravitySessionRuntime.kt.- BestBuds
../hangar/host:KernelAgentMcpHost.kt,KernelInbox.ktand thecli/commands. - BestBuds
plans/hangar-launch/lead/: the lead's kit, withbin/lane,bin/driver,roster.json,brief-rules.mdandHANDOVER.md. - Related: Agents for harnesses, conversations and isolation, Messaging and coordination primitives, and Kernel for the door. Where each file of the plane lives: Agents: where the state lives.