[GH-ISSUE #5901] Tool calls and their results are invisible unless the user has debug mode on #3258

Closed
opened 2026-10-21 06:01:24 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @kolacheee on GitHub (Sep 6, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5901

Originally assigned to: @SpicyMarinara on GitHub.

The server streams a tool_call event and a tool_result event for every tool the model invokes, but
the client throws both away unless debug mode is on. There is no non-debug rendering of any kind — no
card, no inline note, no indicator that a tool ran. When a model calls a tool mid-turn, an ordinary
user sees the reply pause and then continue, with nothing to say what happened in between.

Where it is. Both events are dropped at the top of their case in the SSE switch:
packages/client/src/hooks/use-generate.ts:2122-2123 (case "tool_call": { if (!debugMode) break;)
and :2136-2137 (case "tool_result": { if (!debugMode) break;). Everything inside each case feeds
addDebugEntry and nothing else, and those two cases are the only consumers of either event name in
the whole client (a repo-wide search for "tool_result" / "tool_call" under
packages/client/src returns exactly these four lines). The server emits them unconditionally for
every executed and denied tool call — packages/server/src/routes/generate.routes.ts:6589-6593. To
see it: enable tool use, ask for something that triggers a tool, and watch the turn with debug off,
then again with debug on.

Why it matters. A dice roll is the sharpest case — the engine has a perfectly good animated dice card
for /roll results (packages/client/src/components/dice/AnimatedDiceRoll.tsx), and a model-invoked
roll_dice renders none of it, so the tool path is less legible than the model just writing a number
in prose. More generally, the user has no way to tell a tool-assisted turn from a plain one, no way to
see what the model asked for, and no way to notice when a tool was denied. Debug mode is a developer
surface with developer output; needing it to know a roll happened is a gap in the normal experience,
not a debugging preference.

The smallest honest fix is not "render every tool result to everyone" — most results are raw JSON that
would be noise in a chat — but to give the events a non-debug path for the tools whose output is
genuinely user-facing, and leave the rest debug-only. Dice is the obvious first one and has its
renderer already built, so the work is attaching the result where the existing card reads it rather
than designing anything new. It is worth deciding at the same time whether a denied tool call deserves
a visible trace of its own, since that is currently silent in exactly the same way and is the case a
user is most likely to need explained. A related PR unwraps the roll_dice case specifically; the
generic surface is what this issue is about.

Originally created by @kolacheee on GitHub (Sep 6, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5901 Originally assigned to: @SpicyMarinara on GitHub. The server streams a `tool_call` event and a `tool_result` event for every tool the model invokes, but the client throws both away unless debug mode is on. There is no non-debug rendering of any kind — no card, no inline note, no indicator that a tool ran. When a model calls a tool mid-turn, an ordinary user sees the reply pause and then continue, with nothing to say what happened in between. Where it is. Both events are dropped at the top of their case in the SSE switch: `packages/client/src/hooks/use-generate.ts:2122-2123` (`case "tool_call": { if (!debugMode) break;`) and `:2136-2137` (`case "tool_result": { if (!debugMode) break;`). Everything inside each case feeds `addDebugEntry` and nothing else, and those two cases are the only consumers of either event name in the whole client (a repo-wide search for `"tool_result"` / `"tool_call"` under `packages/client/src` returns exactly these four lines). The server emits them unconditionally for every executed and denied tool call — `packages/server/src/routes/generate.routes.ts:6589-6593`. To see it: enable tool use, ask for something that triggers a tool, and watch the turn with debug off, then again with debug on. Why it matters. A dice roll is the sharpest case — the engine has a perfectly good animated dice card for `/roll` results (`packages/client/src/components/dice/AnimatedDiceRoll.tsx`), and a model-invoked `roll_dice` renders none of it, so the tool path is *less* legible than the model just writing a number in prose. More generally, the user has no way to tell a tool-assisted turn from a plain one, no way to see what the model asked for, and no way to notice when a tool was denied. Debug mode is a developer surface with developer output; needing it to know a roll happened is a gap in the normal experience, not a debugging preference. The smallest honest fix is not "render every tool result to everyone" — most results are raw JSON that would be noise in a chat — but to give the events a non-debug path for the tools whose output is genuinely user-facing, and leave the rest debug-only. Dice is the obvious first one and has its renderer already built, so the work is attaching the result where the existing card reads it rather than designing anything new. It is worth deciding at the same time whether a denied tool call deserves a visible trace of its own, since that is currently silent in exactly the same way and is the case a user is most likely to need explained. A related PR unwraps the `roll_dice` case specifically; the generic surface is what this issue is about.
bsakaguchi 2026-10-21 06:01:24 +07:00
  • closed this issue
  • added the
    in-pr
    label
Author
Owner

@SpicyMarinara commented on GitHub (Sep 9, 2026):

@SpicyMarinara owns the remaining generic failure-visibility work in draft #5984. Dice already has its card path; this change will expose concise failed/denied tool notifications in normal UI while keeping raw results in debug output.

<!-- gh-comment-id:5594323043 --> @SpicyMarinara commented on GitHub (Sep 9, 2026): @SpicyMarinara owns the remaining generic failure-visibility work in draft #5984. Dice already has its card path; this change will expose concise failed/denied tool notifications in normal UI while keeping raw results in debug output.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#3258
No description provided.