TUI renders raw `<tool_use>` XML and tool results don't display after agent trust changes
Before opening, please confirm:
- [x] I have searched for duplicate or closed issues
Operating System
macOS 26.4.1
Kiro Version
2.2.0
Bug Description
Bug: TUI renders raw <tool_use> XML and tool results don't display after agent trust changes
Version: kiro-cli 2.2.0 OS: macOS 26.4.1 (Apple M4 Pro) Terminal: Ghostty 1.3.1 (also happened on default macOS terminal)
Actual behavior:
- Tool calls render as raw
<tool_use>XML tags in the chat output - Tool results don't display at all (no output shown after tool executes)
/toolspanel shows "0 tools / No tools available" even though tools ARE working (agent successfully reads files, runs commands)- Status bar shows "Trust All Tools active, confirmations are off" despite setting
chat.disableTrustAllConfirmation false
What I tried:
/tools reset— no effect- Wiped
~/Library/Application Support/kiro-cli/and reinstalled — no effect - Deleted
tui.jsandtui.js.sha256to force re-download — no effect KIRO_NO_SYNCHRONIZED=1— no effectkiro-cli settings chat.ui classic— classic mode works perfectly, tools render correctly- Reverted agent JSON files in
~/.kiro/agents/— no effect
The tools themselves function correctly — list_directory executes and returns data, it just doesn't render in the TUI.
Steps to Reproduce
- Open kiro-cli in TUI mode (default)
- Ask kiro to permanently trust all tools for all agents (e.g. "update the three agent configs to allow all tools")
- Kiro writes agent JSON files with
allowedToolsarrays - Restart kiro-cli
Expected Behavior
Tool calls render with the visual UI components (spinner, ✓/✗ icons, collapsible output)
Conversation ID
No response
Additional Context
No response
🤖 Potential Duplicate Detected
This issue appears to be similar to:
- #6502: most of the tools is lost after loading saved chat from .json (85% similar)
- #6183: No response after gradle-related tool using. (1.27) (85% similar)
- #5476: Weird issue about tools not available in chat session (85% similar)
What happens next?
- ⏰ This issue will be automatically closed in 3 days
- 🏷️ If this is not a duplicate, you can prevent automatic closure by adding a comment or reacting with 👎 to this message.
- 💬 Comment on the original issue if you have additional information
Why is this marked as duplicate? Both issues report tools not displaying properly in the TUI - the new issue shows '0 tools / No tools available' in the /tools panel despite tools working, while #6502 reports 'most of the tools is lost' after loading saved chat, with similar symptoms of tools functionality being affected in the interface
Root cause found: When kiro-cli was asked to "trust all tools for an agent permanently", it created custom agent JSON files in ~/.kiro/agents/ that overrode the built-in agents (kiro_default, kiro_guide, kiro_planner). These files used allowedTools with @builtin etc. but were missing "includeMcpJson": true, which broke the TUI tool registry causing /tools to show 0 tools and tool calls to render as raw XML. Deleting the custom agent files restored built-in agent behavior and fixed the TUI.
Suggested fix: Either prevent overriding built-in agent names, or warn the user when a custom agent file shadows a built-in.
Thank you for your feedback! 🙏
The duplicate label has been removed and this issue has been sent back for maintainer review.
A maintainer will review this issue shortly.
I think my issue is similar but not exactly the same:
https://github.com/kirodotdev/Kiro/issues/9180
Is there any chance this will be fixed soon?
Following up — this still happens on kiro-cli 2.12.3 (macOS), a fair few versions past the 2.2.0/2.3.0 reports here and in #8654, so it doesn't look fixed yet.
I'm running my own custom agent (a ~/.kiro/agents/*.json with hooks and an allowedTools list), resumed the session with --resume, on claude-opus-4.8. Deep into a long session, one turn just printed the tool call as text instead of running it:
<invoke name="shell">
<parameter name="command">…</parameter>
</invoke>
No spinner-hang, no Esc — the turn just ended and the command never ran. So it's the "nothing executes" flavour from #8654, not the "shows as XML but still runs" one in the original report here.
I dug into the session transcript to confirm: that turn got saved as a plain text block with the raw markup in it — no tool-use block, no tool result after it. The kicker is the exact same shell command earlier in the same session saved correctly as a proper tool-use call. So it's intermittent, and when it misfires the call lands in the text channel instead of the tool channel.
Couple of things that might help narrow it down:
- The leaked markup is the
<invoke …><parameter …>function-call XML style, which isn't kiro-cli's native tool format — looks like it fell back to a format the parser doesn't recognise. - It only bit once, deep in a long
--resumed session under a custom agent. That custom-agent +--resumecombo feels like the trigger (fits the workspace-agent angle in #8654 / #5873).
Happy to share the session ID and the exact transcript lines if that'd help.