Desktop app Code tab instantly closes app window on macOS 26.5 / Apple A18 Pro
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Clicking the </> Code tab inside the Claude desktop app instantly closes the app window. The Chat tab and Cowork tab work normally — only the Code tab triggers the crash. Reproduces 100% of the time.
The window doesn't show an error or freeze; it just disappears. No crash report is generated in ~/Library/Logs/DiagnosticReports/, in /Library/Logs/DiagnosticReports/, or in ~/Library/Application Support/Claude/Crashpad/{pending,completed}/.
Unified logging via log show --predicate 'process == "Claude"' shows a clean AppKit StateRestoration shutdown (NSPersistentUIManager flushAllChanges → _block_invoke writing records) immediately before exit — no signal, fault, or exception. RunningBoardServices didChangeInheritances appears in the log just before that shutdown sequence.
What Should Happen?
Clicking the Code tab should open the Code interface and allow normal Claude Code usage inside the desktop app. The app window should remain open and responsive.
Error Messages/Logs
Captured by running app from Terminal (/Applications/Claude.app/Contents/MacOS/Claude):
[ERROR:content/browser/indexed_db/instance/leveldb/backing_store.cc:244]
Failed to open LevelDB database from ~/Library/Application Support/Claude/IndexedDB/https_claude.ai_0.indexeddb.leveldb
IO error: .../LOCK: No further details. (ChromeMethodBFE: 15::LockFile::1)
<--- Last few GCs --->
14878 ms: Scavenge (during sweeping) 2025.8 (2057.5) -> 2023.4 (2057.1) MB
15046 ms: Incremental Mark-Compact (reduce) 2037.6 (2068.8) -> 2021.9 (2050.3) MB
[ERROR:electron/shell/common/node_bindings.cc:185]
OOM error in V8: Ineffective mark-compacts near heap limit
Allocation failed - JavaScript heap out of memory
zsh: trace trap /Applications/Claude.app/Contents/MacOS/Claude
Steps to Reproduce
- Launch Claude desktop app
- Sign in (or be already signed in)
- Click the </> Code tab in the app sidebar
- The app window disappears within ~1 second
Reproduces 100% of the time. Persists after full uninstall + clean reinstall of the desktop app and removal of all Library caches/preferences.
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
Desktop app: 1.8089.1 (bug is in the desktop app's embedded Code tab — standalone Claude Code CLI v2.1.146 works perfectly)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
Hardware: Apple A18 Pro, arm64
macOS: 26.5 (build 25F71)
Desktop app version: 1.8089.1
Claude Code CLI (separate install): v2.1.146 — unaffected, works perfectly
ROOT CAUSE: Code tab is exhausting V8's default heap (~2GB). The OOM trap kills the process via SIGTRAP before macOS crash reporting can fire, which is why no crash report appears in DiagnosticReports/ or Crashpad/.
Likely contributing: stale LevelDB LOCK file from previous crashed instance, blocking IndexedDB initialization right before the OOM.
WORKAROUND that resolves the crash:
/Applications/Claude.app/Contents/MacOS/Claude --js-flags="--max-old-space-size=8192"
Suggests the Code tab loads state that exceeds V8's default ~2GB heap on this hardware. Either the heap default needs raising in the app's bundled Electron config, or the Code tab's initial allocation needs trimming.
Mitigations attempted that did NOT resolve:
- Confirmed on latest desktop app version
- Reset ~/Library/Application Support/Claude/
- Full uninstall: removed /Applications/Claude.app plus every com.anthropic.claudefordesktop entry in ~/Library/Preferences/, ~/Library/Preferences/ByHost/, ~/Library/HTTPStorages/, ~/Library/Caches/ (including .ShipIt)
- Fresh reinstall from claude.ai/download
- Re-authenticated from scratch
- Launching with --disable-gpu (causes different crash; GPU is required)
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗