Bug type
Behavior bug (incorrect output/state without crash)
Summary
Bug Report
Surface: Discord channel
Symptom:
When the assistant calls a tool or spawns a sub-agent, the raw internal tool transcript is sometimes rendered into the Discord channel instead of being kept hidden. The message contains literal XML-like markup:
<tool_call>
{"name": "subagents", "arguments": { ... }}
</tool_call>
<tool_result>
Spawned sub-agent coding (id: sa_01jt3cwwqb5rz7hqp6ghh5qc12)
</tool_result>
Steps to reproduce
Reproduction:
Trigger any tool call or subagents spawn from a Discord-connected session. Observe that the raw <tool_call> block appears in the channel output before or alongside the normal reply.
Expected behavior
Expected behavior:
Tool activity stays internal. Only the natural-language assistant reply is sent to the channel.
Actual behavior
Actual behavior:
Internal tool transcript (tool name, full JSON arguments, and tool result) is rendered as plain text to the user-facing Discord channel.
OpenClaw version
openclaw 2026.3.8
Operating system
Windows 11 / WSL2
Install method
npm global
Logs, screenshots, and evidence
<tool_call>
{"name": "subagents", "arguments": {"action": "spawn", "agent": "coding", "task": "Build the AutomotiveAI Simulator — a Next.js 16 app with dark UI for simulating automotive AI agent conversations.\n\n## Setup\n\nWork in: /home/yabasha/clawd/automotiveai-simulator/\n\nRead these files first:\n- CLAUDE.md — full project spec, architecture, design system, all 12 scenarios\n- SCENARIOS.md — detailed step-by-step data for scenarios SC-04, SC-06, SC-09, SC-10, SC-12 (the 5 not in the HTML)\n- reference-simulation.html — Jamil's HTML demo with SC-01, SC-02, SC-03, SC-05, SC-07, SC-08, SC-11 fully scripted\n\n## What to Build\n\n### 1. Scaffold Next.js 16 project\n
bash\nbunx create-next-app@latest . --typescript --tailwind --app --src-dir --no-import-alias\n
\nThen install shadcn/ui and set up dark theme.\n\n### 2. Design System\n- Dark-only theme matching the CSS variables in CLAUDE.md\n- Fonts: DM Sans (body) + JetBrains Mono (code/scores)\n- All the animations from the reference HTML (message entrance, score transitions, entity pop, typing dots)\n\n### 3. Type System (src/lib/types.ts)\nDefine all TypeScript types for scenarios, steps, scoring, stages, entities, intents, ACP.\n\n### 4. Scenario Data (src/lib/scenarios/)\n- Extract all 7 scenarios from reference-simulation.html JS code\n- Add the 5 new scenarios from SCENARIOS.md (SC-04, SC-06, SC-09, SC-10, SC-12)\n- All 12 scenarios as typed TypeScript constants\n- Group by agent type: sales-chat.ts, sales-voice.ts, service-chat.ts, service-voice.ts\n\n### 5. Scoring Engine (src/lib/scoring.ts)\n- Port the scoring weights from the HTML (both WEIGHTS and SERVICE_WEIGHTS)\n- Temperature classification function\n- Pure functions, no side effects\n\n### 6. Playback Engine (src/lib/playback-engine.ts)\n- Takes a scenario's
steps array\n- Executes steps at their delay timestamps\n- Supports play, pause, reset\n- Calls callbacks for each step type (onMessage, onTool, onScore, etc.)\n- Proper cleanup on unmount\n\n### 7. Components (src/components/simulation/)\nBuild all components listed in CLAUDE.md architecture:\n- scenario-sidebar.tsx — Left panel with scenario list, grouped by agent type, with colored tags\n- conversation-panel.tsx — Center panel with chat messages, tool calls, typing indicator\n- analysis-panel.tsx — Right panel containing score, stages, entities, intents, ACP\n- agent-tabs.tsx — Top bar agent type selector (4 tabs)\n- play-controls.tsx — Play/Reset buttons\n- message-bubble.tsx — Customer (dark bg, left), Agent (orange, right), System (center, bordered)\n- tool-call-chip.tsx — Pending (cyan ⚙) → Done (green ✓ with result)\n- score-card.tsx — Big number + temperature badge + progress bar + factor checklist\n- stage-tracker.tsx — Vertical stepper (pending → active → done)\n- entity-grid.tsx — Key-value rows that animate in when found\n- intent-pills.tsx — Colored pill badges for detected intents\n- acp-snapshot.tsx — Envelope viewer with fields + "Sent to CRM" confirmation\n\n### 8. Main Page (src/app/page.tsx)\n- 3-panel layout: sidebar (240px) | conversation (flex) | analysis (310px)\n- Top bar with logo, agent tabs, simulation badge\n- Wire up playback engine to all components via React state\n- Full viewport, no scroll on body\n\n### 9. Key UX Details\n- Agent typing indicator (3 bouncing dots in orange bubble) before agent messages\n- Smooth scroll to bottom on new messages\n- Tool calls show as pending chips, then transition to done with result\n- Score number animates with color change based on temperature\n- Stage stepper updates with
done/active/pending states\n- Entity rows start dimmed, pop in with animation when extracted\n- ACP appears at end with typewriter-style field reveal\n- Reset clears everything back to initial state\n\n## Agile Workflow\n- Create GitHub issues for major features, then work through them\n- Branch: feat/1-initial-scaffold, etc.\n- Conventional commits\n- Make sure bun build passes (no TypeScript errors)\n- Commit working code frequently\n\n## Important\n- This is ALL client-side — no API routes needed\n- Dark mode only, no light mode toggle\n- Match the premium dark aesthetic from the reference HTML\n- All 12 scenarios must be included\n- The app should be immediately usable after bun dev", "model": "anthropic/claude-opus-4-6"}}
</tool_call>
<tool_result>
Spawned sub-agent coding (id: sa_01jt3cwwqb5rz7hqp6ghh5qc12)
</tool_result>
Impact and severity
Impact:
- Leaks internal prompt/task structure and sensitive task details to the channel
- Looks broken and confusing to users
- May create noisy duplicate messages and perceived delays
- Security concern: task payloads (file paths, instructions, model names) are exposed
Additional information
No response
Bug type
Behavior bug (incorrect output/state without crash)
Summary
Bug Report
Surface: Discord channel
Symptom:
When the assistant calls a tool or spawns a sub-agent, the raw internal tool transcript is sometimes rendered into the Discord channel instead of being kept hidden. The message contains literal XML-like markup:
Steps to reproduce
Reproduction:
Trigger any tool call or
subagentsspawn from a Discord-connected session. Observe that the raw<tool_call>block appears in the channel output before or alongside the normal reply.Expected behavior
Expected behavior:
Tool activity stays internal. Only the natural-language assistant reply is sent to the channel.
Actual behavior
Actual behavior:
Internal tool transcript (tool name, full JSON arguments, and tool result) is rendered as plain text to the user-facing Discord channel.
OpenClaw version
openclaw 2026.3.8
Operating system
Windows 11 / WSL2
Install method
npm global
Logs, screenshots, and evidence
Impact and severity
Impact:
Additional information
No response