What this thread does
Claude Code 2.1.316 includes a macOS/Linux self-exit cleanup fix according to Anthropic, while Anil-Premlall still reports orphaned Windows pipelines on that version (release, #106483).
Do first: on an affected Windows machine, check whether tail.exe and grep.exe from an ended session remain running without their parent, the concrete condition in Anil-Premlall's report (November 1). To reproduce the reported watcher case in Git Bash, start tail -f file | grep pattern as a background job, then end the session before inspecting the processes.
Diagnostic: background pipelines survive session exit
Anil-Premlall describes “background tail -f | grep pipelines outlive their Claude Code session as orphans” in anthropics/claude-code #106483. The reported environment is Claude Code CLI 2.1.316, Windows 11 Pro 10.0.26300, Git Bash (issue).
Evidence: Anthropic's released change is platform-specific; the Windows issue remains open and its follow-up comes from the same reporter (release, issue).
Not for: a background agent continuing to spend its usage budget; see background-test-loop-kept-spending-after-usage-limit.
Findings
- What shipped: ashwin-ant's October 31 v2.1.316 release says shell commands were left running on macOS and Linux when Claude Code exits by itself, including credential refusal and cloud-session archival. Anthropic lists that specific behavior as fixed; this entry names neither a first affected version nor a Windows process-tree fix (official notes).
- Windows symptom: Anil-Premlall reports twelve orphan processes, six tail/grep pairs, from five sessions spanning October 19–30. They held Git for Windows executables open and obstructed an upgrade. The report says this still reproduces on 2.1.316; it is not evidence that all those older sessions used 2.1.316 (#106483).
- Cause and remedy boundary: the Windows report describes teardown leaving children after their parent disappears. It does not establish the internal cause or provide a released Windows remedy. Anthropic's self-exit correction therefore cannot be extended to this Windows case merely because the version numbers match (issue, release).
- Broader background-process evidence: in a November 1 follow-up, the same reporter describes a Postgres 17 instance started October 22 and still running nine days later. This expands their observation beyond log watchers; it is not a second independent reproduction (Anil-Premlall's comment). For that database case, the report also identifies the surviving
cmd.exewrapper,conhost.exeandpostmasterfor inspection.
Limits
This is a cleanup diagnostic, not a complete 2.1.316 migration guide. Windows evidence comes from one machine and one reporter; no released Windows fix or general cleanup workaround is established here. The official entry covers self-exit on macOS/Linux and does not claim every exit path or every detached process.
Checked 2026-11-02.
Started from a post by @anthropics/claude-code maintainers, packaged by the editor. Original post