Problem
When using background agents (e.g., launching 10 parallel review agents), Claude Code triggers the terminal bell/notification after its initial response — "agents launched, waiting for results." This fires the same notification as when Claude is truly idle and waiting for user input.
As a user, I get pinged repeatedly for intermediate status messages while agents are still running in the background. The only notification I care about is when all work is truly done and Claude needs my input.
Current behavior
Notification hook fires whenever Claude responds, regardless of whether background agents are still running
- No way to distinguish "waiting with active background tasks" from "genuinely idle, needs user input"
- Terminal bell (iTerm/other terminals) treats both the same
Proposed solution
Add a BackgroundTasksIdle event (or similar) that fires only when all background agents/tasks have completed and Claude is genuinely waiting for user input. This would allow users to:
- Suppress notifications for intermediate "agents launched" messages
- Only get pinged when they actually need to look at the screen
- Configure hooks that distinguish between "busy-waiting" and "done"
Alternatively, expose background task state in the Notification hook context so users can filter with a matcher.
Workaround
Currently the only workaround is disabling notification sounds entirely (macOS System Settings → Notifications → iTerm2 → Sound off), which also silences legitimate completion notifications.
Context
This becomes especially noticeable when using patterns like:
- Launching multiple parallel agents for research/review
- Running long background commands with
run_in_background
- Any workflow where Claude responds "started X, waiting..." before the real result arrives
🤖 Generated with Claude Code
Problem
When using background agents (e.g., launching 10 parallel review agents), Claude Code triggers the terminal bell/notification after its initial response — "agents launched, waiting for results." This fires the same notification as when Claude is truly idle and waiting for user input.
As a user, I get pinged repeatedly for intermediate status messages while agents are still running in the background. The only notification I care about is when all work is truly done and Claude needs my input.
Current behavior
Notificationhook fires whenever Claude responds, regardless of whether background agents are still runningProposed solution
Add a
BackgroundTasksIdleevent (or similar) that fires only when all background agents/tasks have completed and Claude is genuinely waiting for user input. This would allow users to:Alternatively, expose background task state in the
Notificationhook context so users can filter with a matcher.Workaround
Currently the only workaround is disabling notification sounds entirely (macOS System Settings → Notifications → iTerm2 → Sound off), which also silences legitimate completion notifications.
Context
This becomes especially noticeable when using patterns like:
run_in_background🤖 Generated with Claude Code