[FEATURE] Add setting to disable automatic background task completion notifications
Problem
When a background command completes, Claude Code automatically injects a notification into the conversation:
⏺ Background command "my-command" completed (exit code 0)
Claude then responds to this with something like "Great, that completed as expected" - wasting tokens on a meaningless response.
This is especially annoying when running games, servers, or other long-running processes that the user manually closes. Every single time, Claude responds to the completion notification even though no response is needed.
Real-World Example
- User asks Claude to run their game for testing
- User plays the game, then closes it
- Claude Code injects:
Background command "Test game" completed (exit code 0) - Claude responds: "The game closed successfully with exit code 0, which is expected..."
- Tokens wasted, user annoyed
Attempted Workarounds That Don't Work
Hooks/Plugins
I attempted to create a plugin using the hooks system (PostToolUse, Notification events) to intercept and suppress these messages. This doesn't work because the notifications are injected at the system/conversation level, bypassing the hooks pipeline entirely.
Environment Variables
There doesn't appear to be an environment variable to disable just these notifications.
Proposed Solution
Add a setting to disable automatic background task completion notifications:
// In ~/.claude/settings.json or via CLI
{
"disableBackgroundTaskNotifications": true
}
Or via CLI:
claude config set --global disableBackgroundTaskNotifications true
Behavior When Enabled
- Background tasks still run normally
- Completion notifications are not injected into the conversation
- Users can still check task status manually via
/tasksorTaskOutputtool - Error/failure notifications could optionally still be shown (or have a separate setting)
Related Issues
- #11716 - Background Bash Processes Cause Infinite System-Reminders and Token Exhaustion
- #12813 - Background shell reminders persist for completed shells
- #13249 - Background shell reminders persist after KillShell
- #12302 - Background Bash system-reminders persist after process completion
Why This Matters
- Token cost: Each unnecessary response wastes tokens
- User experience: Interrupts workflow with useless confirmations
- Context pollution: Fills up context window with noise
Environment
- Claude Code version: latest
- OS: macOS
- Shell: zsh
This issue has 7 comments on GitHub. Read the full discussion on GitHub ↗