Skip to content

"Claude will return soon" after commands like "list_allowed_directories" #2412

@wikbon

Description

@wikbon

Good time of the day to you!
Posted this issue to Claude Desktop linux fork - was sent here)

I've encountered a bug, when using Claude sandboxed, and trying to do list_allowed_directories - it starts to respond, and i can see a blink of json response that it processes and starts to answer - and in that moment the page crashes into "Claude will return soon" page,
After reload, the conversation is usually Untitled, with no command present until several more reloads of the conversation.

After several reloads I can see that the list_allowed_dirs was succesfull and returned "/home/agent/", but the next command "list_directory" says that there was no result recievied(i'm guessing it's because by that time the "Claude will return soon" has already happened.

here is somewhat correct(and corrected by me) report from Claude Code of our little detective work. Sorry if it is all jumbled a bit, I'm still a newbie in all of this.

● Claude Desktop Crashes with JSON Parsing Error During MCP Command Execution

Summary

Claude Desktop intermittently crashes during MCP (Model Context Protocol) command execution with a JSON parsing error, causing
complete conversation state loss and requiring application reload.

Environment

Claude Desktop Version: 0.12.28 (unpackaged)
Platform: Linux 6.13.8-1-liquorix-amd64
Node Version: 22.17.0
MCP Servers:
    @modelcontextprotocol/server-filesystem v0.2.0
    mcp-server-shell v1.12.1
    @automatalabs/mcp-server-playwright v0.1.0

Bug Description

When executing MCP commands (specifically list_allowed_directories), Claude Desktop intermittently crashes with a JSON parsing error.
The crash completely deletes the conversation history and displays "Claude will return soon. Claude is currently experiencing a
temporary service disruption" message, requiring a Ctrl+R reload.

Steps to Reproduce

Configure Claude Desktop with MCP servers in sandboxed mode
Start a conversation and request MCP command execution (e.g., "list available directories")
Command begins execution and partial response may appear
System crashes with JSON parsing error
Conversation is shown to be completely empty/reset - but later, after restarts and reloads - the conversation is shown, with response for list_allowed_directories being recieved, but
Application shows service disruption message

Note: Issue is intermittent - sometimes works fine, but can recur unpredictably, have not found any reliable pattern.

Error Evidence

Primary Crash Error (window.log)

2025-07-23 20:15:17 [error] SyntaxError: Unexpected non-whitespace character after JSON at position 111 (line 1 column 112)

Secondary Errors (main.log)

2025-07-23 20:19:43 [error] Failed to show toast: {
error: Error at t (/usr/lib/claude-desktop/app.asar/.vite/build/index-DnTkTCJF.js:35:71901)
message: 'Timeout has occurred',
name: 'TimeoutError'
}

Contributing Issues

Missing Claude CLI SDK: Cannot find package '@anthropic-ai/claude-cli'
Multiple Content Security Policy violations
ServiceWorker registration failures

Timeline Analysis

20:15:11 - Last successful MCP command execution
20:15:17 - JSON parsing error crashes conversation
20:19:41 - Ctrl+ R Pressed - All MCP servers disconnect
20:19:42 - Application restart/reload
20:21:45 - Same command executes successfully after restart

MCP Server Behavior

All MCP servers show identical disconnection pattern:
Server transport closed unexpectedly, this is likely due to the process exiting early

Root Cause Analysis

The issue appears to be a state-dependent bug in Claude Desktop's JSON-RPC communication layer:

JSON Response Corruption: MCP server responses get malformed during transmission/processing
Parser Failure: Corrupted JSON causes parsing error at specific character positions
Cascade Failure: JSON parser crash destabilizes entire conversation state
State Loss: Conversation appears "deleted" due to complete state reset - thouh after reloads the conversation can be viewd, with Claude saying that there might be issues with file system tools
Recovery: Fresh restart clears corrupted state, allowing normal operation

Impact

Intermittent: Difficult to reproduce consistently, making debugging challenging

Expected Behavior

MCP commands should execute reliably without corrupting JSON responses or causing conversation state loss, regardless of system state
or timing conditions.

mcp.log
mcp-server-filesystem.log
mcp-server-sandbox.log
[email protected]
main.log
window.log

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions