- Shipped
- July 19, 2026 at 3:26 AM UTC
- Author
- Kamo
- Commit
- ee86dab
The AI could not previously ask for a person: escalation rules reached the model via the compiled prompt, but there was no machine-readable signal back, so the model could only SAY it would fetch someone and nothing happened. - Synthetic kamo_request_human tool, described from the agent's own enabled escalation rule titles so the model sees identical trigger conditions in the prompt and the tool. Intercepted before MCP dispatch - it is a signal, not a real tool call - and the TOOL row it persists is what makes the reason durable and analytics-ready with zero new columns. - Attached ONLY when the channel actually has live support enabled. Handing an AI-only org a tool that promises a human who can never arrive is worse than having no tool: the widget has no Support tab, so the signal is dropped and the visitor is left waiting for someone who was never coming. - New internal endpoint returns the handoff reason, the AI's summary for whoever takes over, and the USER/ASSISTANT transcript. TOOL and SYSTEM rows are excluded - the human needs the conversation, not the machinery. - reasonDetail and summary are deliberately withheld from the visitor's browser: they are the model's private assessment OF the visitor. Only {requested, reason} crosses to the client; MediaService fetches the rest server-side. - AI turns are never moved or deleted. AiChatMessage stays the analytics system of record; the human side gets a copy. Also fixes a latent bug found on the way: the tools block ignored the per-model supportsToolUse flag, so a model explicitly flagged as not supporting tools was still sent them. 31 of 140 models are flagged false; ai_mcp_server_configs is empty cluster-wide, so today's blast radius is zero. Suite is 124 tests, green.