Background Bash system-reminders persist after process completion and output retrieval
Resolved 💬 5 comments Opened Nov 24, 2025 by ActaVerba Closed Jan 27, 2026
Description
When using run_in_background: true with the Bash tool, system-reminders about background processes persist indefinitely even after:
- The process has completed (exit_code=0)
- Output has been retrieved via
BashOutput KillShellhas been attempted (correctly reports "Shell is not running, status: completed")
The reminders appear with every subsequent tool response for the remainder of the session.
Steps to Reproduce
- Run two Bash commands with
run_in_background: true:
Bash("python script.py", run_in_background=true) # ID: 46410c
Bash("python script2.py", run_in_background=true) # ID: 456b2e
- Wait for processes to complete
- Retrieve output with
BashOutput:
BashOutput(bash_id="46410c") # Returns status: completed, exit_code: 0
BashOutput(bash_id="456b2e") # Returns status: completed, exit_code: 0
- Attempt cleanup with
KillShell:
KillShell(shell_id="46410c") # Returns: "Shell is not running, status: completed"
KillShell(shell_id="456b2e") # Returns: "Shell is not running, status: completed"
- Make any subsequent tool call
Expected Behavior
System-reminders should stop appearing after:
- Process completes AND output is retrieved via
BashOutput, OR KillShellis called on a completed process
Actual Behavior
System-reminders continue appearing with every tool response:
<system-reminder>
Background Bash 46410c (command: ...) (status: running) Has new output available.
You can check its output using the BashOutput tool.
</system-reminder>
<system-reminder>
Background Bash 456b2e (command: ...) (status: running) Has new output available.
You can check its output using the BashOutput tool.
</system-reminder>
Issues with the reminders:
- Status shows "running" when process is actually "completed"
- Reminders persist after output has been read
- Reminders persist after KillShell attempt
- No way to dismiss/clear them
Impact
- Token waste: Each reminder consumes ~50 tokens, repeated with every tool call
- Context pollution: Stale reminders clutter the conversation
- User confusion: Status shows "running" for completed processes
- Workaround required: Users must avoid
run_in_backgroundentirely
Environment
- Claude Code CLI
- Windows 11
- Model: claude-opus-4-5-20250514
Suggested Fix
The background bash tracker should:
- Mark processes as "acknowledged" after
BashOutputretrieves completed output - Stop generating reminders for acknowledged/completed processes
- Show accurate status ("completed" not "running") in reminder text
- Provide a way to explicitly dismiss reminders (e.g.,
AcknowledgeBashtool)
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗