opencode-subagent-completion-hookSubagent completion plugin for OpenCode which allows to execute arbitrary command on completion
0
23
5 in 7 days
23.1
Multi-signal model
3 months ago
2026-05-08
Install and configure
opencode.jsonWrites to this project's opencode.json — applies to this repository only.
opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-subagent-completion-hook@0.2.0"]
}Writes to ~/.config/opencode/opencode.json — applies to every project.
~/.config/opencode/opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-subagent-completion-hook@0.2.0"]
}If you want to modify the plugin locally, install it into the project and reference the local path.
shell
pnpm add -D opencode-subagent-completion-hookopencode loads npm dependencies through its embedded runtime on startup and caches them locally — no manual global install needed.
An OpenCode plugin that runs an arbitrary shell command whenever a subagent completes.
Installation
Add the plugin to your opencode.jsonc:
{
"plugin": [
"opencode-subagent-completion-hook"
]
}
Usage
Add an on_complete option to an agent's frontmatter:
---
name: my-agent
options:
on_complete: my-post-process-script
---
When the agent finishes, the plugin pipes the agent's output to the command via stdin and replaces the output with the command's stdout.
License
MIT