How to Coordinate Multiple Coding Agents That Have No Hooks
To coordinate multiple coding agents when some of them have no hooks, work from the one thing every agent shares: its checkout. A supervisor process wraps the agent, watches the files it changes, makes files another agent has claimed read-only, sets aside a change made anyway, and writes incoming messages to a file the agent is told to read. Add written instructions in AGENTS.md on top. This is weaker than a native hook, which can refuse a command before it runs, but it covers Aider, OpenCode, Amp, Cline or any terminal agent. This guide explains the three layers, what a supervisor can and cannot do, and how forkit run implements it.
The problem: no hook, no place to intervene
A hook is a command the agent itself calls before and after each tool use. Claude Code, Codex, Cursor, Copilot, Gemini CLI and Devin have them (compared in coding agent hooks compared). Other agents do not, or not in a form a coordination tool writes today:
- Aider has no lifecycle events. Its options page offers external commands only, such as
--notifications-command("Specify a command to run for notifications instead of the terminal bell"),--lint-cmdand--test-cmd. - OpenCode, Amp and Cline extend through plugin systems with their own APIs; Antigravity CLI uses its own
hooks.jsonformat. A coordination tool needs an adapter for each. - Your own scripts around a model API have whatever you built.
Without a hook there is no moment where you can say "not that file" before the edit happens, and no channel to hand the agent a message while it works.
Three layers to coordinate multiple coding agents
| Layer | What it can enforce | Works with |
|---|---|---|
| Native hooks | Refuse a tool call before it runs; inject text after a tool; hold the end of a turn; answer permission prompts | Agents that have hooks |
| A supervisor process | Watch and report changes; make files read-only; undo a forbidden change; deliver messages through a file; stop the agent | Any agent that edits files in a checkout |
Instructions (AGENTS.md) |
Nothing; the agent may follow them | Any agent that reads the file |
Use the strongest layer the agent supports, and the weaker ones as well. An agent with hooks still benefits from instructions; an agent without hooks needs both of the lower layers.
What a supervisor can do
A supervisor starts the agent as a child process and works on the checkout around it.
- Report changed files every couple of seconds, so people and other agents see what this one is touching.
- Protect claimed files by making files under another agent's exclusive claim read-only. Most agents report a permission error and move on.
- Set aside a forbidden change. Some editors save by writing a new file and renaming it over the old one, which defeats read-only bits. The supervisor notices, moves the changed file aside, restores the original and tells the agent.
- Deliver messages by writing them to a file in the checkout that the agent has been told to read.
- Stop the agent when its run is stopped, by ending the process.
- Check the merge when the agent exits, and run a command if it conflicts.
What it cannot do
Be clear about the limits before you rely on it:
- It cannot refuse a command before it runs. A
git push --forceor aDROP TABLEin a shell happens; the supervisor only sees the result in the files, if any. - It cannot answer a permission prompt. The agent's own prompt appears in its terminal.
- It cannot steer mid-turn. A message in a file reaches the agent only when the agent reads that file.
- It sees files, not intent. It knows
src/router.tschanged, not why.
For an agent touching production, secrets or money, these gaps matter. Prefer an agent with hooks for that work, or run it in a sandbox where the dangerous commands cannot reach anything.
forkit run: a supervisor for any agent
Forkit's supervisor shipped on 26 Nov 2026. You put forkit run -- in front of the agent's command:
forkit run --title "aider: search ranking" -- aider --model sonnet src/search/
forkit run -- opencode
forkit run --on-conflict ./resolve.sh -- amp
While the agent runs:
- Changed files are reported every
FORKIT_WATCH_MSmilliseconds (default 2000) to the session's thread. For a fan-out agent, its live diff is sent to the fan-out page. - Claimed files (another agent's exclusive claim) are made read-only in the checkout. A change made anyway is moved to
.git/forkit/blocked/, the file is put back, and the agent is told. Files over 2 MB are only reported. - Messages from other agents and replies from people are written to
.forkit/inbox.md, which is excluded from git through.git/info/exclude. The supervisor checks for new ones everyFORKIT_RUN_POLLseconds (default 10). - Stopping: that same check notices when the agent's fan-out has been stopped (by a person, a budget or a time limit), and the agent is killed.
- On exit, a fan-out agent's change goes through the merge check, with the same wait for peers as the Stop hook. If it conflicts,
--on-conflict CMDruns with the reason inFORKIT_REASON. A conflict left unresolved makesforkit runexit 3, so a script can tell.
Commands the agent (or you) can run
Agents without hooks can still act through ordinary shell commands:
forkit claim 'src/search/**' --ttl 3600 --reason "ranking rewrite" # exit 1 if a path is taken
forkit release
forkit message --to claude-code -m "I changed the ranking API; scores are now 0-1"
forkit message --to planner -m "Do we keep the old endpoint?" --question
forkit messages --wait 60 # prints only what is new
Most agents can run shell commands, so telling them to use these is enough.
The AGENTS.md block
forkit init --project keeps a marked block in the repository's AGENTS.md (between <!-- forkit:start --> markers) that tells any agent to claim files before editing, read .forkit/inbox.md, share patches, check the merge, ask when unsure, and release its claims. You can edit around the block; Forkit only rewrites what is inside the markers.
This is the weakest layer and the cheapest. It costs nothing, and agents that read AGENTS.md usually follow it.
A worked setup: Aider next to Claude Code
- Split the work: Claude Code takes
src/billing/, Aider takessrc/search/. - Claude Code connects through its hooks (
npx forkit-cli init). - Start Aider under the supervisor in its own worktree:
git worktree add ../app-search -b aider/search cd ../app-search forkit claim 'src/search/**' forkit run -- aider src/search/ - When Claude Code claims
src/shared/types.ts, that file becomes read-only in Aider's checkout. If Aider rewrites it anyway, the change lands in.git/forkit/blocked/and the file is restored. - Claude Code sends a question with the new type shape; it appears in
.forkit/inbox.md; Aider, told to read it, picks it up on its next look.
Practical advice from others running many agents
Coordination is not only file locks. Flavio Copes's guide to parallel agents warns that agents can edit separate files without a single git conflict and still contradict each other, and recommends one owner for each shared decision. Augment's guide recommends a single writer for shared hotspot files such as routes, registries and configs. Both apply whether or not an agent has hooks. Agent-to-agent messaging patterns covers how to keep those decisions in one place.
Limits, stated plainly
forkit runand its commands are new (26 Nov 2026). They were tested with scenarios, not run against each agent named here.- Read-only files depend on the agent respecting file permissions; most do, an agent running as root may not.
.forkit/inbox.mdworks only if the agent reads it. Put the instruction in the prompt as well as inAGENTS.md.- None of this answers permission prompts. That needs a hook such as Claude Code's
PermissionRequest.
If every agent on your team has hooks, you do not need the supervisor at all; see file locking for AI agents and how to run Claude Code in parallel.
Forkit has a Free plan; Pro is $20 a month and Team $40 per seat a month, billed per person, never per agent. More at forkit-mcp.com.
Sources
Read on 27 Nov 2026:
- Aider, Options reference: https://aider.chat/docs/config/options.html
- Flavio Copes, parallel agents: https://flaviocopes.com/parallel-agents/
- Augment Code, "How to Run a Multi-Agent Coding Workspace (2026)": https://www.augmentcode.com/guides/how-to-run-a-multi-agent-coding-workspace