Background task manager system-reminders persist after task completion
Resolved 💬 4 comments Opened Nov 29, 2025 by ibarani Closed Feb 4, 2026
Bug Description
Background task system-reminders continue to show "Has new output available" for tasks that have already completed. This creates confusion as the user sees 40+ tasks listed as "running" when they have actually finished.
Steps to Reproduce
- Start multiple background tasks using
run_in_background: true - Wait for tasks to complete
- Observe that system-reminders continue to show "Has new output available" for completed tasks
- Use
KillShelltool - it confirms tasks havestatus: completedorstatus: killed - However, the system-reminders persist indefinitely
Expected Behavior
- When a background task completes, its system-reminder should be cleared automatically
- The task status should be reflected in the UI/reminders
- Completed tasks should not continue showing "Has new output available"
Actual Behavior
- System-reminders persist indefinitely after task completion
- Even after calling
KillShell, the reminders remain visible - Reminders survive conversation compactions
- Users see dozens of "running" tasks that are actually completed
Root Cause Analysis
Based on first-principles debugging:
- Task Status Layer (Working): The internal task manager correctly tracks completion status.
KillShellconfirms tasks arestatus: completed.
- Notification Layer (Broken): The system-reminder mechanism is not synchronized with the task status. Notifications are generated when tasks are created but never cleared when tasks complete.
- Orphan OS Processes: Some bash shells remain as orphan processes because:
- Shells are spawned with stdin pipe held open
- No
process.poll()orprocess.wait()calls to detect completion - No timeout enforcement
Evidence
KillShell 146400 → "Shell is not running, status: killed"
KillShell fd4f29 → "Shell is not running, status: killed"
KillShell fbdacc → "Shell is not running, status: completed"
...
# Yet system-reminders still show all 40+ tasks as "running"
Environment
- Claude Code (CLI)
- Linux 6.8.0-88-generic
- Long-running session with multiple background tasks
Suggested Fix
The notification/reminder system should:
- Poll task completion status before generating reminders
- Clear reminders when tasks complete
- Add a timeout mechanism for stale reminders
- Provide a way to manually clear all completed task reminders
Workaround
Currently, users must:
- Manually call
KillShellon each task ID - Kill orphan OS processes with
kill -9 <pid> - Start a new Claude Code session to clear stale reminders
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗