馃搵 Prerequisites
馃幆 Affected Service(s)
UI Service
馃殾 Impact/Severity
Minor inconvenience
馃悰 Bug Description
In the onboarding wizard's Step 3: Select Tools (ui/src/components/onboarding/steps/ToolSelectionStep.tsx), the tool checkboxes never visually reflect whether a tool is actually selected, and clicking an already-selected tool doesn't deselect it - every click keeps adding.
Root cause: toolResponseMatchesTool (line 38-46) compared tool.mcpServer.name === toolResponse.server_name with strict string equality. But toolResponseToAgentTool (in ui/src/lib/toolUtils.ts) strips the namespace when building a Tool from a namespaced server ref - e.g. server ref "kagent/kagent-tool-server" becomes mcpServer.name = "kagent-tool-server". So the stored tool's mcpServer.name ("kagent-tool-server") is compared against the raw API ref ("kagent/kagent-tool-server"), which never matches. This made isToolSelected() return false unconditionally for every K8s tool:
- The
<Checkbox checked={isToolSelected(tool)} .../> never rendered as checked, however many times you clicked it.
handleToolToggle's own isSelected check used the same broken comparison, so it always took the "add" branch - it could never take the "remove" branch, even for a tool that was already selected.
Compounding this, handleToolToggle also pushed a brand-new Tool object per click instead of merging picks that share an MCP server into one entry's toolNames array (unlike SelectToolsDialog.handleAddItem, which already does this merge for the regular create/edit flow). Combined with the always-add bug above, re-clicking a tool (trying, and failing, to uncheck it) kept appending more entries for the same server.
馃攧 Steps To Reproduce
- Go through the onboarding wizard to create your first agent.
- In Step 3: Select Tools, click a K8s tool checkbox that isn't one of the two auto-preselected defaults.
- Observe the checkbox - it does not render as checked.
- Click it again, expecting to deselect it.
馃 Expected Behavior
- Checking a tool should visibly check its checkbox.
- Clicking an already-selected tool's checkbox should deselect it.
- Selecting multiple tools from the same MCP server should not create redundant duplicate bindings to that server.
馃摫 Actual Behavior
- The checkbox never appears checked, regardless of selection state, giving no feedback that the click registered.
- Because the "already selected" check is broken, every click is treated as a new selection - repeated clicks on the same tool keep adding entries rather than toggling it off.
- Selecting multiple different tools from the same server (without the merge fix) creates one separate
Tool array entry per tool, all referencing the same server.
馃捇 Environment
No response
馃敡 CLI Bug Report
No response
馃攳 Additional Context
- Related to #2410 ("Duplicate entries in 'Selected Tools and Agents' share the same React key, causing removed tools to reappear"). That issue is the downstream symptom: it's what happens in
ToolsSection.tsx on the agent Edit page once an agent has already been created with duplicate same-server Tool entries. This issue is the upstream root cause - the ToolSelectionStep.tsx checkbox bug described here is what let those duplicate entries get created in the first place, back in onboarding Step 3, before the agent even exists.
馃搵 Logs
馃摲 Screenshots
No response
馃檵 Are you willing to contribute?
馃搵 Prerequisites
馃幆 Affected Service(s)
UI Service
馃殾 Impact/Severity
Minor inconvenience
馃悰 Bug Description
In the onboarding wizard's Step 3: Select Tools (
ui/src/components/onboarding/steps/ToolSelectionStep.tsx), the tool checkboxes never visually reflect whether a tool is actually selected, and clicking an already-selected tool doesn't deselect it - every click keeps adding.Root cause:
toolResponseMatchesTool(line 38-46) comparedtool.mcpServer.name === toolResponse.server_namewith strict string equality. ButtoolResponseToAgentTool(inui/src/lib/toolUtils.ts) strips the namespace when building aToolfrom a namespaced server ref - e.g. server ref"kagent/kagent-tool-server"becomesmcpServer.name = "kagent-tool-server". So the stored tool'smcpServer.name("kagent-tool-server") is compared against the raw API ref ("kagent/kagent-tool-server"), which never matches. This madeisToolSelected()returnfalseunconditionally for every K8s tool:<Checkbox checked={isToolSelected(tool)} .../>never rendered as checked, however many times you clicked it.handleToolToggle's ownisSelectedcheck used the same broken comparison, so it always took the "add" branch - it could never take the "remove" branch, even for a tool that was already selected.Compounding this,
handleToolTogglealso pushed a brand-newToolobject per click instead of merging picks that share an MCP server into one entry'stoolNamesarray (unlikeSelectToolsDialog.handleAddItem, which already does this merge for the regular create/edit flow). Combined with the always-add bug above, re-clicking a tool (trying, and failing, to uncheck it) kept appending more entries for the same server.馃攧 Steps To Reproduce
馃 Expected Behavior
馃摫 Actual Behavior
Toolarray entry per tool, all referencing the same server.馃捇 Environment
No response
馃敡 CLI Bug Report
No response
馃攳 Additional Context
ToolsSection.tsxon the agent Edit page once an agent has already been created with duplicate same-serverToolentries. This issue is the upstream root cause - theToolSelectionStep.tsxcheckbox bug described here is what let those duplicate entries get created in the first place, back in onboarding Step 3, before the agent even exists.馃搵 Logs
馃摲 Screenshots
No response
馃檵 Are you willing to contribute?