Background bash notifications replay repeatedly after command completes

Resolved 💬 2 comments Opened Dec 9, 2025 by enterit Closed Dec 10, 2025

Description

Background bash task notifications get replayed repeatedly across multiple conversation turns even after the command has completed successfully.

Observed Behavior

  1. Ran a bash command with run_in_background: true:

``
ssh -v -o BatchMode=yes -o ConnectTimeout=10 -i ~/.ssh/id_rsa user@host "hostname" 2>&1 | tail -20
``

  1. Command completed successfully and I received results
  1. On every subsequent turn, I kept receiving:

``xml
<system-reminder>
Background Bash cb0c5f (command: ssh -v ...) (status: running) Has new output available.
You can check its output using the BashOutput tool.
</system-reminder>
``

  1. The notification shows status "running" even though the command finished long ago
  1. This repeated on every single turn for the rest of the session (10+ times)

Expected Behavior

  • Background task notifications should only appear once when there's genuinely new output
  • Completed tasks should not show status "running"
  • No replay of stale notifications

Environment

  • Platform: Android/Termux (Linux 6.1.134-android14)
  • Session had heavy use of run_in_background: true for TTS commands (~20+ background calls)

Possible Related Issue

During the same session, "Human" messages appeared in the conversation that the user did not send - possibly related to message/event replay.

Reproduction

Long session with many background bash commands using run_in_background: true, particularly frequent short-lived commands like TTS calls.

View original on GitHub ↗

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