Skip to content

[BUG] Questions from nested sub-agents don't appear in TUI #7654

@mortimr

Description

@mortimr

Description

When using sub-agents that spawn other agents (e.g., via background_task), questions from deeply nested agents never appear in the main session's TUI. The user has no way to answer them, causing the agents to hang.

Root cause: The TUI only looks at direct children sessions when collecting questions, missing grandchildren and deeper descendants.

Additional improvements needed:

  • Add from parameter so users know which agent is asking
  • Improve multi-select UX (checkboxes, better keybindings)
  • Better answer display in chat (table layout, word wrap)

Plugins

ohmyopencode

OpenCode version

1.1.11

Steps to reproduce

  1. Use this prompt:
Do the following:
- spawn one subagent
- from this subagent spawn 3 background_task and give them a name (one, two and three)
- in each background_task ask 3 questions (ask if I prefer python or typescript). Include both the background_task name and the question number.
Once all is done, give me a summary of all answers
  1. Observe that no question prompts appear in the TUI
  2. The question tool silently fails and agents move forward without answers.

(It was done using ohmyopencode which often ends up spawning agents that spawn other agents via the background_task tool)

Screenshot and/or share link

No response

Operating System

macOS

Terminal

Ghostty

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingopentuiThis relates to changes in v1.0, now that opencode uses opentui

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions