You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
After a long running command in something like the developer toolkit, we get a timeout error and the session can't continue
To Reproduce
Steps to reproduce the behavior:
Ask goose to run a command that won't ever finish
Wait for it to timeout
Try something new
Expected behavior
We should be able to recover after the timeout and resume.
Please provide following information:
OS & Arch: OSX
Interface: UI
Version: v1.0.4
Extensions enabled: Developer
Provider & Model: sonnet 3.5
Additional context
I believe the issue is that we do not actually interrupt the long running command in the MCP server after the timeout is hit in the client. I'm not sure if MCP has a way in the protocol to interrupt. So we might need to handle timeouts in the server instead, and sync them up with the client.
The text was updated successfully, but these errors were encountered:
Either side can send a cancellation notification to indicate that a previously-issued request should be terminated. If client calls a tool thats long running, we can potentially keep track of it and cancel after some time
jasonkneen
added a commit
to jasonkneen/goose
that referenced
this issue
Feb 5, 2025
Fixesblock#1075
Add timeout and cancellation handling for long running commands in Goose MCP.
* Modify `crates/goose-cli/src/commands/session.rs` to add a timeout mechanism using `tokio::time::timeout` in the `agent_process_messages` function and implement cancellation notifications to interrupt long running commands.
* Add a `cancel` method to `McpService` in `crates/mcp-client/src/service.rs` to send cancellation notifications.
* Modify `crates/goose-cli/src/commands/mcp.rs` to add logic to handle cancellation notifications and interrupt long running commands in the `run_server` function.
* Modify `crates/goose-server/src/commands/mcp.rs` to add logic to handle cancellation notifications and interrupt long running commands in the `run` function.
---
For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/block/goose/issues/1075?shareId=XXXX-XXXX-XXXX-XXXX).
Describe the bug
After a long running command in something like the developer toolkit, we get a timeout error and the session can't continue
To Reproduce
Steps to reproduce the behavior:
Expected behavior
We should be able to recover after the timeout and resume.
Please provide following information:
Additional context
I believe the issue is that we do not actually interrupt the long running command in the MCP server after the timeout is hit in the client. I'm not sure if MCP has a way in the protocol to interrupt. So we might need to handle timeouts in the server instead, and sync them up with the client.
The text was updated successfully, but these errors were encountered: