Repository navigation
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
feat: rework entirely how subagents work #885
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
feat: rework entirely how subagents work #885
Changes from 1 commit
9166cafa1ec9e15bc00150b1a262File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
…CP server Agents get orx's own MCP server, `orx mcp-gate`, beside alphaXiv's on every harness that takes one: Claude via --mcp-config, Codex through its thread config, OpenCode through its config, and ACP agents in session/new, load and resume (stdio, which ACP requires every agent to accept). Beside Claude's `approve`, it relays orchestration tools to `orx up` at /api/internal/mcp, which authenticates the chat by a token derived from a per-process key. Claude loads the server's tools upfront rather than behind tool search, and Codex and OpenCode give it a tool timeout past the longest `wait`. - models: versioned models, the routes that run them in default order (vendor harness, OpenCode Go, OpenCode, direct APIs, other harnesses, aggregators) and the effort levels the first route takes. Routes join on a canonical id; Claude aliases join through the catalog's resolvedModel, and ACP agents are named by a slug of their name. - delegate: a chat on the resolved route and effort, a side chat in the caller's worktree or (`worktree: own`) a chat with its own, with a permission mode no broader than the caller's. chat_delegates records who delegated, which is how depth is counted; a retry with the same clientRequestId finds the first chat by an id derived from it. The caller subscribes, unless `notify: false`, which starts a chat that is no delegate: the caller's side chat, or with `worktree: own` a chat of its own, as a delegate the user kept. canDelegate decides whether the delegate may delegate in turn; it defaults to a new setting, off, and each delegate is told its depth. - subscribe, unsubscribe, wait: any chat can subscribe to any other. A subscription tells each finished turn, and each question the target asks, as the first message of the subscriber's next turn, through the same leased, idle-only loop as run wake-ups, batched into one turn per subscriber with each piece kept in the transcript as its own message. A turn that ends asking, or while the target's own delegates work, is not its answer; answers a later turn overtook ride along with its news. `wait` collects the same news inside a turn and marks it told as it returns it, so it never arrives twice. - answer: answers a forwarded question through the dashboard's own prompt path, and the card shows which chat answered. Approvals, OpenCode's plan exit included, stay with the user. - status, read, send, cancel: read any chat; message a delegate, or any chat with no broader permissions; stop a delegate and every delegate below it. Run wake-ups now go through the same delivery as subscriptions, so a chat hears every run and chat that finished in one turn instead of one turn per run, and the second wake-up loop is gone. `orx agent spawn` is removed: `delegate` with `notify: false` and `worktree: own` opens an independent chat on any model, and the orx-agent-delegation skill now teaches the MCP tools. Transcripts that used spawn still render its card. Each user message reaches its agent tagged with a ref, the start of its id (msg_3fa9c1d2), which no colour or longer id can be mistaken for. A ref in a task or message expands, for the receiving agent only, to the cited message as a quote with its author, chat and attachments, so a delegate reads the user's own words; one that cites nothing stays as written. Everything orx or another agent writes into a chat (a task, a `send`, news) reaches its agent opening with `[orx]`, and its part in the transcript records its kind and sender (`orx: {kind, from, status}`) beside the words the sender wrote, through new turns, steering and the queue alike. The dashboard reads that rather than the text: a collapsed card on the left whose sender opens that chat and whose first line opens the whole message, and for a run, its experiment, outcome and how long it ran in green, red or amber, opening its logs. In chat, a ref is an inline pill with the cited message's first words and its author's icon (the agent's provider for an agent's message) that opens that chat at the message, and a chat id is a link named after the chat. A side chat's or delegate's opening context names the chat it came from, so `send` back needs no lookup. Native sub-agent tools are off where the server is present (Claude Agent/Task/Workflow, Codex multi_agent, OpenCode task), and Claude delegates get the subagent prompt-cache TTL instead of the main conversation's 1h. A side chat's worktree owner is now the top of its chain, since delegates nest. The dashboard shows delegates as a lineage rather than side chats: the session JSON carries each delegate's parent, depth, latest turn state, what it waits on and a preview of its answer or failure; the side chat menu leaves delegates out; the workspace pane lists active sub-agents (nested ones indented, ones waiting on an answer marked) with finished ones folded behind a count; and each delegate gets a card in the transcript under the turn that started it. Once the user writes in a delegate, a bell in its composer lets them keep it: it stops notifying the parent agent and becomes that chat's side chat (or a chat of its own, with its own worktree). Side chats have no bell; their agent `send`s when asked. Side chat tooltips in the workspace pane open beside the row instead of over the menu. Assisted-by: claude-opus-5.5Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.