fix: render permission and question prompts from nested subagent session#13719
fix: render permission and question prompts from nested subagent session#13719ro-hansolo wants to merge 2 commits intoanomalyco:devfrom
Conversation
|
The following comment was made by an LLM, it may be inaccurate: I found a potentially related PR: PR #10539: This PR may be related because it also addresses an issue with nested subagents (sub-sub agents) not being able to ask questions. Your PR #13719 fixes a similar problem where permission and question prompts from nested subagent sessions were silently hanging. Both involve rendering prompts from deeper levels in the session hierarchy. However, this appears to be a historical PR that may have already been merged. The current PR (#13719) likely addresses a regression or a similar issue with a different implementation approach. |
|
This PR solves a big problem I've been experiencing because I have most permissions set to |
What does this PR do?
Fixes #13715
Permission and question prompts from nested subagent sessions (grandchild+) silently hang. The
children()memo insession/index.tsxonly collects direct child sessions, so events from deeper sessions are never rendered in the TUI.Added a
descendants()memo that walks the full session tree using Set iteration. Permissions and questions now usedescendants()while tab navigation still uses the originalchildren().How did you verify your code works?
Spawned a general subagent that spawns another general subagent requiring bash permission. Before: TUI hangs silently. After: permission prompt surfaces. Video attached.
Before:
Screen.Recording.2026-02-15.at.3.58.30.PM.mov
After:
Bug.Fix.mov