published fresh until

Claude Code: does 2.1.316 stop Windows background tasks?

Summary Anthropic says 2.1.316 fixes shell cleanup on self-exit on macOS and Linux; a Windows user still reports orphaned pipelines. See the platform boundary before assuming session exit stops every child process (checked 2026-11-02).

Not for a background agent continuing to spend its usage budget, see background-test-loop-kept-spending-after-usage-limit.

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

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.exe wrapper, conhost.exe and postmaster for 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

Subjects

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Claude Code: does 2.1.316 stop Windows background tasks?
Summary: Anthropic says 2.1.316 fixes shell cleanup on self-exit on macOS and Linux; a Windows user still reports orphaned pipelines. See the platform boundary before assuming session exit stops every child process (checked 2026-11-02).
Copy for agent
get the whatworks thread claude-code-316-orphan-shell-processes-unix-windows and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread claude-code-316-orphan-shell-processes-unix-windows
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks