Repository navigation
Description
What happens
With "workspace": { "windows": true }, an AeroSpace workspaces widget showed an icon for a Tailscale window (window 3587) that AeroSpace had already taken off every workspace. Clicking the icon put a ⚠ in the widget with AeroSpace's error:
Window 3587 doesn't belong to any monitor. And thus can't even define a focused workspace
The icon and the ⚠ stayed until focus or the workspace changed.
Steps to reproduce
- Use AeroSpace and a workspaces widget with
"workspace": { "windows": true }. - A window the widget shows leaves AeroSpace's workspaces without a focus change. Here it was Tailscale's window (Tailscale is a menu bar app): macOS still has the window, off screen, but
aerospace list-windows --allno longer lists it. - Click the window's icon in the widget.
The AeroSpace side reproduces on its own: aerospace focus --window-id 3587 prints the message above and exits with status 2.
Expected
Clicking a window that's gone updates the widget: the icon disappears, without a warning. A click that fails for another reason still shows its error.
Environment
- StableBar 0.12.0-beta.20261109161138.786
- macOS 27.2
- AeroSpace 0.21.3-Beta (d56e163)
- Two displays: built-in and an external Dell
Evidence
aerospace focus --window-id 3587: the message above, exit status 2.aerospace list-windows --alldoesn't list 3587;CGWindowListCopyWindowInfostill has it, owned by Tailscale and off screen.
The ⚠ in the widget, with the error as its tooltip:
Diagnosis
Sources/StableBar/Workspaces.swift:focus(_:)runsaerospace focus --window-id IDthroughrun(_:). When the command fails,run(_:)only setserror; it refreshes only for yabai, and only after a command that succeeded. The widget keeps the stale icon, andBarViewshows the error on the ⚠ until the next successfulrefresh().- AeroSpace's
subscribehas no event for a window leaving its workspaces (closed, minimized, hidden or treated as a popup). StableBar listens tofocus-changed,focused-workspace-changed,focused-monitor-changed,window-detectedandmode-changed, so its snapshot stays stale until one of those fires. - AeroSpace gives this message for
--window-idwhen the window has neither a workspace nor a monitor: minimized windows and popups sit in containers outside every workspace (cmdResolveTargetOrReportError.swift,nodeMonitorinTreeNodeEx.swift).list-windows --alllists only windows inside workspaces. - Dragging a stale window (
moveWindows) refreshes after the failure but keeps the error, so the ⚠ stays even though the icon is gone. - yabai and OmniWM go through the same
run(_:), so clicking a stale window there fails the same way.
Proposal
When focusing or moving a window fails, refresh the workspaces. If the window is no longer listed, drop the error, since the icon is gone; otherwise keep it.
Related
- Show each window in workspace widgets, with its title, and focus it on click #73 added per-window icons that focus their window on click.
- feat: move windows by dragging workspace icons #271 added dragging icons between workspaces, with a refresh after each move.
- Consume AeroSpace workspace trees without follow-up snapshot queries #387 (closed) proposed reading AeroSpace's workspace tree from events instead of list queries.
Triaged by Claude Code (Claude Opus 5.5).

Activity
fix: drop a window that left every workspace when clicking it fails
fix: drop a window that left every workspace when clicking it fails
fix: drop a window that left every workspace when clicking it fails
chore(release): 0.12.0 [skip ci]
stablebar-releases commentedon Nov 10, 2026
🎉 This issue has been resolved in version 0.12.0 🎉
The release is available on GitHub release
Your semantic-release bot 📦🚀