Skip to content

Comments

fix: render permission and question prompts from nested subagent session#13719

Open
ro-hansolo wants to merge 2 commits intoanomalyco:devfrom
ro-hansolo:fix-nested-subagent-permissions
Open

fix: render permission and question prompts from nested subagent session#13719
ro-hansolo wants to merge 2 commits intoanomalyco:devfrom
ro-hansolo:fix-nested-subagent-permissions

Conversation

@ro-hansolo
Copy link

What does this PR do?

Fixes #13715

Permission and question prompts from nested subagent sessions (grandchild+) silently hang. The children() memo in session/index.tsx only 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 use descendants() while tab navigation still uses the original children().

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

@github-actions
Copy link
Contributor

The following comment was made by an LLM, it may be inaccurate:

I found a potentially related PR:

PR #10539: fix(questions): fixes #7654 where sub-sub agents can't ask questions
#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.

@ro-hansolo ro-hansolo changed the title fix: render permission and question prompts from nested subagent sess… fix: render permission and question prompts from nested subagent session Feb 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Permission asks from nested subagent sessions silently hang

1 participant