anomalyco / anomalyco/opencode
[FEATURE]: Show total cost including subagents in the session footer
Open
@kommander is already working on this.
Since Jul 30, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
The opencode footer currently shows context usage and estimated session cost, but this only reflects the main agent. When an agent invokes subagents (via the Task tool), each subagent runs its own session with its own token consumption and cost — and that spend is not added to the visible total.
Current behavior
- The footer (bottom bar) shows tokens used and cost only for the active main agent.
- Subagents spawn separate child sessions that also consume tokens and have associated costs.
- There is no way in the UI to see the real total cost of the session (main agent + all subagents).
Expected behavior
The footer should show:
- The cumulative total cost: main agent + all invoked subagents.
- Alternatively, at least an indication that the displayed cost is agent-only, with access to per-subagent breakdown.
Benefits
- Real transparency on the full session cost.
- Avoids surprises when checking the provider billing.
- Helps users decide whether to use more or fewer subagents based on their cost impact.
Additional context
This is especially relevant for workflows that heavily use subagents — such as the SDD workflow (sdd-apply, sdd-verify, review-*, etc.) — where a significant portion of the work happens in subagents.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.