← Back to context

Comment by timdorr

4 hours ago

This is the same operational model as Claude Code.

  ls ~/.local/share/claude/versions/
  ps auxww | grep "claude bg"

I see a few prior versions of the Claude Code binary and several running background tasks, without any copy of Claude Code in the foreground. I regularly get a "Update available" message in my Claude Code UI too.

This kind of stuff often breaks for applications packaged with Nix, so it's often removed from Nix packages for compatibility reasons. Both behaviors you mention are helpfully patched out of the Claude Code package I use: https://github.com/numtide/llm-agents.nix/blob/dc285bfd94ec7...

As a result, I never knew that Claude Code does a nasty thing like this, either. :-\

Fwiw, packages in that repo get version bumped each day, so if that's a fast enough pace for you it may be a good alternative.

If running systemd, wrap that crap into a cgroup and force kill the whole process tree on exit. I've been doing it for years with badly behaving applications. On phone, from memory, may not be exactly what is needed:

  systemd-run --user --pty --wait --collect -p TimeoutStopSec=5s -- "$@"