Skip to content

feat(vscode): add subagent inspector tabs - #13173

Merged
marius-kilocode merged 6 commits into
mainfrom
acidic-fennel
Aug 18, 2026
Merged

feat(vscode): add subagent inspector tabs#13173
marius-kilocode merged 6 commits into
mainfrom
acidic-fennel

Conversation

@marius-kilocode

Copy link
Copy Markdown
Collaborator

Agent Manager previously treated delegated subagents as separate viewer flows, making parent and child sessions harder to inspect together and limiting the inspector to one child view at a time.

This adds a persistent Subagents inspector panel for worktree sessions. Each opened child gets an independent sortable and closable tab backed by its own session provider, so parent and child streams remain isolated while multiple children run in parallel. The panel shares inspector resize and tab behavior with side terminals, while inspector hover tabs omit shortcut hints without changing the main session tab bar.

Subagent inspector panel

Parallel subagent sessions

Comment thread packages/kilo-vscode/webview-ui/agent-manager/SubagentPanel.tsx Outdated
Comment thread packages/kilo-vscode/webview-ui/agent-manager/subagent-tabs.ts
@kilo-code-bot

kilo-code-bot Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (1 file, incremental since 4279750)
  • packages/kilo-vscode/src/KiloProvider.ts

The previous warning is resolved in 0067dba: unsyncSession now only removes a session from inspectorSessionIds when scope === "inspector", so a task-scope unsync from TaskToolExpanded no longer strips the inspector panel's protection before releaseChildSession runs.

Previous Review Summaries (2 snapshots, latest commit 4279750)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit 4279750)

Status: 1 Issue Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
packages/kilo-vscode/src/KiloProvider.ts 1587 unsyncSession deletes the session from inspectorSessionIds regardless of scope, so a task-scope unsync (from TaskToolExpanded hide/collapse) strips the inspector's protection; the next releaseChildSession then drops the stream for a child still open in a Subagents inspector tab
Files Reviewed (12 files, incremental since d95c5d4)
  • packages/kilo-vscode/src/KiloProvider.ts - 1 issue
  • packages/kilo-vscode/src/agent-manager/types.ts
  • packages/kilo-vscode/src/kilo-provider/visible-task-streams.ts
  • packages/kilo-vscode/tests/unit/session-select-connection.test.ts
  • packages/kilo-vscode/tests/unit/subagent-tabs.test.ts
  • packages/kilo-vscode/webview-ui/agent-manager/AgentManagerApp.tsx
  • packages/kilo-vscode/webview-ui/agent-manager/SubagentPanel.tsx
  • packages/kilo-vscode/webview-ui/agent-manager/subagent-tabs.ts
  • packages/kilo-vscode/webview-ui/src/components/chat/SessionTabMenu.tsx
  • packages/kilo-vscode/webview-ui/src/components/chat/TaskToolExpanded.tsx
  • packages/kilo-vscode/webview-ui/src/context/session.tsx
  • packages/kilo-vscode/webview-ui/src/types/messages/webview-messages.ts

All three previous findings are resolved in 4279750: the subagent view now loads with focus: false so it no longer hijacks contextSessionID/focus or stops the parent's processes, closing tabs posts unsyncSession and triggers releaseChildSession cleanup, and Close Others is no longer gated behind closeable. The remaining concern is the cross-scope unsync in handleChildSyncMessage.

Fix these issues in Kilo Cloud

Previous review (commit d95c5d4)

Status: 3 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 1
WARNING 1
SUGGESTION 1
Issue Details (click to expand)

CRITICAL

File Line Issue
packages/kilo-vscode/webview-ui/agent-manager/SubagentPanel.tsx 37 Nested selectSession posts loadMessages through the shared channel, hijacking the webview's contextSessionID/presence and stopping the previously focused session's background processes when a subagent tab is merely opened

WARNING

File Line Issue
packages/kilo-vscode/webview-ui/agent-manager/subagent-tabs.ts 49 Closing a subagent tab never un-syncs the child session — extension tracking sets and nested-provider message caches keep growing per opened tab

SUGGESTION

File Line Issue
packages/kilo-vscode/webview-ui/src/components/chat/SessionTabMenu.tsx 31 closeable: false also hides "Close Others" and can produce a completely empty context menu on running Setup terminal tabs
Files Reviewed (18 files)
  • .changeset/subagent-inspector-tabs.md
  • packages/kilo-vscode/tests/unit/agent-manager-arch.test.ts
  • packages/kilo-vscode/tests/unit/agent-manager-terminal-layout.test.ts
  • packages/kilo-vscode/tests/unit/subagent-tabs.test.ts
  • packages/kilo-vscode/webview-ui/agent-manager/AgentManagerApp.tsx
  • packages/kilo-vscode/webview-ui/agent-manager/ClosableTab.tsx
  • packages/kilo-vscode/webview-ui/agent-manager/InspectorTabStrip.tsx
  • packages/kilo-vscode/webview-ui/agent-manager/SubagentPanel.tsx - 1 issue
  • packages/kilo-vscode/webview-ui/agent-manager/agent-manager.css
  • packages/kilo-vscode/webview-ui/agent-manager/index.tsx
  • packages/kilo-vscode/webview-ui/agent-manager/side-panel-layout.ts
  • packages/kilo-vscode/webview-ui/agent-manager/subagent-tabs.ts - 1 issue
  • packages/kilo-vscode/webview-ui/agent-manager/terminal/SideTerminalPanel.tsx
  • packages/kilo-vscode/webview-ui/agent-manager/terminal/SortableTerminalTab.tsx
  • packages/kilo-vscode/webview-ui/agent-manager/terminal/render.tsx
  • packages/kilo-vscode/webview-ui/src/components/chat/SessionTabMenu.tsx - 1 issue
  • packages/kilo-vscode/webview-ui/src/components/chat/TaskToolExpanded.tsx
  • packages/kilo-vscode/webview-ui/src/context/session.tsx

The tab strip extraction (ClosableTab/InspectorTabStrip) is a clean refactor, the subagent-tabs state logic is well tested with real implementation (no mocks), and the changeset is user-facing. The blocking concern is that the read-only child view drives selectSession over the shared webview channel, which has extension-wide focus side effects.

Fix these issues in Kilo Cloud


Reviewed by kimi-k3 · Input: 76.1K · Output: 3.6K · Cached: 255K

Review guidance: REVIEW.md from base branch main

Comment thread packages/kilo-vscode/src/KiloProvider.ts Outdated
@marius-kilocode
marius-kilocode merged commit 6e12705 into main Aug 18, 2026
23 checks passed
@marius-kilocode
marius-kilocode deleted the acidic-fennel branch August 18, 2026 08:20
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.

2 participants