Skip to content

Bricked session after a failed MCP call. #312

Closed

Description

@0xHarlan

Describe the bug

I got the same problem as this issue: #102 (comment)

It happend after a call to a MCP command failed, it says tool not found despite the MCP still running.

 │ > Random request , with succesful calls than a failed one.

 ✓ Get Strings by Similarity  {"startIndex":0,"requestedCount":20,"actualCount":20,"totalProcessed":20,"nex...

 ✗ Execution failed: Tool not found: Ghidra-get-symbols-by-similarity

 │ > Random request right after the execution failed                                                                                                                                            
 
 ✗ Model call failed: {"message":"messages.6: `tool_use` ids were found without `tool_result` blocks immediately after: toolu_01QUTxKsiPsfYjKD9eA91PP4. Each `tool_use` block must have a corresponding `tool_result` block in the next message.","code":"invalid_request_body"} (Request ID: D960:126657:B0F51A:C71455:68EF7EEA)

Tried to exit and resume but every request gets the "Model call failed" error message.

Should I provide the session logs file here ? ( 36 000 lines )

Affected version

0.0.340

Steps to reproduce the behavior

Not sure how to reproduce because the call failed after multiple successful ones.

Expected behavior

No response

Additional context

  • Operating System: Windows 11 24H2
  • Powershell 7
  • Node v22.12.0
  • MCP running on http
  • Model: Claude Sonnet 4.5

Activity

  1. added theissue type on Oct 15, 2025
  2. williammartin commented on Oct 15, 2025

    @williammartin

    Yikes! I think I know what's going on here but if you can provide the logs from:

    Random request , with succesful calls than a failed one.

    Onwards, that would be useful.


    I also think that it should clear up if you close copilot and reopen it with --continue, not that that is a fix, just a useful indicator.

  3. 0xHarlan commented on Oct 15, 2025

    @0xHarlan
    Author

    Sorry but I realized the session log file didn't log anything from today. It ends at: 2025-10-14T13:29:36 (yesterday). I don't have the folder right now with me so I can't verify if there are other log files related to it. ( I didn't start the session with --log-level all ).

    However I realized the failed call: Ghidra-get-symbols-by-similarity. Isn't actually in the tool list from the MCP. So the model tried to call a tool that doesn't exist and it seems like it bricked the session.


    Thank you for the continue tip !

  4. williammartin commented on Oct 15, 2025

    @williammartin

    However I realized the failed call: Ghidra-get-symbols-by-similarity. Isn't actually in the tool list from the MCP. So the model tried to call a tool that doesn't exist and it seems like it bricked the session.

    Yeh I just opened a PR for this. We were being a bit strict on the validation here, bailing out in the UI layer rather than letting the chat loop indicate this issue to the LLM. Should be fixed tomorrow, though might be hard for you to replicate! Thanks a lot for the report.

  5. williammartin commented on Oct 15, 2025

    @williammartin

    Just for future reference, we have some logic on startup that checks the chat history and cleans up any orphaned tool calls requests, because the LLM gets mad if you try to continue the conversation without responding to a tool call request, and it's easy to end up in that state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions