It’s simple, deterministic stuff. At least most of the time.
I assume auto-updates are handled by deterministic code that's far away from anything agents can touch (self-modifying harnesses like Autolith notwithstanding). With the same behavior showing up in multiple high-profile harnesses (Codex, Claude Code), it feels likely there must be some actual reason for doing it this way.
It should be the harness responsibility to create / destroy things like worktrees and scratch spaces, and communicate to the agent (e.g. via system prompt) where the scratch space is and its purge schedule. Harness should also set appropriate env vars to make this work in tools.
> With the same behavior showing up in multiple high-profile harnesses (Codex, Claude Code), it feels likely there must be some actual reason for doing it this way.
I think fixing it is just not high on the priority list.