anomalyco / anomalyco/opencode
[FEATURE]: Evaluate subagent as an opt-in Code Mode plugin tool
@neriousy is already working on this.
Since Sep 2, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Feature hasn't been suggested before.
- I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
Evaluate subagent as an opt-in Code Mode tool through the plugin API.
This is a narrow follow-up to #43137, where built-in Code Mode exposure was intentionally left plugin-first until there are more evals. It is not a request to enable every built-in tool or add a second workflow scheduler.
The experiment should adapt the existing SubagentTool execution path so Code Mode can compose independent child calls, including Promise.all, while preserving its existing permissions, parent/child session links, depth limits, cancellation, and logging.
A useful first contract would be:
const results = await Promise.all([
tools.subagent({ agent: "explore", description: "trace auth flow", prompt: "..." }),
tools.subagent({ agent: "explore", description: "inspect tests", prompt: "..." }),
])
return results.map(({ sessionID, status, summary }) => ({
sessionID,
status,
summary,
}))
Acceptance/evaluation cases:
- independent calls actually overlap, subject to the existing Code Mode concurrency cap;
- each result includes a durable child session ID and explicit terminal status;
- one child failure is visible and does not erase successful siblings;
- aborting the parent cancels in-flight children through the existing lifecycle;
- child output is returned as a bounded structured result rather than dumping full transcripts into parent context;
- nested subagent delegation remains blocked by the existing depth/permission policy;
- direct
subagentbehavior is unchanged when the plugin is disabled.
This follows the current architecture: Code Mode composes typed tool calls; the existing session/job runtime remains responsible for agent lifecycle. It should also help determine which public session/job capabilities in #34957 are actually required before considering any default native exposure.
Context: https://x.com/thdxr/status/2094828159308878216 and https://x.com/thdxr/status/2094831285986312589
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.