An OpenCode TUI plugin. When you open a subagent (child) session, it shows which agent and model that session runs, directly above the composer:
vera-engineer-readonly openai/gpt-5.6-sol#max
Root sessions are left untouched. OpenCode's built-in task cards show the subagent's type and description but not its model; this plugin fills that gap.
Install the npm package:
opencode plugin add @op1/opencode-subagent-model@0.1.3This adds the package to ~/.config/opencode/opencode.jsonc:
Restart the TUI. Open any subagent session to see its agent and model.
The plugin claims the session.composer.top slot. For the session being
viewed, it reads parentID, agent, and model from the synced session data.
If the session has a parent, it renders agent providerID/modelID#variant in
the muted theme color. Sessions without a parent render nothing.
This release targets OpenCode 2.0.3 and pins @opencode/plugin to that version.
Run the typecheck when updating OpenCode dependencies.
npm ci
npm run verify:staticThe static check typechecks the source, compiles the plugin, creates a tarball,
and checks that every export contains valid JavaScript. Artifacts go under
.artifacts/. It requires Node.js and Bun and does not connect to OpenCode.
The package ships compiled dist/index.js and dist/tui.js. The build uses
OpenTUI's Solid transform so installation does not depend on the host compiling
TSX inside node_modules.
With the npm package installed, run:
npm run verify:liveThe live check requires Python 3, a running OpenCode service, and an existing child session. It checks the active package version, opens a TUI, and verifies the displayed agent/model label. It does not send a prompt. To choose a session:
npm run verify:live -- --session ses_exampleBefore publishing, use the packed plugin directory printed by verify:static
as the plugin entry in your global config, then run:
npm run verify:live -- --packedAfter publishing, replace that local entry with the npm package and rerun
npm run verify:live. The terminal capture is saved to .artifacts/verify-live.txt.
- Run
npm run verify:staticand the packed live check. - Publish the resulting
.artifacts/*.tgzwithnpm publish <tarball> --access public. - Install the published version and run
npm run verify:live.
{ "$schema": "https://opencode.ai/config.json", "plugins": ["@op1/opencode-subagent-model@0.1.3"] }