Skip to content

Claude Desktop hangs on quit (Cmd+Q) - requires force quit #16088

Description

@audiovideoron

Bug Report: Claude Desktop Hangs on Quit (Cmd+Q)

Summary

Claude Desktop 1.0.2339 hangs when attempting to quit via Cmd+Q. The quit cleanup handlers complete successfully and readyForQuit is marked, but the app never actually exits. Force quit is required every time.

Environment

  • Claude Desktop Version: 1.0.2339
  • macOS Version: Darwin 24.5.0 (Sequoia)
  • Hardware: Apple Silicon Mac

Steps to Reproduce

  1. Open Claude Desktop
  2. Use the app normally (optional - happens with or without activity)
  3. Press Cmd+Q to quit
  4. App hangs indefinitely - windows may close but process stays alive

Expected Behavior

App should quit cleanly.

Actual Behavior

App hangs. Must force quit via Activity Monitor or pkill -9 -f "Claude.app".

Log Analysis

From ~/Library/Logs/Claude/main.log:

Successful quit (rare):

13:30:59 [info] Successully ran all onQuitCleanup handlers, marking readyForQuit
13:33:15 [info] beforeQuit handler fired, going down
13:33:15 [info] willQuit handler is ready for quit, so quitting

Failed quit (typical):

13:44:58 [info] beforeQuit handler fired, going down
13:44:58 [info] willQuit handler is not yet run, preventing quit and cleaning things up
13:44:58 [info] Starting onQuitCleanup
13:44:58 [info] Running onQuitCleanup: mcp-shutdown
13:44:58 [info] Running onQuitCleanup: quick-entry-cleanup
13:44:58 [info] Running onQuitCleanup: prototype-cleanup
13:44:58 [info] Shutting down MCP Server: tavily
13:44:58 [info] Shutting down MCP Server: repomix
... [all MCP servers shut down successfully]
13:44:58 [info] Successfully run onQuitCleanup: quick-entry-cleanup
13:44:58 [info] Successfully run onQuitCleanup: prototype-cleanup
13:44:58 [info] Successfully run onQuitCleanup: mcp-shutdown
13:44:58 [info] Successully ran all onQuitCleanup handlers, marking readyForQuit
[HANGS HERE - never reaches "willQuit handler is ready for quit, so quitting"]

Additional Issue: Chrome Extension Exacerbates Problem

When "Claude in Chrome" browser extension is active, it triggers MCP reconnection requests during quit:

13:19:35 [info] Successully ran all onQuitCleanup handlers, marking readyForQuit
13:19:39 [info] MCP Server connection requested for: filesystem
13:19:39 [info] Suspending MCP launch due to active quit: filesystem
13:19:39 [info] MCP Server connection requested for: Claude in Chrome
... [all servers try to reconnect]

Disabling the Chrome extension stops the reconnection requests, but the core hang persists.

Process State During Hang

When hung, these processes remain alive:

  • /Applications/Claude.app/Contents/MacOS/Claude (main process)
  • Claude Helper (Renderer) (multiple instances)
  • Claude Helper (GPU)
  • Claude Helper (network utility)
  • MCP server disclaimer wrappers

Root Cause Hypothesis

The Electron app's quit sequence:

  1. beforeQuit fires correctly
  2. onQuitCleanup handlers all complete successfully
  3. readyForQuit is marked
  4. BUG: The code path that should call app.quit() after readyForQuit is never reached
  5. Renderer processes remain alive indefinitely

There appears to be a race condition or missing callback between marking readyForQuit and the actual app.quit() call.

Workarounds

  • Force quit via Activity Monitor
  • pkill -9 -f "Claude.app" from terminal
  • Disabling "Claude in Chrome" extension reduces but doesn't fix the issue

Impact

  • Must force quit every time
  • Potential for orphaned MCP server processes
  • Poor user experience

Requested Fix

Audit the quit handler code path between readyForQuit and app.quit(). Ensure the final quit actually executes after cleanup completes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:mcpbugSomething isn't workingduplicateThis issue or pull request already existsexternalhas reproHas detailed reproduction stepsplatform:macosIssue specifically occurs on macOSstaleIssue is inactive

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions