Skip to content

[BUG] Claude Desktop macOS requires quitting twice (Cmd+Q → wait → system Dock pop-up menu Quit) #14951

@hire-mlcatlin

Description

@hire-mlcatlin

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

Note: This is a Claude Desktop bug, not Claude Code CLI.

Claude Desktop on macOS enters a zombie state after pressing Cmd+Q:

  1. Press Cmd+Q → Window closes but app keeps running (visible in Dock)
  2. App becomes completely non-functional:
    • Cmd+Q no longer responds AT ALL
    • Cannot open new conversations
    • Cannot open Settings
    • Cannot spawn any new windows
    • Clicking Dock icon does nothing
  3. ONLY way to quit: Right-click Dock icon → "Quit" from context menu

The app is stuck in a broken state where it has closed all windows, disabled normal quit handling, and cannot recover or terminate normally. Only the Dock context menu quit (which likely uses a different code path) can kill the process.

Additionally, app initialization runs twice on every launch (two identical "Starting app" log entries at the same timestamp).

What Should Happen?

Pressing Cmd+Q once should quit the app cleanly. If cleanup is needed, the app should either:

  1. Complete cleanup and auto-quit, OR
  2. Remain functional (windows open, responsive) until cleanup completes

The app should NEVER enter a non-functional zombie state where it's running but completely unresponsive to user interaction.

Error Messages/Logs

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

=== FIRST Cmd+Q (app enters zombie state) ===
2025-12-21 02:07:25 [info] beforeQuit handler fired, going down
2025-12-21 02:07:25 [info] willQuit handler is not yet run, preventing quit and cleaning things up
2025-12-21 02:07:25 [info] Starting onQuitCleanup
2025-12-21 02:07:25 [info] Running onQuitCleanup: mcp-shutdown
2025-12-21 02:07:25 [info] Running onQuitCleanup: quick-entry-cleanup
2025-12-21 02:07:25 [info] Running onQuitCleanup: prototype-cleanup
2025-12-21 02:07:25 [info] Successfully run onQuitCleanup: quick-entry-cleanup
2025-12-21 02:07:25 [info] Successfully run onQuitCleanup: prototype-cleanup
2025-12-21 02:07:25 [info] Successfully run onQuitCleanup: mcp-shutdown
2025-12-21 02:07:25 [info] Successully ran all onQuitCleanup handlers, marking readyForQuit
[APP NOW IN ZOMBIE STATE - Cmd+Q ignored, no windows, completely unresponsive]

=== DOCK RIGHT-CLICK QUIT (only way to actually quit) ===
2025-12-21 02:07:30 [info] beforeQuit handler fired, going down
2025-12-21 02:07:30 [info] willQuit handler is ready for quit, so quitting

=== ALSO: Double initialization on every launch ===
2025-12-21 02:02:56 [info] Starting app { appVersion: '1.0.2339', ... }
2025-12-21 02:02:56 [info] Starting app { appVersion: '1.0.2339', ... }

Steps to Reproduce

  1. Install Claude Desktop on macOS (tested on Tahoe 26.2, arm64)
  2. Launch the app
  3. Press Cmd+Q to quit
  4. Observe: Window closes but app remains in Dock
  5. Try ANY of these - ALL FAIL:
    • Cmd+Q again → No response
    • Click Dock icon → Nothing happens
    • Cmd+N for new conversation → Nothing
    • Try to open Settings → Nothing
  6. Right-click Dock icon → Select "Quit" → App finally terminates

The app is in a completely broken zombie state after step 4. Only Dock context menu quit works.

Verified on:

  • Fresh install after complete uninstall (removed all ~/Library data)
  • With and without MCP servers configured
  • Multiple versions (1.0.1307, 1.0.2339)

Claude Model

None

Is this a regression?

I don't know

Last Working Version

Unknown - bug present in all versions I've tested (1.0.1307, 1.0.2339)

Claude Code Version

N/A - This bug is in Claude Desktop app, not Claude Code CLI. Claude Desktop version: 1.0.2339

Platform

Other

Operating System

macOS

Terminal/Shell

Other

Additional Information

Environment

  • macOS Tahoe 26.2 (arm64 / Apple Silicon)
  • Claude Desktop 1.0.2339
  • Node.js 22.21.1 (bundled with app)

Severity: HIGH

This completely breaks the standard macOS app lifecycle. Users cannot:

  • Quit normally via Cmd+Q
  • Continue using the app after attempting to quit
  • Do anything except force-quit via Dock context menu

Root Cause Analysis

The Electron beforeQuit handler:

  1. Closes all windows
  2. Runs cleanup
  3. Sets readyForQuit flag
  4. Does NOT call app.quit()
  5. Does NOT keep app in usable state
  6. Apparently blocks/ignores subsequent Cmd+Q events entirely

The app is left in an invalid state: windowless, non-functional, but still running. Only the Dock's quit mechanism (possibly using app.terminate() or similar) can kill it.

Suggested Fix

Either:
A) Call app.quit() immediately after cleanup completes, OR
B) Don't close windows until actually quitting, OR
C) Keep app functional until quit completes

Related

Filing Note

I know this template is for Claude Code CLI, but web search indicated Claude Desktop bugs should be filed here with "external" label. Please tag appropriately.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingexternalhas reproHas detailed reproduction stepsoncallplatform:macosIssue specifically occurs on macOS

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions