Dock/menu-bar badge count does not match Agents sidebar needs-attention (Glass)

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

macOS Dock badge and menu-bar icon show 1, while the Agents sidebar shows many more agents that need attention (approvals / completed work I have not handled). These are not one stale counter; they are independent Glass workbench counters. Live 2026-08-20: Dock StatusLabel=1, tray hasNotifications true, sidebar much larger.

Steps to Reproduce

  1. Use Agents Window (Glass), System Notifications and Menu Bar Icon on.
  2. Run several agents while Cursor stays focused. Let some hit Allow/Deny and some complete.
  3. Sidebar shows many needs-attention rows.
  4. Dock/menu bar stays 0 or a small number (here: 1).
  5. Unfocus Cursor, let one agent need approval, return: Dock=1 while sidebar is still much higher.

Expected Behavior

Dock + menu-bar numeric badge should equal Agents sidebar needs_attention count (blocking approval, pending plan, or completed-and-unseen). Clicking the badge should list the same agents. Or document that OS badges are focus-only and never meant to match.

Operating System

MacOS

Version Information

Version: 3.16.29
Release Track: stable
OS: darwin 25.4.0 (arm64)
Layout: Agents Window / Glass (unifiedAppLayout = agent)
Settings: System Notifications = on, Menu Bar Icon = on

For AI issues: which model did you use?

N/A - not an AI-response bug

For AI issues: add Request ID with privacy disabled

N/A - not an AI-response / background-agent request issue

Additional Information

Root cause in 3.16.29 workbench.glass.main.js: sidebar needs_attention (lAh) uses hasBlockingPendingActions/hasPendingPlan and ignores focus. Dock badgeCounts skips increment when hostService.hasFocus, and Glass never badges on onChatStreamFinished. Tray unread (DYk) is a third set and drops subagents/task-*/archived/Best-of-N. Focused Glass fills the sidebar and mostly does not update Dock. Ask: drive Dock + menu-bar from the same needs_attention predicate.

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey @Scott_Hsu, thanks for the detailed report!

What you’re seeing is currently intentional: the Dock and menu-bar numbers count agents with activity you haven’t seen yet (mainly things that finish or need approval while Cursor is unfocused), while the sidebar’s needs-attention rows reflect the live state of agents blocked on approvals or pending plans, regardless of focus!

Not ideal that we’re telling two different stories. Will share your feedback with the team!