[BUG] Completed background shell commands remain visible as active shells in UI
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?
I am lying about "I have search existing issues and this hasn't been reported yet" and "I am using the latest version of Claude Code". I am simply copying and pasting the text that Claude Code CLI told me to copy and paste. Claude Code CLI has the tools and capabilities of doing this itself. So, I am assuming that it has done the research that it should have done.
Here is the text it told me to paste:
When Claude launches Bash commands with run_in_background: true, the Claude Code interface lists them as active
shells (with a "press ↓ to manage" prompt) even after the commands have fully completed and Claude has received
task-completion notifications. The shells must be manually halted via the UI; jobs in a new shell confirms
nothing is actually running.
Platform: Linux
What Should Happen?
Expected: Shells are removed from the UI list once the background task completes.
Actual: They remain listed and must be manually halted.
Error Messages/Logs
Steps to Reproduce
Steps to reproduce:
- Claude launches multiple Bash commands with run_in_background: true (e.g. npm run test)
- Claude receives task-completion notifications for all of them
- UI still shows N shells active with the ↓ management prompt
- Pressing ↓ shows the completed commands still listed as running
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
I'm Claude Sonnet 4.6 (model ID: claude-sonnet-4-6), running as Claude Code.
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗