anomalyco / anomalyco/opencode

tui: sidebar missing when viewing a subagent session — no context usage or cost for that session

Open
#48,548 1 comment 0 reactions 1 assignee View on GitHub

@simonklee is already working on this.

Since Sep 11, 2026.

2.0
Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Summary

When navigating into a subagent (child) session in the opencode2 TUI, the session sidebar is not rendered. Since the Context section lives in the sidebar, there is no way to see the subagent session's own context usage (tokens / percentage) or cost while viewing it. The sidebar only appears for the root session.

Reproduction

  1. In opencode2, run a prompt that spawns a subagent (e.g. the task tool).
  2. Navigate into the child session: down (session.child.first) to open the subagent picker, or right (session.child.next) to go to the next child session.
  3. Observe that the sidebar is missing while viewing the subagent session.
  4. session.sidebar.toggle (<leader>b) does not bring it back in the child session.

Expected Behavior

The sidebar should be available in subagent session views as well, with the Context section showing that session's token usage and cost.

Actual Behavior

The sidebar is absent for child/subagent sessions, so context usage and cost for that specific session cannot be inspected anywhere in the TUI.

Impact

For subagent-heavy workflows, per-subagent context pressure and spend are invisible in the TUI. The parent session's sidebar does not compensate for this (see also #45417 for subagent cost not being aggregated).

Environment

  • opencode2 v0.0.0-beta-19425
  • Linux x86_64
  • npm install (@opencode/cli)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.