Skip to content

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

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

Activity

  1. added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Jan 10, 2026
  2. github-actions commented on Jan 10, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Feel free to ignore if none of these address your specific case.

  3. ro-hansolo commented on Feb 15, 2026

    @ro-hansolo

    The same happens with permissions as well. I referenced it in #13715

    Submitted a fix for this in #13719

  4. fmarquezch commented on Mar 12, 2026

    @fmarquezch

    Hi, @mortimr I faced the same problem and I added a phrase to make it works, in your case, I use this:

    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 if the subagents has questions, use the tool question to make them interactive to me
    

    Adding this:

    if the subagents has questions, use the tool question to make them interactive to me

    And this is the result:

    Image Image Image

    I hope this works for you.

  5. removed
    bugSomething isn't working
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on May 3, 2026
  6. github-actions commented on Jul 3, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions