General-purpose OpenCode plugin and CLI for dispatching agents across local repositories.
It provides:
- repo registry management
- repo-local agent listing
- child-agent dispatch to another repository
- child-session status lookup
- parallel repo-agent dispatch
- persistent dispatch jobs with status, wait, list, and cancel flows
- TUI-friendly tool output for OpenCode sessions
npm install opencode-repo-agent-dispatchFor local development:
npm install ../opencode-repo-agent-dispatchAdd the plugin to your opencode.json and provide a repo registry.
{
"$schema": "https://opencode.ai/config.json",
"plugin": [
[
"opencode-repo-agent-dispatch/plugin",
{
"baseDirectory": "/Users/name/Projects",
"repos": {
"infra-talos-mgmt": {
"path": "infra-talos-mgmt",
"defaultAgent": "talos-mgmt"
},
"platform-kubernetes-omni": {
"path": "platform-kubernetes-omni",
"defaultAgent": "platform-omni"
}
}
}
]
]
}baseDirectory is optional. Relative repo paths resolve from baseDirectory when set, otherwise from the current OpenCode project directory.
repo_agent_listrepo_agent_dispatchrepo_agent_statusrepo_agent_dispatch_parallelrepo_agent_dispatch_startrepo_agent_dispatch_statusrepo_agent_dispatch_listrepo_agent_dispatch_waitrepo_agent_dispatch_watchrepo_agent_dispatch_cancel
opencode-repo-agent-dispatch list --config ./repo-dispatch.config.json
opencode-repo-agent-dispatch run \
--config ./repo-dispatch.config.json \
--repo infra-talos-mgmt \
--agent talos-mgmt \
--message "Reply with exactly OK and nothing else."
opencode-repo-agent-dispatch status \
--config ./repo-dispatch.config.json \
--session-id ses_abc123Parallel dispatch:
opencode-repo-agent-dispatch parallel \
--config ./repo-dispatch.config.json \
--tasks-file ./tasks.jsonPersistent harness job flow:
opencode-repo-agent-dispatch job-start \
--config ./repo-dispatch.config.json \
--tasks-file ./tasks.json \
--concurrency 2
opencode-repo-agent-dispatch job-status \
--config ./repo-dispatch.config.json \
--job-id <job-id>
opencode-repo-agent-dispatch job-wait \
--config ./repo-dispatch.config.json \
--job-id <job-id> \
--poll-interval-ms 1000 \
--timeout-ms 60000
opencode-repo-agent-dispatch job-watch \
--config ./repo-dispatch.config.json \
--job-id <job-id> \
--poll-interval-ms 1000 \
--timeout-ms 15000
opencode-repo-agent-dispatch job-cancel \
--config ./repo-dispatch.config.json \
--job-id <job-id>- persistent harness job state is stored under
~/.local/share/opencode-repo-agent-dispatch/ - each job gets its own directory with
job.jsonandworker.log - the harness is designed for long-running multi-repo dispatch flows where one tool call should not have to do all orchestration inline
The CLI accepts a JSON config file:
{
"baseDirectory": "/Users/name/Projects",
"repos": {
"infra-talos-mgmt": {
"path": "infra-talos-mgmt",
"defaultAgent": "talos-mgmt"
}
}
}- CI runs on push and pull request.
- Tag pushes like
v0.2.1create a GitHub release. - The release workflow uploads the packaged tarball to the GitHub release.
- npm publishing can be added later once registry credentials are configured.