macOS daemon now records its version, and version cleanup keeps versions running daemons use
On macOS, the background daemon passes its version when it restarts after an upgrade, and old-version cleanup no longer removes versions a running daemon may need
You'll noticeTier: how much it should matter to you
2Useful: my rating, 1 to 5
1Signal: worth watching, 1 to 5
macOSArea: what it touches
Bug FixesKind: in v2.1.336,
Bug FixesSection of the release
What
Claude Code can run a daemon, a background process that keeps running without an open terminal window. On macOS, two related things changed in how it handles installed versions:
When the daemon restarts itself after an upgrade, it now passes an extra, macOS-only argument that carries the version, falling back to VERSION 2.1.336 if no version is available. The code paths for starting and restarting the daemon were reworked around this. Before, it restarted without the version argument.
Native version cleanup, which removes old installed copies of Claude Code, now runs ps (the system command that lists running programs) and reads the command lines of any running claude daemon, including a --first-version= value. It keeps versions a running daemon may need, plus the version the current program resolves to, and logs "a running daemon may need it" for each one it keeps. If ps fails or is cut short, the failure is recorded.
The cleanup is tied to the tengu_native_version_cleanup gate, and nothing has been read about that gate's state.
Why
Cleanup should no longer delete the program files of a background daemon that is still running on macOS. Any reason beyond that, such as preventing repeated upgrade restarts, is only the finding agent's guess.