-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Description
Describe the bug
Goose appears to fail at properly handling errors from MCP servers (type: stdio). When an MCP server returns an error response, Goose gets stuck and eventually times out after 30 seconds instead of processing the error and providing appropriate feedback to the LLM.
To Reproduce
Steps to reproduce the behavior:
- Add the
@modelcontextprotocol/server-everythingas an extension in~/.config/goose/config.yaml:
---
everything:
args:
- -y
- "@modelcontextprotocol/server-everything"
bundled: null
cmd: npx
description: null
enabled: true
env_keys: []
envs: {}
name: everything
timeout: 30
type: stdio- Start
goosefrom CLI - Issue a tool call with incorrect parameter types:
add "hogehoge" "fugafuga" - Observe that Goose gets stuck and times out after 30 seconds
Expected behavior
Goose should properly handle the error response from the MCP server and provide immediate feedback to the LLM, allowing it to understand the error and continue processing. The error should not cause a timeout.
Screenshots
Actual Goose behavior (times out):
( O)> add "hogehoge" "fugafuga"
I'll add those two values for you using the add function.
─── add | everything ──────────────────────────
a: hogehoge
b: fugafuga
◓ Mapping memory mazes...
Execution failed: Call to 'example-servers/everything' failed for 'tools/call'. Error from mcp-server: request timed out
Expected MCP server response (immediate error):
$ npx -y @modelcontextprotocol/server-everything
Starting default (STDIO) server...
{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"add","arguments":{"a":"hogehoge","b":"fugafuga"}}}
{"jsonrpc":"2.0","id":1,"error":{"code":-32603,"message":"[\n {\n \"code\": \"invalid_type\",\n \"expected\": \"number\",\n \"received\": \"string\",\n \"path\": [\n \"a\"\n ],\n \"message\": \"Expected number, received string\"\n },\n {\n \"code\": \"invalid_type\",\n \"expected\": \"number\",\n \"received\": \"string\",\n \"path\": [\n \"b\"\n ],\n \"message\": \"Expected number, received string\"\n }\n]"}}
Please provide following information:
- OS & Arch: macOS
- Interface: CLI
- Version: 1.0.26
- Extensions enabled: everything (@modelcontextprotocol/server-everything)
- Provider & Model: claude-sonnet-4
Additional context
This issue suggests a problem with Goose's MCP server error handling mechanism. The MCP server correctly returns an error response immediately, but Goose fails to process this error response and instead waits until timeout. Proper error handling would allow the LLM to receive feedback about parameter type mismatches and adjust its approach accordingly.