@doingdev/opencode-claude-manager-plugin
v0.1.64
Published
OpenCode plugin that orchestrates Claude Code sessions.
Maintainers
Readme
OpenCode Claude Manager Plugin
This package provides an OpenCode plugin that lets an OpenCode-side agent hierarchy orchestrate Claude Code sessions through a stable local bridge.
Overview
Use this when you want OpenCode to act like a real technical lead over Claude Code instead of being a thin relay. The plugin gives you a CTO agent that can ask better questions, explicitly assign named engineers, reuse each engineer's Claude session for continuity, preserve wrapper-level engineer memory, compare multiple plans, and keep git/review work at the manager layer.
Features
- Runs Claude Code tasks from OpenCode through
@anthropic-ai/claude-agent-sdk. - Creates a persistent named team:
Tom,John,Maya,Sara, andAlex. - Reuses one Claude Code session per engineer within the active CTO team.
- Reloads prior engineer wrapper context so each named subagent can prompt Claude better over time.
- Uses named engineer subagents for live delegated work while keeping both wrapper memory and Claude session continuity underneath.
- Keeps session babysitting out of the normal user flow — no public reset/fresh-session controls.
- Discovers repo-local Claude metadata from
.claude/skills,.claude/commands,CLAUDE.md, and settings hooks. - Git integration: diff, commit, and reset from the manager layer.
- Tool approval policy for governing which Claude Code tools are allowed.
- Persists local team state and transcripts under
.claude-manager/for continuity and inspection.
Requirements
- Node
22+ - OpenCode with plugin loading enabled
- Access to Claude Code / Claude Agent SDK on the machine where OpenCode is running
Installation
Install from the npm registry:
pnpm add @doingdev/opencode-claude-manager-pluginOr for local development in this repo:
pnpm install
pnpm run buildOpenCode Config
Add the plugin to your OpenCode config:
{
"plugin": ["@doingdev/opencode-claude-manager-plugin"]
}If you are testing locally, point OpenCode at the local package or plugin file using your normal local plugin workflow.
OpenCode tools
CTO orchestration
- Use the built-in OpenCode
tasktool to delegate to named engineers:tom,john,maya,sara,alex. team_status— inspect the current CTO team's engineer bindings, Claude session IDs, busy flags, and context snapshots.
Engineer bridge
claude— available only inside named engineer subagents. Sends work through that engineer's persistent Claude Code session.mode(required) —explore,implement, orverify.message(required) — the work to do.model(optional) —claude-opus-4-6orclaude-sonnet-4-6.
Git operations
git_diff— review all uncommitted changes (staged + unstaged).git_commit— stage all changes and commit with a message.git_reset— hard reset + clean (destructive).
Inspection
list_transcripts— list available session transcripts or inspect a specific transcript by ID.list_history— list saved CTO teams for the worktree or inspect one team by ID.
Tool approval
approval_policy— view the current tool approval policy.approval_decisions— view recent tool approval decisions.approval_update— add/remove rules, enable/disable approval, or clear decision history. Policy uses a deny-list: tools not matching any rule are allowed; use explicit deny rules to block.defaultActionis alwaysallow(cannot be set to deny).
Agent hierarchy
The plugin registers a CTO + named engineer team through the OpenCode plugin config hook:
cto(primary agent) — owns the outcome, finds missing requirements, spawns named engineers with the Task tool, compares plans, reviews diffs, and manages git.tom,john,maya,sara,alex(subagents) — thin named engineer wrappers. Each uses theclaudetool and keeps one persistent Claude Code session.team-planner(subagent) — thin planning wrapper that runsplan_with_teamso the UI shows live planning activity.- Claude Code sessions — the underlying execution layer. One session per engineer inside the active team.
These are added to OpenCode config at runtime by the plugin, so they do not require separate manual opencode.json entries.
Quick Start
Typical flow inside OpenCode:
- Ask the
ctoagent for the work. - Let
ctoinvestigate lightly, then spawn one or more named engineers with the Task tool. - Review changes with
git_diff, then commit or reset. - Inspect saved Claude history with
list_transcriptsor saved team state withlist_history/team_status.
Example tasks:
Ask CTO to send Tom to implement the new validation logic in src/auth.ts, then review with git_diff.For a larger feature where you want investigation first and then a stronger combined plan:
Ask CTO to inspect the billing feature scope, then use team-planner to run two independent investigations and synthesize the best implementation plan.Local Development
Clone the repo and run:
pnpm install
pnpm run lint
pnpm run typecheck
pnpm run test
pnpm run buildThe compiled plugin output is written to dist/.
Publishing
This package is configured for the npm scope @doingdev.
This repository uses npm trusted publishing with GitHub Actions OIDC, so you do not need an NPM_TOKEN secret once npm is configured correctly.
Before the first automated publish, configure npm trusted publishing for @doingdev/opencode-claude-manager-plugin on npmjs.com:
- Open the package settings on npmjs.com.
- Go to the
Trusted Publishersection. - Choose
GitHub Actions. - Set the GitHub owner/user to your account or org.
- Set the repository name.
- Set the workflow filename to
publish.yml. - Leave the environment name empty unless you later add a GitHub Actions environment back to the workflow.
Notes for trusted publishing:
- npm trusted publishing requires GitHub-hosted runners.
- npm recommends Node
22.14.0+with npm CLI11.5.1+; the workflows use Node24. - Provenance is generated automatically by npm for trusted publishes from public GitHub repositories.
Release flow:
pnpm login
pnpm whoami
pnpm version patch
pnpm run lint
pnpm run typecheck
pnpm run test
pnpm run buildThen publish from GitHub by either:
- creating a GitHub Release, or
- running the
Publishworkflow manually from the Actions tab
After trusted publishing is working, you can tighten npm package security by disabling token-based publishing for the package in npm settings.
Limitations
- Claude slash commands and skills come primarily from filesystem discovery; SDK probing is available but optional.
- Session state is local to the repo under
.claude-manager/and is ignored by git. - The strongest team continuity comes when engineers are spawned from the active
ctosession; the plugin maps named engineers back to that active team automatically. - Context tracking is heuristic-based; actual SDK context usage may differ slightly.
Scripts
pnpm run buildpnpm run typecheckpnpm run lintpnpm run formatpnpm run test
