Subagent Gateway

Keep your Claude Code conversation small, see what every agent is doing, and know what it saved.
Every reply re-reads your whole conversation, so every file dump and log you pull in costs you again on each turn. Subagent Gateway hands that reading to read-only Haiku workers, which read in their own context and return a short report. Your conversation stays on the model you chose. A live view shows every running agent, warns when two of them edit the same file, and the savings are counted from real token usage.

Part of Interlace: check what coding agents ship.
Install
At the prompt of a Claude Code terminal session:
/plugin install subagent-gateway --marketplace ofri-peretz/subagent-gateway
Answer y to add the marketplace, then pick a scope. From a shell: claude plugin install subagent-gateway --marketplace ofri-peretz/subagent-gateway.
In the Claude desktop app: click + next to the prompt box, then Plugins, Add marketplace with ofri-peretz/subagent-gateway, then Add plugin.
Restart open sessions after installing or updating: a plugin loads when a session starts.
What it does
Seven read-only workers on Haiku
| Worker | Takes |
|---|
repo-searcher | Finding files, usages and definitions; reports path:line with a short note |
log-reader | Test output, CI and Cypress logs; reports each failing case and its first error line |
test-runner | Running a test command once (Vitest, Jest, Cypress, Newman, npm test…); reports totals and failures |
docs-reader | A docs page or a web search; answers one question with its source |
diff-reader | A git diff, branch or pull request, summarized file by file |
ticket-reader | A Jira ticket or Confluence page, through your Atlassian tools |
mcp-reader | Mail, Slack, analytics and other connected (MCP) tools: only what answers the question |
Claude hands them work when the task matches; while the gateway is on, one line beside each prompt tells it to. You can also ask for one by name ("use the log-reader on this CI log").
Read-only is enforced, not requested. Every tool call a worker makes is checked before it runs:
- Shell workers may run only read commands (
rg, cat, git diff, git log, gh pr view…), with no ;, &&, redirects or $(…). test-runner may also start test commands.
ticket-reader and mcp-reader may only call tools whose action searches, lists, gets or reads. Sending, labeling, editing, running queries that write, clicking or navigating is refused.
A refused call is never run, and a worker that tried one is not counted as a hand-off.
Cheaper models for the built-in agents
Explore runs on Haiku and general-purpose on Sonnet, both at medium effort. A general-purpose task that only looks (find, list, summarize…) and asks for no change runs on Haiku. Forks, teammates and agents that name their own model are left alone.
The Agents view
Click the ⬡ chip, or run /gateway agents. Every agent in the session as a live tree: subagents, the sub-agents they started, and teammates. Each row shows the model, status, run time, new tokens so far, context size, the tool it is running now and the files it edited. /gateway agents login shows only the agents whose task, type or files mention "login".
Collisions. When two running agents edit the same file, or an agent edits a file the main conversation changed after that agent started, both rows get a ⚠, the band's chip counts them, and one toast names the file and both agents. Agents in separate worktrees edit separate paths, so they never collide.
Tips, one of each per prompt
| When | Tip |
|---|
| The main conversation reads 5 files in a row, or one read brings in 8K tokens or more | Names the worker that could have taken it, and counts a missed hand-off |
| Edits with no test, lint, type check or build run since the prompt | Run them before calling it done |
A sleep or a wait loop | Run it in the background and let the notification tell you |
| 3 or more test runs or installs at once | They slow each other: let one finish |
| 6 or more agents running at once | Check each one is needed: they all draw on your usage limit |
The band and the Savings pane
⬡ log-reader ▲ 42s +1 prompt 42K today 180K by gateway · 1.4M by all subagents 5h 62% → out 15:40 Week 49% ⟲ Ctx 41% Savings