When a Claude Code agent needs input, two notifications can fire for the same event: the agent's own OSC 9 desktop notification and the hook-driven rich notification (OSC 3008). They are deduped by timing in WorktreeTerminalState.handleAgentOSCNotification, and in practice the OSC 9 one usually wins. That is the worse of the two: its title is just the tab title (the truncated first prompt, e.g. "Check Supacode memory us…") and its body is the fixed string "Claude is waiting for your input" — no detail about what the agent is asking. The richer hook payload (which can carry last_assistant_message) gets dropped. So the surviving notification is consistently the least informative one.
Proposed solution
Make the dedupe prefer content over timing: when both paths represent the same event for a surface, keep the hook notification and drop the OSC 9 one, rather than letting whichever committed first win. A small, contained change in handleAgentOSCNotification / appendHookNotification. Happy to align on the exact tie-break rule.
Alternatives considered
Supacode version
0.10.6
Are you planning to build this yourself?
Yes — I intend to open a pull request once this is approved and marked ready.
When a Claude Code agent needs input, two notifications can fire for the same event: the agent's own OSC 9 desktop notification and the hook-driven rich notification (OSC 3008). They are deduped by timing in
WorktreeTerminalState.handleAgentOSCNotification, and in practice the OSC 9 one usually wins. That is the worse of the two: its title is just the tab title (the truncated first prompt, e.g. "Check Supacode memory us…") and its body is the fixed string "Claude is waiting for your input" — no detail about what the agent is asking. The richer hook payload (which can carrylast_assistant_message) gets dropped. So the surviving notification is consistently the least informative one.Proposed solution
Make the dedupe prefer content over timing: when both paths represent the same event for a surface, keep the hook notification and drop the OSC 9 one, rather than letting whichever committed first win. A small, contained change in
handleAgentOSCNotification/appendHookNotification. Happy to align on the exact tie-break rule.Alternatives considered
muteNotificationsForActiveSurface(only covers the focused surface).Supacode version
0.10.6
Are you planning to build this yourself?
Yes — I intend to open a pull request once this is approved and marked
ready.