Under the hood
Detaching a background shell command can now wait for a handoff step to finish first
What
The internal function that detaches a background shell command (lets it keep running independently of Claude Code) is now asynchronous. If a handoff callback was supplied for that command and the process hasn't already exited, detaching now waits for that callback to finish before handing back the process ID.
Why
This ensures any cleanup or handoff work tied to a background command completes before Claude Code considers the process fully detached, avoiding a race where the detach finishes before the handoff step is done.