Skip to content

[BUG] Goose Desktop GUI crashes on MCP tool call when toolRequest.toolCall.value.arguments is missing #7116

@paulivascu

Description

@paulivascu

Summary:
When a tool request arrives without an arguments field (valid for no-arg tools), the desktop renderer crashes with:
Cannot convert undefined or null to object

** Detailed analysis and fix proposal (with codex) **:
bugreport_goose_matlab_mcp_gui_crash_2026-02-10.zip

Environment:

  • Goose Desktop GUI (observed on Windows)
  • Date observed: February 10, 2026
  • MATLAB MCP extension/tooling
  • CLI mode does not reproduce

Repro steps:

  1. Start Goose Desktop GUI.
  2. Trigger an MCP tool call that has no arguments (example: MATLAB toolbox detection tool).
  3. Observe tool call event processed successfully in backend/server logs.
  4. GUI crashes to the error screen ("Honk!") with Cannot convert undefined or null to object.

Expected:
GUI should render the tool call normally, even if arguments is absent.

Actual:
Renderer throws and crashes.

Root cause:
In ui/desktop/src/components/ToolCallWithResponse.tsx, tool description fallback does:
Object.entries(args) where args is cast from toolCall.arguments without defaulting.
If arguments is missing, this throws.

Proposed fix:
Use a safe default:
const args = (toolCall.arguments ?? {}) as Record<string, ToolCallArgumentValue>;
and keep local types aligned with arguments?: ....

Regression test:
Add a component test rendering a toolRequest with:
toolCall: { status: 'success', value: { name: 'matlab__detect_matlab_toolboxes' } }
(no arguments) and assert render does not throw.


Screenshots
If applicable, add screenshots to help explain your problem.

Image

Please provide the following information

  • OS & Arch: windows 6.2.9200 x86_64
  • Interface: UI
  • Version: 1.23.2
  • Extensions enabled: developer, Extension Manager, Matlab, Excel
  • Provider & Model: openai – gpt-4.1

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions