[BUG] Background shell status inconsistency: killed shell still triggers system reminders

Resolved 💬 3 comments Opened Oct 25, 2025 by zmx48479 Closed Oct 28, 2025

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

A background shell that has been killed continues to trigger <system-reminder>
notifications, causing the AI assistant to repeatedly attempt to read its output
despite explicit user instructions to ignore it.

What Should Happen?

Once a shell is killed:

  • It should be removed from system reminders
  • AI should not receive notifications about it
  • Shell should be cleaned up from active monitoring

Error Messages/Logs

Steps to Reproduce

  1. Start a background bash task (e.g., using run_in_background: true)
  2. Kill the shell using KillShell tool
  3. Verify shell status shows <status>killed</status>
  4. Send new user messages in the conversation
  5. Observe that system reminders still mention this killed shell having "new output"
  6. AI assistant repeatedly tries to check the dead shell's output

Claude Model

Sonnet (default)

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

Claude Code for VS Code 2.0.26

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

VS Code integrated terminal

Additional Information

This reveals a state synchronization issue between:

  1. Shell status tracking (correctly marks as "killed")
  2. System reminder generation (incorrectly treats as active)

Root cause: Killed shells are not properly removed from the reminder
generation pipeline.

Suggested fix: When shell reaches "killed" status, stop generating
system reminders for it and remove from active monitoring.

View original on GitHub ↗

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