feat(questions): enhance questions TUI + add full descendants support #7653
+370
−113
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR fixes nested agent questions not appearing in the TUI and improves question tool UX.
Fixes #7654
Problem
When using ohmyopencode (or similar setups) with sub-agents spawning other agents via
background_task, questions from deeply nested agents don't show up in the main session's TUI. The old code only looked at direct children sessions, missing questions from grandchildren and beyond.To reproduce (without this PR):
The questions never appear in the TUI.
Solution
Core Fix: Nested Agent Questions
fromparameter so users know which agent is asking ("Question from explorer-agent")QoL Improvements
The remaining changes are quality-of-life tweaks to improve the interview workflow:
☐/■),spaceto toggle,enterto confirmTest Infrastructure
OPENCODE_TEST_SKIP_GITenv var to skip git init (for commit signing setups)OPENCODE_TEST_*vars at test start for visibilityVerification
fromfieldScreenshots
Short single without
fromShort single with
fromSimple Multi-select without
fromSimple Multi-select with
fromMulti-Question
Long Markdown question (dark zone is scrollable)
Support for Markdown in the discussion answers
(this PR was mainly done by opencode with my supervision, I've been using the question workflow heavily lately with the https://github.com/paulp-o/ask-user-questions-mcp MCP. It's so great that we have questions natively in opencode now, but there descendant issue was preventing my old workflows from working properly as questions weren't bubbling up from lower than direct child agents. Also added some TUI improvements)