Skip to content

About

OpenCode TUI plugin that shows total cost of the active session plus all subagent (task) sessions in the sidebar, using only OpenCode's own local session data.

Resources

Contributing

Stars

4 stars

Watchers

0 watching

Forks

Repository files navigation

opencode-session-cost

npm version CI License: MIT

OpenCode 2.x includes subagent spend in the session total, but doesn't show how much came from subagents or which subagent cost what.

This plugin adds a collapsible Subagents block to the OpenCode sidebar whenever a session spawns subagents, showing the subagent count, combined subagent spend, and a per-subagent cost breakdown.

Subagents sidebar block showing subagent count, combined spend, and per-subagent breakdown

Click any subagent in the list to open its session details dialog with the agent, model, status, duration, 4-decimal cost, token breakdown, and shortcuts to switch between subagents or jump directly into that subagent's session:

Subagent session details dialog showing agent, model, status, duration, cost, and token breakdown

Install

Requires OpenCode 2.x. Run:

opencode plugin add opencode-session-cost

To update to the latest version:

opencode plugin update opencode-session-cost

Restart the OpenCode TUI and the Subagents section will appear automatically whenever a session uses subagents.

Contributing

Contributions are welcome. See CONTRIBUTING.md for development setup, coding standards, and the pull request process.

License

MIT — see LICENSE.

About

OpenCode TUI plugin that shows total cost of the active session plus all subagent (task) sessions in the sidebar, using only OpenCode's own local session data.

Resources

Contributing

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages