opencode-plugin-nanny is a small opencode TUI plugin that shows delegated subagent status in the TUI sidebar and lets you retry stalled subagents.
- Adds a
Sub-Agentssection to the right sidebar in the TUI. - Shows the number of discovered subagents as
{active}/{total}. - Displays a spinner while subagents are running.
- Marks running subagents as stale with
!after five minutes without updates. - Sends a retry prompt only to stale subagent sessions with the
<leader>kkey binding.
- opencode
^1.15.0 - Bun
This plugin provides both an opencode server plugin entrypoint and a TUI plugin entrypoint.
opencode.jsonoropencode.jsonc: read by the opencode server plugin loader.tui.json: read by the opencode TUI loader.
The sidebar UI is a TUI plugin, so it must be registered in tui.json. If you only register it in opencode.json, opencode may start, but the Sub-Agents sidebar will not render.
To use the plugin only in one project, place the config files under that project's .opencode/ directory.
.opencode/opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-plugin-nanny"]
}.opencode/tui.json
{
"$schema": "https://opencode.ai/tui.json",
"plugin": ["opencode-plugin-nanny"]
}To use it in every project, add the same entries to your global config files.
~/.config/opencode/opencode.json~/.config/opencode/tui.json
When the same package name is listed in both files, the opencode server loader selects the package's ./server export and the TUI loader selects the ./tui export.
When testing directly from this repository, install dependencies and build first.
bun install
bun run buildTo test inside this repository, point .opencode/tui.json at the built output.
{
"$schema": "https://opencode.ai/tui.json",
"plugin": ["../dist/tui.js"]
}To reference this local checkout from another project, use a relative path from the config file location or an absolute file:// URL.
.opencode/opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["file:///absolute/path/to/opencode-plugin-nanny/dist/index.js"]
}.opencode/tui.json
{
"$schema": "https://opencode.ai/tui.json",
"plugin": ["file:///absolute/path/to/opencode-plugin-nanny/dist/tui.js"]
}- Start the opencode TUI.
- Open a session where you delegated work with the
tasktool. - Check the
Sub-Agentssection in the right sidebar. - When all active subagents have not updated for more than five minutes and
!is shown, press<leader>kto retry only the stale subagents.
The retry command is also registered in the command palette as Retry stale subagents.
bun run build
bun run typecheck
bun run testbun run build: createsdist/index.js,dist/tui.js, and declaration files.bun run typecheck: runs TypeScript type checking.bun run test: runs tests for the subagent status calculation helpers.