mini TUI: show live activity while thinking, using tools, or waiting on task child sessions

未关闭
#65,343 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
25/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
typescript
领域
cli

调研方向

Start from the opencode mini TUI's footer/status-bar rendering and the session-status source it reads, then trace how a task child session (ses_…) is recorded so the parent pane can see descendant status. Confirm the scope with a maintainer first: the issue bundles phase display, an inline tool ticker, a subagents strip, and child-session navigation, and overlaps #65057 and #57097. Done looks like a opencode mini --agent orchestrator run showing a phase (thinking/tool:<name>/task:<agent>), a tool line, and the child session id while a task runs.

由索引模型根据 Issue 内容生成。

描述

area/tui platform/macos type/feature version/v2

Summary

In opencode mini (terminal TUI, often embedded in cmux), the parent session frequently shows no visible progress for long stretches: prompt + block cursor, status bar only (agent + model + context %). Users cannot tell whether the model is thinking, calling a tool, or waiting on a task child session that runs elsewhere.

This is especially painful for orchestrator → Task → specialist flows (e.g. developer), where the parent is intentionally quiet but the UI offers no phase indicator, no inline tool ticker, and no link to the active child ses_….

Related issues (overlap, not duplicate):

  • #65057 — parent session looks idle while subagent still running (desktop)
  • #57097 — bring subagents back to session sidebar (TUI + desktop)
  • #6191 — subagent session not in sidebar (historical)

Environment

  • OpenCode: 2.3.x (opencode mini)
  • Host: cmux 0.65.x (Ghostty surface) on macOS
  • Pattern: custom orchestrator agent with task allow-list for developer, code-reviewer, etc.

Expected behavior

While a turn is active, mini should always expose something observable:

  1. Phase in the status/footer: thinking | tool:<name> | task:<agent> | waiting_permission | idle
  2. Inline tool activity (compact cards or one-line ticker), including when the parent is waiting on a child
  3. When task spawns a child: show child session id (ses_…) with a keybind or hint to open/list (opencode session list / switch session)
  4. Elapsed time since last event (helps distinguish slow model vs wedged permission ask)

Optional: mirror last N tool events from child into parent as read-only feed (collapsed).

Actual behavior

  • Long gaps with no streamed output and no tool lines (large context makes “time to first token” long).
  • Footer shows parent agent name only, not the active subagent or tool.
  • After task, work continues in a child session with no parent-pane visibility; users assume the session is stuck.
  • Permission prompts on subagents can wedge headless terminals with no obvious UI.

Reproduction

  1. Configure a primary agent with task allowed for a subagent (e.g. developer).
  2. opencode mini --agent orchestrator in a terminal-only surface (cmux or plain).
  3. Ask for work that delegates via task (or resume with a large context thread).
  4. Observe: parent pane static for minutes; child may be running in another session.

Proposed direction (OpenCode-owned)

Prioritize mini first (cmux and plain SSH), reuse session/subagent data already in the local DB:

  • Status bar phase driven by session + descendant status (not only parent idle)
  • Subagents strip in mini (may share implementation with #57097)
  • Stream tool_start / tool_end to TUI even before assistant text tokens

Additional context

Downstream users work around this with opencode session list, second-pane log tailing, or avoiding task for tool-heavy work (build single thread). A first-class mini indicator would remove the need for those hacks.

Happy to test nightlies or a TUI plugin hook if there is an interim API.

主要语言
TypeScript
星标
227k
派生
30.7k
平均合并
3 小时 57 分钟
30 天内合并 PR
484

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

anomalyco/opencode 的其他 Issue

查看 anomalyco/opencode 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。