About this project
OpenCode SubAgent Magazine is a plugin for the OpenCode TUI designed to provide real-time subagent monitoring and sidebar visualization. It loads and fires subagent information like a magazine, helping users intuitively track key data for each subagent, including running status, token consumption, cost, duration, model and progress.
The plugin's main features include:
- **Real-time status display**: Shows each subagent's status at a glance via colored dots (green for completed, yellow for running with a breathing animation, red for error).
- **Token and cost tracking**: Aggregates each subagent's token consumption and cost, and displays them globally in the title bar.
- **Expandable details**: Clicking an entry expands it to show detailed information such as agent type, status, duration, tokens, cost, model and progress, with field values right-aligned for easier reading.
- **One-click session entry**: After expanding, click "→ Enter Session" to jump directly to that subagent's full conversation.
- **Session ID display**: The expanded details show the subagent's Session ID; click it to open a popup with the full ID and copy it.
- **Manual completion marking**: For stuck zombie entries, you can manually terminate them via the "- Mark Complete" button on the right side of the expanded area, or use `/subagent-clear-running` to clean them up in bulk.
- **Collapsible panel**: Click the title bar to collapse/expand the panel; the state persists across restarts.
- **Scroll to top/bottom**: The bottom of the list provides "↑ Top" and "↓ Bottom" buttons, with direction adapting to the sort order.
- **Configurable sorting**: Via `/subagent-order`, supports descending (newest first) or ascending (oldest first) order.
- **Pagination mode switching**: `/subagent-scroll` lets you choose "wheel paging" or "click more to page", resolving conflicts between the sidebar and global scrolling.
- **TTL auto-cleanup**: Configurable data retention period (3/7/14/30 days or unlimited), automatically renewed on each access and cleared when expired.
- **Manual entry clearing**: `/subagent-clear-entries` clears all records in the current session to prevent historical entries from being rebuilt by scanning.
- **Language adaptation**: Supports runtime switching between Chinese/English via `/subagent-lang`, with the preference persisted.
- **Toggleable border**: `/subagent-border` controls the visibility of the panel's outer border (hidden by default); when enabled, it matches the style of the cache statistics panel.
- **Slash commands**: Provides dynamic configuration commands such as `/subagent-lang`, `/subagent-max`, `/subagent-order`, `/subagent-scroll`, `/subagent-ttl`, `/subagent-clear-entries`, `/subagent-session`, `/subagent-version`, `/subagent-clear-running`, `/subagent-border`, etc.
For installation, the plugin supports both opencode 1.x and 2.x. For 2.x, you need to add an entry to the `plugins` array in `~/.config/opencode/cli.json`; for 1.x, you can install it via the command palette or manually configure `tui.jsonc`. Note that you should not use `opencode plugin add` to install it, because that command writes to the server plugin configuration and causes errors.
The usage guide explains in detail the slash command usage, keyboard and mouse operations (such as clicking the title bar to collapse, clicking an entry to expand, wheel paging, etc.), and the meaning of status colors. When updating, you need to clear the plugin cache and reinstall, because a known issue in OpenCode causes the plugin version to be locked.
The plugin is completely model-agnostic and supports all OpenCode-compatible AI models (such as DeepSeek, Claude, GPT, etc.); data is obtained through the standard OpenCode SDK interfaces. It is licensed under MIT.
Comments
0 Rating appears after 10 ratings
Sign in to join the discussion.