Bug: Background Bash Job Status Never Updates in System Reminders

Resolved 💬 3 comments Opened Oct 30, 2025 by jdrowne Closed Oct 30, 2025

Issue Summary

When background bash jobs are created using the Bash tool with run_in_background: true, the system reminder generator continues to report these jobs as (status: running) indefinitely, even after the jobs have completed, been killed, or terminated naturally.

Technical Details

Observed Behavior:

  1. Background bash jobs are created via the Bash tool with run_in_background: true
  2. Jobs execute and eventually complete or are terminated via the KillShell tool
  3. The BashOutput tool correctly reports job status as <status>completed</status> or <status>killed</status>
  4. However, system reminders continue to report the same jobs as (status: running) perpetually

Expected Behavior:

  • System reminders should reflect the actual current status of background jobs
  • Once a job completes or is killed, reminders should either:
  • Stop being generated, OR
  • Update to show (status: completed) or (status: killed)

Evidence from Current Session

In the current session, 45+ background bash jobs were created for workflow monitoring purposes. Despite these jobs having completed hours ago, the system continues generating reminders for all 45+ jobs at every tool invocation.

Example demonstrating the discrepancy:

Background Job ID: 77c6c3

  • BashOutput result: <status>killed</status> ✓ (Correct)
  • System reminder: (status: running) ✗ (Incorrect)

Impact

Severity: Medium-High

This issue causes:

  1. Token waste: Each reminder consumes tokens, with 45+ reminders appearing repeatedly throughout sessions
  2. Context pollution: Outdated information clutters the AI's working context
  3. User confusion: Users observe 'zombie processes' that appear unkillable
  4. Session degradation: Long sessions become increasingly burdened with stale reminders
  5. Inability to clean up: No available tool or method can clear these outdated reminders

Reproduction Steps

  1. Use the Bash tool with run_in_background: true to create multiple background jobs with long-running loops
  2. Allow jobs to execute for several minutes
  3. Terminate jobs using KillShell tool or allow them to complete naturally
  4. Observe using BashOutput that jobs report <status>completed</status> or <status>killed</status>
  5. Note that system reminders continue reporting (status: running) for the same job IDs

Proposed Solutions

Option 1 (Preferred):

  • Update system reminder generator to query actual job status before generating reminders
  • Only generate reminders for jobs with status: running or pending
  • Suppress reminders for jobs with status: completed, killed, or failed

Option 2:

  • Implement time-based cleanup: Stop generating reminders for jobs older than X minutes/hours
  • Assume jobs that haven't been queried recently are no longer relevant

Option 3:

  • Provide a tool or command to manually clear completed background job reminders
  • Allow the AI to request reminder cleanup when appropriate

Environment

  • Model: Claude Sonnet 4.5 (claude-sonnet-4-5-20250929)
  • Platform: Claude Code (VSCode Extension)
  • Session Duration: ~4+ hours
  • Background Jobs Created: 45+
  • All jobs monitoring GitHub Actions workflows

Additional Notes

  • The AI has no direct control over system reminder generation
  • Standard OS-level tools (sudo, kill, pkill) cannot address this issue as these are not OS processes
  • The KillShell tool successfully terminates jobs but does not update the reminder system's internal state

Thank you for investigating this issue.

View original on GitHub ↗

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