-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Description
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:
- Press Cmd+Q → Window closes but app keeps running (visible in Dock)
- 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
- 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:
- Complete cleanup and auto-quit, OR
- 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
- Install Claude Desktop on macOS (tested on Tahoe 26.2, arm64)
- Launch the app
- Press Cmd+Q to quit
- Observe: Window closes but app remains in Dock
- 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
- 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:
- Closes all windows
- Runs cleanup
- Sets
readyForQuitflag - Does NOT call
app.quit() - Does NOT keep app in usable state
- 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
- Similar double-execution pattern reported in Claude Code hooks: Claude Code Hook Events Fired Twice When Running from Home Directory #3465
- This may share root cause with the double "Starting app" initialization
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.