Background process reminders persist as 'running' after conversation continuation despite being completed

Resolved 💬 3 comments Opened Dec 8, 2025 by brandythesummit-ai Closed Dec 12, 2025

Summary

When a Claude Code conversation is continued (via context summarization), background process system reminders persist showing (status: running) even though the actual processes have completed. This causes significant token waste and user confusion.

Reproduction Steps

  1. Start a Claude Code session
  2. Run several background processes: Bash(command: "sleep 120", run_in_background: true)
  3. Let them complete naturally
  4. Continue working until context summarization occurs
  5. In the continued conversation, observe system reminders still showing processes as "running"

Expected Behavior

System reminders should either:

  • Not appear for completed processes, OR
  • Show accurate status (status: completed)

Actual Behavior

All background processes from the previous context show as:

Background Bash 734386 (command: sleep 180...) (status: running) Has new output available.

Even though:

  • jobs command shows no running processes
  • KillShell returns: "Shell 734386 is not running, so cannot be killed (status: completed)"

Evidence

I ran KillShell on 27 "running" processes. Every single one returned "status: completed" or "status: killed":

KillShell(734386) → "status: completed"
KillShell(898239) → "status: completed"
KillShell(8ccb12) → "status: completed"
... (24 more, all completed)

Yet the very same response included 27 system reminders all saying "(status: running)".

Root Cause Analysis

The system reminder generator appears to read from stale conversation context state rather than querying the actual shell tracking system that KillShell uses.

┌─────────────────────┐       ┌─────────────────────────────┐
│ Shell Tracking      │       │ Conversation Context        │
│ System              │       │ (Persists across sessions)  │
│                     │       │                             │
│ Knows real status:  │  ✗    │ Stores "status: running"    │
│ completed/killed/   │ Never │ at time of capture          │
│ failed              │ syncs │                             │
└─────────────────────┘       └─────────────────────────────┘
         │                               │
         ▼                               ▼
    KillShell tool              System Reminder Generator
    (accurate)                  (uses stale context state)

Impact

  • Token waste: 20-30 reminders × ~75 tokens each = ~2000+ tokens per response
  • User confusion: Reminders suggest processes need attention
  • Failed cleanup attempts: Users/Claude try to kill already-completed processes

Suggested Fix

Before generating system reminders, query the actual shell tracking system (the same one KillShell uses) to get real-time status. Only include reminders for processes that are actually running.

Alternatively: On conversation continuation, validate stored process IDs against actual running processes and clear stale entries.

Environment

  • Claude Code CLI
  • macOS Darwin 24.6.0
  • Model: claude-opus-4-5-20251101

Workaround

Users can add rules to their CLAUDE.md to:

  1. Minimize background process usage
  2. Clean up processes before session ends
  3. Ignore stale reminders in continued sessions

But this doesn't fix the root cause.

View original on GitHub ↗

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