[BUG] Chrome extension sidepanel orphaned processes keep making API calls after close — cost $95 in unintended usage
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?
Claude Code Chrome extension spawns claude subprocesses for each sidepanel chat session. When the sidepanel or tab is closed, these processes are NOT
terminated. They continue running indefinitely in the background, making streaming API calls to claude-sonnet-4-5 24/7.
I discovered 6+ orphaned processes that had been running for days, accumulating ~$95 in unintended API usage. The processes were making requests every few
seconds with 9k-165k input tokens each.
The orphaned processes look like:
claude --output-format stream-json --verbose --input-format stream-json --model claude-sonnet-4-5 --resume fefdc608-84a7-4534-96f8-38389d02f145
--disallowedTools Bash,Read,Write,Edit,Grep,Glob,WebFetch,WebSearch,Task,NotebookEdit,AskUserQuestion,TodoWrite --setting-sources --permission-mode default
Multiple processes were resuming the same session ID simultaneously.
What Should Happen?
When a Chrome sidepanel chat is closed, the spawned claude subprocess should be terminated immediately. No background API calls should continue after the
session UI is closed.
Error Messages/Logs
No errors — the processes run silently in the background. Only discoverable via `ps aux | grep claude-sonnet`.
Anthropic API dashboard showed continuous streaming requests from session fefdc608-84a7-4534-96f8-38389d02f145 every few seconds, all
claude-sonnet-4-5-20250929, "Default" workspace.
Steps to Reproduce
- Open Claude Code Chrome extension sidepanel
- Start a chat session (uses claude-sonnet-4-5 by default)
- Close the sidepanel tab or navigate away
- Run
ps aux | grep "claude-sonnet"in terminal - The claude subprocess is still running and making API calls
- Repeat steps 1-3 several times — processes accumulate
- Check Anthropic API usage dashboard — continuous streaming requests from orphaned sessions
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
Claude Code Version: 2.1.32
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
- Processes required
kill -9to terminate — regularkillwasn't enough for some - 6 orphaned processes found spanning multiple days (some from Feb, some from March 2026)
- Total unintended cost: ~$95 USD in one day
- Workaround: periodically run
ps aux | grep "claude-sonnet" | grep -v grep | awk '{print $2}' | xargs kill -9 - The --resume flag suggests the extension tries to resume sessions even after UI is closed
- Multiple processes were resuming the SAME session ID simultaneously, doubling the cost
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗