Repository navigation
fix(vscode): resolve subagent permission cards after replies - #13704
Merged
marius-kilocode merged 2 commits intoSep 2, 2026
Merged
Conversation
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (6 files)
Reviewed by grok-4.6 · Input: 157K · Output: 14.7K · Cached: 472.2K Review guidance: REVIEW.md from base branch |
…agent-permission-requests
marius-kilocode
enabled auto-merge
September 2, 2026 18:34
kirillk
approved these changes
Sep 2, 2026
marius-kilocode
deleted the
investigate-stuck-subagent-permission-requests
branch
September 2, 2026 18:54
This was referenced Sep 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What Problem This Solves
A background subagent can successfully receive approval while its parent still shows a disabled Permission required (subagent) card. Collapsing the task releases the child event subscription, so the parent can miss
permission.replied. The reply handler previously relied only on that event to clear the card.Why This Change Was Made
A successful permission reply now sends the existing resolution message directly and clears its cached route. Permission recovery also uses the same revision-counter pattern as question recovery, so an older
permission.listresponse cannot restore a resolved request.This is limited to the extension reply/recovery path. It does not change permission policy, retain hidden subagent streams, or refactor CLI task cancellation.
User Impact
Allowing or denying a subagent permission clears the card even after its task view is collapsed. The normal expanded-view flow continues to work. Failed replies still leave the request available for retry.
Evidence
Reproduced before editing production code in isolated VS Code with the real extension/backend and a local scripted model, without real credentials or paid model calls:
agent_manager prompt.Before: the prompt was accepted, but one permission card remained with both buttons disabled.
After rebuilding: the same flow leaves zero permission cards and clears the waiting indicator. Also verified denial with the task collapsed, reopening the child after denial, and approval with the task expanded.
bun run compile,bun run typecheck,bun run knip, andbun run check-kilocode-changepassed. Compile includes lint.Manual check: repeat steps 1–3, then repeat with Deny. The card must disappear without reopening the child or reloading VS Code.