[Bug] Phantom shell process counts against 5-hour daily limit after KillShell confirmation
Bug Description
Bug: Phantom background shell counts against 5-hour daily usage limit, blocking work
Background shell tracking bug causes phantom 'running' status after KillShell confirms termination (status: killed). The system-reminder
keeps injecting "Has new output available" messages into every tool response, and Claude Code continues counting this phantom shell against
the user's "5 hour daily max running time" limit.
Impact: This erroneously triggers the usage limit and blocks users from working even though no actual process is running. I lost half a day
of work when the limit was incorrectly triggered.
Evidence:
- Shell ID 4f6822 shows "status: running" in system-reminders
- KillShell returned "status: killed" confirming termination
- System-reminder continues appearing in every subsequent tool call
- Bug persists across tool calls and doesn't self-correct
Expected: Once KillShell confirms termination, the shell should stop being tracked and stop counting against usage limits.
Environment Info
- Platform: darwin
- Terminal: iTerm.app
- Version: 2.0.55
- Feedback ID: 8585cbff-9f9b-4694-910f-7971872c3cbe
Errors
[{"error":"Error: Request was aborted.\n at Bt._createMessage (file:///Users/jkaster/.nvm/versions/node/v24.6.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:463:3151)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-11-28T23:28:54.648Z"},{"error":"Error: Shell 4f6822 is not running, so cannot be killed (status: killed)\n at Object.call (file:///Users/jkaster/.nvm/versions/node/v24.6.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:2842:1830)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n at async Hm5 (file:///Users/jkaster/.nvm/versions/node/v24.6.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:2284:16733)","timestamp":"2025-11-28T23:42:25.329Z"},{"error":"Error: Request was aborted.\n at Bt._createMessage (file:///Users/jkaster/.nvm/versions/node/v24.6.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:463:3151)\n at processTicksAndRejections (node:internal/process/task_queues:105:5)\n at runNextTicks (node:internal/process/task_queues:69:3)\n at process.processTimers (node:internal/timers:540:9)","timestamp":"2025-11-28T23:50:46.438Z"}]This issue has 9 comments on GitHub. Read the full discussion on GitHub ↗