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.
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
Expected behavior
The footer should show:
Benefits
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.