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:

  1. The process has completed (exit_code=0)
  2. Output has been retrieved via BashOutput
  3. KillShell has 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

  1. 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
  1. Wait for processes to complete
  1. Retrieve output with BashOutput:
BashOutput(bash_id="46410c")  # Returns status: completed, exit_code: 0
BashOutput(bash_id="456b2e")  # Returns status: completed, exit_code: 0
  1. 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"
  1. Make any subsequent tool call

Expected Behavior

System-reminders should stop appearing after:

  • Process completes AND output is retrieved via BashOutput, OR
  • KillShell is 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:

  1. Status shows "running" when process is actually "completed"
  2. Reminders persist after output has been read
  3. Reminders persist after KillShell attempt
  4. 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_background entirely

Environment

  • Claude Code CLI
  • Windows 11
  • Model: claude-opus-4-5-20250514

Suggested Fix

The background bash tracker should:

  1. Mark processes as "acknowledged" after BashOutput retrieves completed output
  2. Stop generating reminders for acknowledged/completed processes
  3. Show accurate status ("completed" not "running") in reminder text
  4. Provide a way to explicitly dismiss reminders (e.g., AcknowledgeBash tool)

View original on GitHub ↗

This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗