npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

opencode-subagent-statusline

v0.6.1

Published

OpenCode plugin that exposes subagent session statusline state

Downloads

5,442

Readme

opencode-subagent-statusline

Subagents Monitor banner

Subagent Monitor for OpenCode.

See what your subagents are doing without losing track of them: running, done, failed, elapsed time, and token/context usage when OpenCode exposes it.

This package works as a TUI sidebar plugin for OpenCode.


Why?

When you delegate work to subagents, they can disappear into the background. That is powerful, but it also makes it easy to lose visibility:

  • Is the review agent still running?
  • Did the test agent finish?
  • Which child session failed?
  • How much context did a subagent use?

opencode-subagent-statusline adds a compact Subagent Monitor inside OpenCode so you can keep that information visible while you work.


Screenshot

Subagent Monitor inside OpenCode

Focused sidebar view:

Subagent Monitor sidebar


Install

Add the plugin to your OpenCode TUI config:

{
  "$schema": "https://opencode.ai/tui.json",
  "plugin": ["opencode-subagent-statusline"]
}

Your TUI config usually lives at:

~/.config/opencode/tui.json

Restart OpenCode after editing the file.


What you get

The TUI plugin adds a sidebar section that shows:

  • running subagents
  • completed subagents
  • failed subagents
  • elapsed time
  • token/context usage when available

It also adds a small home/footer summary when there is active subagent activity.

Keyboard navigation

Run Subagents: Focus sidebar list from the OpenCode command palette, or press Alt+B, to focus the subagent sidebar list without using the mouse. List navigation shortcuts are handled only while the sidebar list is focused.

| Shortcut | Action | | --- | --- | | Alt+B | Toggle focus between the subagent sidebar list and the prompt. | | j / ArrowDown | Move selection to the next visible subagent. | | k / ArrowUp | Move selection to the previous visible subagent. | | Enter | Open the selected subagent session. | | h / ArrowLeft | Collapse the subagent section. | | l / ArrowRight | Expand the subagent section. | | Esc | Leave list focus mode and return to the prompt. |

Opening a selected session is a no-op when there is no visible or navigable subagent.


Local development

Install dependencies:

pnpm install

Build the plugin:

pnpm build

Test the local TUI build by pointing OpenCode directly at dist/tui.js:

{
  "$schema": "https://opencode.ai/tui.json",
  "plugin": [
    "/absolute/path/to/sub-agent-statusline/dist/tui.js"
  ]
}

Development notes

This project ships the OpenCode TUI sidebar plugin from src/tui.tsx.

The TUI bundle is built with tsup and esbuild-plugin-solid in Solid universal mode for OpenTUI compatibility.

Package entrypoints:

opencode-subagent-statusline          -> TUI plugin
opencode-subagent-statusline/tui      -> TUI plugin

Useful commands:

pnpm build
pnpm typecheck
pnpm test
pnpm test:watch
pnpm test:coverage
pnpm pack --dry-run

Testing

Automated tests use Vitest with @vitest/coverage-v8:

pnpm test
pnpm test:watch
pnpm test:coverage
pnpm typecheck

For the testing strategy, file map, examples, and current TUI/e2e boundaries, see docs/testing.md.


Troubleshooting

The plugin does not show up

Check OpenCode logs:

grep -n "subagent-statusline\|failed to load tui plugin" ~/.local/share/opencode/log/*.log

Then restart OpenCode after changing tui.json.

I installed a new version but OpenCode still behaves like the old one

OpenCode may be using a cached package. Try clearing the cached package directory under:

~/.cache/opencode/packages/

Then restart OpenCode.

Token/context usage is missing

OpenCode event payloads can vary by version and by event type. The plugin shows token/context usage when it is available and safely omits it when it is not.


License

MIT