[GH-ISSUE #4770] [Feature]: Show tool error output in Professor Mari's workspace chat #2626

Closed
opened 2026-10-21 05:51:43 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @xDanteMD on GitHub (Aug 8, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/4770

Originally assigned to: @SpicyMarinara on GitHub.

What problem does this solve?

When Professor Mari executes workspace commands (app_data, docs_search, read, etc.), the chat UI shows a compact status badge via the WorkspaceToolEvent component — "TOOL app data · Searching characters" or "FILE Reading file · config.json". On success, this is sufficient: the model's next message summarizes the result.

On error, however, the user gets a red badge with a "needs attention" label but no error detail. The WorkspaceToolCall.output field contains the error message, but WorkspaceToolEvent never renders it. The user sees that something failed but has no idea what failed or why. They can't troubleshoot, and they can't tell the model what went wrong.

This is the workspace-mode equivalent of the silent-drop problem: the model knows the tool failed, but the user doesn't get the information they need to act on it.

Proposed solution

Auto-expand the tool output on error so users can see what went wrong:

  1. On success: No change — compact badge only (the model's summary is sufficient)
  2. On error: Expand to show the error output in a styled block below the badge, with the existing error styling (red border/background from WorkspaceToolEvent)
  3. The WorkspaceToolCall.output field is already populated by tool_end events (workspace-agent.service.ts:2278) — this is purely a rendering change

Alternatives considered

  • Show output for all tool calls — too noisy for multi-step operations where several tool calls succeed in sequence. The model's summary is sufficient for successes.
  • Toast notification for errors — ephemeral, easy to miss. The error should persist in the conversation flow.
  • Show errors only in a separate panel — disrupts conversation flow. The error is contextually tied to the tool badge.

Additional context

  • The WorkspaceToolEvent component (HomeProfessorMariChat.tsx:1361-1401) already has error styling and a "needs attention" indicator. The error output display fits naturally into this existing structure.
  • The WorkspaceToolCall.output field (line 423) is string | null — populated on both success and error via tool_end events. On error, it contains the error message.
  • Professor Mari's conversation mode commands (bracket syntax) don't have this problem because they're extracted silently and confirmed via toast notifications. This issue is workspace-mode only.
  • Adversarial verification pass ran against codebase and assumptions; minimal cussing from the model calling me rude words

Research undertaken: codebase analysis of workspace-agent.service.ts (tool_start/tool_end event emission, tool_end error path at line 2278), HomeProfessorMariChat.tsx (WorkspaceToolEvent component at lines 1361-1401, WorkspaceToolCall type at line 417, error styling at lines 1384-1386), HomeProfessorMariChat.tsx (SSE event handling for tool_start/tool_end), use-generate.ts (SSE event handling for assistant_action). Confirmed that WorkspaceToolCall.output is populated on error but never rendered. Verified that assistant_action is a separate conversation-mode concern (toast notifications), not a tool execution display issue.

Originally created by @xDanteMD on GitHub (Aug 8, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/4770 Originally assigned to: @SpicyMarinara on GitHub. ## What problem does this solve? When Professor Mari executes workspace commands (app_data, docs_search, read, etc.), the chat UI shows a compact status badge via the `WorkspaceToolEvent` component — "TOOL app data · Searching characters" or "FILE Reading file · config.json". On success, this is sufficient: the model's next message summarizes the result. On **error**, however, the user gets a red badge with a "needs attention" label but **no error detail**. The `WorkspaceToolCall.output` field contains the error message, but `WorkspaceToolEvent` never renders it. The user sees that something failed but has no idea *what* failed or *why*. They can't troubleshoot, and they can't tell the model what went wrong. This is the workspace-mode equivalent of the silent-drop problem: the model knows the tool failed, but the user doesn't get the information they need to act on it. ## Proposed solution Auto-expand the tool output on error so users can see what went wrong: 1. **On success:** No change — compact badge only (the model's summary is sufficient) 2. **On error:** Expand to show the error output in a styled block below the badge, with the existing error styling (red border/background from `WorkspaceToolEvent`) 3. **The `WorkspaceToolCall.output` field is already populated** by `tool_end` events (workspace-agent.service.ts:2278) — this is purely a rendering change ## Alternatives considered - **Show output for all tool calls** — too noisy for multi-step operations where several tool calls succeed in sequence. The model's summary is sufficient for successes. - **Toast notification for errors** — ephemeral, easy to miss. The error should persist in the conversation flow. - **Show errors only in a separate panel** — disrupts conversation flow. The error is contextually tied to the tool badge. ## Additional context - The `WorkspaceToolEvent` component (HomeProfessorMariChat.tsx:1361-1401) already has error styling and a "needs attention" indicator. The error output display fits naturally into this existing structure. - The `WorkspaceToolCall.output` field (line 423) is `string | null` — populated on both success and error via `tool_end` events. On error, it contains the error message. - Professor Mari's conversation mode commands (bracket syntax) don't have this problem because they're extracted silently and confirmed via toast notifications. This issue is workspace-mode only. - Adversarial verification pass ran against codebase and assumptions; minimal cussing from the model calling me rude words --- *Research undertaken: codebase analysis of `workspace-agent.service.ts` (tool_start/tool_end event emission, tool_end error path at line 2278), `HomeProfessorMariChat.tsx` (WorkspaceToolEvent component at lines 1361-1401, WorkspaceToolCall type at line 417, error styling at lines 1384-1386), `HomeProfessorMariChat.tsx` (SSE event handling for tool_start/tool_end), `use-generate.ts` (SSE event handling for assistant_action)*. *Confirmed that WorkspaceToolCall.output is populated on error but never rendered. Verified that assistant_action is a separate conversation-mode concern (toast notifications), not a tool execution display issue.*
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#2626
No description provided.