
Security News
GitHub Actions Adds cache-mode to Limit Cache Poisoning Risk
GitHub Actions now supports cache-mode, a least-privilege control on the Actions cache aimed at the cache poisoning technique behind recent compromises.
opencode-agent-tree
Advanced tools
Force opencode to act as an orchestrator: every task is decomposed and delegated to subagents, with user-configurable models per agent.
An opencode plugin that turns the model into an orchestrator: every request is decomposed into subtasks and delegated to subagents via the task tool, never done by the orchestrator itself. You decide which model powers the subagents and which powers the orchestrator.
general, explore) and any user-defined agents.Two independent enforcement layers:
permission config is set to deny for hands-on tools (edit, bash by default). The model physically cannot do the work itself.If a model ever ignores the directive, layer 2 still makes it delegate: the tools it would need to do the work directly are denied.
This is the exact prompt injected into the orchestrator agent's system prompt (as configured in src/index.ts, orchestratorDirective):
# Orchestrator Mode (enforced by opencode-agent-tree)
You are the ORCHESTRATOR. You do not do hands-on work. You plan, decompose, delegate, and review.
## Non-negotiable rules
1. Treat every user request as a project: break it into discrete, independently verifiable subtasks before touching anything.
2. Delegate EVERY subtask with the `task` tool to a subagent. Never perform implementation work yourself.
3. You only: plan, write subtask briefs, dispatch agents, review their reports, and summarize results for the user.
4. Dispatch independent subtasks in parallel (multiple `task` calls in a single message). Never run dependent subtasks concurrently — wait for each result before dispatching the next.
5. Give each subagent a complete, self-contained brief: goal, constraints, files involved, verification steps, and exactly what to report back.
6. Review every subagent report. If work is incomplete or wrong, delegate the fix to a subagent — never fix it yourself.
7. Reuse a running subagent via its task_id when follow-up work belongs to the same context.
8. Keep the user informed: report what was delegated to whom, the results, blockers, and the final state.
## Tool discipline
- `task` for all work (mandatory), `todowrite` to track subtasks, `question` only to clarify genuinely ambiguous requests.
- `read`/`glob`/`grep`/`webfetch`/`websearch` only when needed to write a better brief or verify a result.
- Hands-on tools are hard-blocked for you (blockedTools joined, "edit, bash" by default). If a subagent lacks a tool it needs, tell the user instead of doing it yourself.
## Default delegation
- `explore` — codebase research, locating code, understanding existing implementations.
- `general` — implementation, refactoring, testing, and any task without a more specific subagent.
- Prefer the most specialized subagent for each subtask; fall back to `general`.
Two placeholders are substituted at runtime:
| Placeholder | Value |
|---|---|
blockedTools list | The blockedTools option joined with , (default: edit, bash) |
instructions | The instructions option, appended verbatim at the end |
As a local plugin (clone this repo, or point at your own copy):
{
"$schema": "https://opencode.ai/config.json",
"plugin": [
[
"./path/to/src/index.ts",
{ "subagentModel": "anthropic/claude-sonnet-4-6" }
]
]
}
From npm:
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-agent-tree", { "subagentModel": "anthropic/claude-sonnet-4-6" }]
}
Config is loaded at startup. Restart opencode after adding the plugin.
| Option | Type | Default | Description |
|---|---|---|---|
subagentModel | string | required | Model for all delegated work, e.g. "anthropic/claude-sonnet-4-6". Agents with an explicit model in opencode.json are never overridden. |
orchestratorModel | string | agent model, else model | Model for the orchestrator itself. |
orchestratorAgent | string | "build" | Which agent acts as the orchestrator. |
agents | string[] | all subagent/all-mode agents | Only these agents get subagentModel. |
agentModels | Record<string,string> | {} | Per-agent overrides, wins over subagentModel. |
instructions | string | — | Extra rules appended to the orchestrator system prompt. |
blockedTools | string[] | ["edit", "bash"] | Tools hard-denied to the orchestrator. [] = prompt-only enforcement. |
{
"$schema": "https://opencode.ai/config.json",
"plugin": [
[
"opencode-agent-tree",
{
"subagentModel": "anthropic/claude-sonnet-4-6",
"orchestratorModel": "anthropic/claude-opus-4-5",
"agentModels": { "explore": "anthropic/claude-haiku-4-5" },
"instructions": "Never delegate more than 3 subtasks at once."
}
]
]
}
plan agent or another primary anytime.general, explore) and every user-defined subagent/all-mode agent are routed to subagentModel; agents with an explicit model in opencode.json are respected.npm install
npm run typecheck
The plugin is a single config hook (src/index.ts): it mutates the merged opencode config at startup — routing subagent models, denying the orchestrator's hands-on tools, and installing the directive prompt. To verify against a live opencode, run from this repo (its opencode.json is pre-wired) and watch for the startup log line:
Orchestrator "build" enabled; subagents -> <subagentModel>
npm login
npm publish
The package ships raw TypeScript (main: src/index.ts) — opencode loads plugins with Bun, no build step needed. Before publishing, fill in repository and author in package.json (see Contributing).
MIT — see LICENSE.
FAQs
Force opencode to act as an orchestrator: every task is decomposed and delegated to subagents, with user-configurable models per agent.
We found that opencode-agent-tree demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Security News
GitHub Actions now supports cache-mode, a least-privilege control on the Actions cache aimed at the cache poisoning technique behind recent compromises.

Company News
Allow myself to introduce... myself.

Research
/Security News
A Twitch browser extension on Chrome and Firefox forwards users’ live OAuth session tokens through proxies controlled by a Russian bot service.