[BUG] macOS: main window left at Floating level (layer=3) after Computer Use side panel restores

Status Open
Maintainer reply None cached
Activity 1 comment · opened Sep 2, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet (see "Related issues" below — the macOS report #66516 was closed as invalid without a root cause; this report adds concrete evidence and a likely code path)
  • [x] This is a single bug report
  • [x] I am using the latest version of Claude Code

What's Wrong?

On macOS the Claude Code desktop app's main window is left at the Floating window level (kCGWindowLayer = 3) after a Computer Use session ends. From then on the main window stays above every other app on the same Space, even after clicking into other apps. There is no user-facing setting to turn this off, and the app's own preference files contain no always-on-top key.

Ground truth, read via CGWindowListCopyWindowInfo while the app was idle (no Computer Use session running):

num=26927 layer=3 alpha=1 name= bounds={Height=869; Width=1512; X=49; Y=38;}

layer=3 is NSFloatingWindowLevel. A normal document window is layer=0. The bounds are the full-size main window, not the small docked side panel, so this is the restored window still carrying the floating level.

What Should Happen?

After Computer Use releases the desktop-control lock, the main window should return to the normal window level (layer=0) and normal z-ordering, exactly like it was before the session.

Error Messages/Logs

~/Library/Logs/Claude/main.log shows a stealth relaunch for an auto-update at 12:15, then four dock/restore cycles of the Computer Use side panel in the afternoon. All pairs are balanced, yet the window is still floating the next day:

2026-09-01 12:15:36 [info] [stealth-relaunch] otherAppFullScreen=false
2026-09-01 12:15:57 [info] [stealth-relaunch] Detected via marker file (windowVisible=true, windowMinimized=false, otherAppFullScreen=false)
2026-09-01 12:15:57 [info] [updater] Previous update install succeeded (1.40609.0 -> 1.40609.1)
2026-09-01 17:05:45 [info] [cu-side-panel] docked
2026-09-01 17:09:35 [info] [cu-side-panel] restored
2026-09-01 17:11:13 [info] [cu-side-panel] docked
2026-09-01 17:12:12 [info] [cu-side-panel] restored
2026-09-01 17:13:59 [info] [cu-side-panel] docked
2026-09-01 17:17:47 [info] [cu-side-panel] restored
2026-09-01 17:18:06 [info] [cu-side-panel] docked
2026-09-01 17:22:34 [info] [cu-side-panel] restored

No further [cu-side-panel] entries on 2026-09-02, when the floating level was measured.

Steps to Reproduce

  1. macOS, Claude desktop app 1.40609.1. Let the app auto-update / stealth-relaunch (or just have it running).
  2. Start a Claude Code session and let it use Computer Use (request_access / full control), so the main window docks into the side panel.
  3. Let the session release control (window "restores" to its previous size).
  4. Cmd+Tab or click into another app on the same Space.
  5. The Claude window stays above the other app. Confirm with CGWindowListCopyWindowInfo: the main window reports kCGWindowLayer = 3.

Workaround: fully quit the app (Cmd+Q) and relaunch. Merely closing the window does not help.

Likely cause (from reading the bundled main-process code)

In app.asar, the Computer Use side panel helper ([cu-side-panel]) does, on macOS:

  • dock: setAlwaysOnTop(true, 'floating') + setVisibleOnAllWorkspaces(true, ...), after saving wasAlwaysOnTop: e.isAlwaysOnTop()
  • restore: TCr(e, n.wasAlwaysOnTop) — i.e. it writes back whatever isAlwaysOnTop() returned at dock time.

Separately, [stealth-relaunch] shows the restored window with setAlwaysOnTop(true, 'normal', -1) and only clears it in a one-shot once('focus') handler. If that handler has not fired (or isAlwaysOnTop() is still true for any other reason) when Computer Use docks, wasAlwaysOnTop is captured as true, and every subsequent restore re-applies setAlwaysOnTop(true, 'floating') — which is exactly the level observed. Once captured, the state is sticky across further dock/restore cycles until the process exits.

Suggested fix: on restore, only re-apply always-on-top if the window was floating because of a user-visible feature, or explicitly setAlwaysOnTop(false) when the saved level was the transient stealth-relaunch one; and make the stealth-relaunch clear-on-focus robust (e.g. also clear on show/timeout).

Related issues

  • #66516 — same macOS symptom, closed as invalid (27 comments, still receiving reports as of 2026-09-01)
  • #89467 — Windows counterpart (WS_EX_TOPMOST left set), open
  • #91230 — macOS Computer Use moving/maximizing the window; same subsystem

Claude Model

None

Is this a regression?

I don't know

Claude Code Version

Desktop app 1.40609.1 (bundled CLI 2.1.255)

Platform

Claude Desktop app (macOS)

Operating System

macOS (Darwin 25.5.0)

Terminal/Shell

Claude Code desktop app

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗