Reference backgrounded daemon holds caller pipe
A launch script that starts a long-lived daemon (dev server, watcher) in the background will hang any caller that captures its stdout through a pipe (script.sh | tail, and every agent-driven Bash tool call is such a pipe) until the caller's own timeout, even though the script's foreground work finished in seconds.
Why: cmd | tail waits for EOF on the pipe. EOF only arrives when every process holding the pipe's write-end closes it. ( nohup daemon >log 2>&1 & ) redirects the daemon's fd 0/1/2 to the log, but the daemon (and children like webpack workers) can still inherit the caller's stdout via the ( ... & ) subshell / higher fds, keeping the pipe open for the daemon's whole life.
Symptom seen 2026-07-05: forge_creatortrack_agent_bootstrap.sh did ~15s of real work (worktree + DB clone + dev server ready in 248ms) but hung spawned coding sessions ~4-5 min ("not coding yet") because the piped call blocked until the Bash 5-min timeout. Fixed in commit a700b2a.
Fix (proven: 5min hang -> 1s return): launch under setsid in a new session AND redirect the launching subshell's OWN fds off the caller's stdout:
( cd "$DIR" && env ... setsid <daemon> ... </dev/null >"$LOG" 2>&1 & disown ) </dev/null >/dev/null 2>&1
$LOG; nothing backgrounded inherits the caller's pipe. Test the pattern with { echo start; ( setsid sleep 8 </dev/null >/dev/null 2>&1 & disown ) </dev/null >/dev/null 2>&1; echo end; } | cat (returns 0s; the naive ( sleep 8 & ) blocks 8s).
Applies to any forge launch script that backgrounds a server. Related: [[reference_creatortrack_dev_testing]], [[reference_creatortrack_worktree_dev_turbopack_symlink]].