This repository was archived by the owner on Feb 25, 2026. It is now read-only.
fix(vscode): display sub-agent task tool list in webview#427
Merged
Conversation
The task tool's child session data was never populated in the VSCode webview's DataProvider store, causing the task-tools list to render empty. Two root causes: 1. DataBridge only mapped the current session's messages/parts, so getSessionToolParts() always returned [] for child session IDs. 2. No syncSession callback was provided to DataProvider, so the task tool renderer's createEffect that triggers child session loading was a no-op. Add a syncSession message round-trip: the webview sends syncSession to the extension, which tracks the child session ID for SSE events and fetches its messages via HTTP, sending them back as messagesLoaded. The DataBridge now exposes the full allMessages/allParts store so all sessions (including child sessions) are visible to the shared message-part renderer.
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (4 files)
Notes
|
markijbema
approved these changes
Feb 18, 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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Context
Resolve: #351
The sub-agent task tool list was not displaying in the VSCode webview. When a task tool spawns a child session, the tool output panel showed an empty
data-component="task-tools"container instead of the list of tool calls the sub-agent executed.The app (
packages/app) worked correctly because it has a full sync system that fetches child session data on demand.Implementation
Two root causes were identified and fixed:
Root cause 1 —
DataBridgeonly mapped the current session's dataApp.tsx'sDataBridgebuilt theDataProviderstore with only the current session's messages and parts ({ [id]: session.messages() }). The sharedmessage-part.tsxrenderer callsgetSessionToolParts(store, childSessionId)which looks upstore.message[childSessionId]— always empty because only the parent session ID was keyed.Fix:
DataBridgenow usessession.allMessages()andsession.allParts()which expose the full store (all sessions), so child session data is visible once loaded.Root cause 2 — No
syncSessioncallbackThe task tool renderer in
message-part.tsxhas acreateEffectthat callsdata.syncSession(childSessionId)to trigger loading child session data.DataProviderwas instantiated withoutonSyncSession, so the effect was a no-op.Fix: A new
syncSessionmessage round-trip was added:DataBridgeprovidesonSyncSession→ callssession.syncSession(sessionID){ type: "syncSession", sessionID }to the extensionKiloProvider.handleSyncSession()adds the child session ID totrackedSessionIds(so future SSEmessage.part.updatedevents are forwarded) and fetches messages via HTTP, sending them back asmessagesLoadedhandleMessagesLoadedstores them under the child session ID, which theDataBridgenow includes in the storeFiles changed
packages/kilo-vscode/webview-ui/src/types/messages.ts— newSyncSessionRequesttypepackages/kilo-vscode/src/KiloProvider.ts— newhandleSyncSessionmethodpackages/kilo-vscode/webview-ui/src/context/session.tsx—allMessages,allParts,syncSessionadditionspackages/kilo-vscode/webview-ui/src/App.tsx— updatedDataBridgeto use full store + wireonSyncSessionScreenshots
How to Test