Summary
#477 taught callers to pass "${GROK_SESSION_ID:--}" (and the same
pattern for other hosts) so a launcher that drops a quoted-empty first
arg cannot shift project/type. watch.sh was supposed to fold the
literal - into the empty-session-id path.
On current main the callers and grok-build _delivery.sh comments
still describe that contract, but watch.sh does not fold. The bats
case that locked it is also gone. This is a regression of #477, not a
missing caller fix.
Do not change grok-build "${GROK_SESSION_ID:--}" sites.
Repro
Join as grok-build, then (no session id in that argv):
bash scripts/watch.sh - /path/to/project grok-build
Expected: run/watch.agmsg-*.pid or a grok composite id; no
run/watch.-*.pid.
Actual on main / v1.2.0: run/watch.-.pid.
Observed 2026-08-18: vanilla v1.2.0 via grok monitor tool (session
var set in the grok Shell, unset in monitor re-eval) produced argv
watch.sh - … and watch.-.pid. Same host, fold restored: no
watch.-*.
Suggested fix (one PR, one file)
SESSION_ID="${1:-}"
[ "$SESSION_ID" = "-" ] && SESSION_ID=""
Restore the bats case from #477 in the same PR if CI should lock it.
Related
Summary
#477 taught callers to pass
"${GROK_SESSION_ID:--}"(and the samepattern for other hosts) so a launcher that drops a quoted-empty first
arg cannot shift
project/type.watch.shwas supposed to fold theliteral
-into the empty-session-id path.On current
mainthe callers and grok-build_delivery.shcommentsstill describe that contract, but
watch.shdoes not fold. The batscase that locked it is also gone. This is a regression of #477, not a
missing caller fix.
Do not change grok-build
"${GROK_SESSION_ID:--}"sites.Repro
Join as grok-build, then (no session id in that argv):
Expected:
run/watch.agmsg-*.pidor a grok composite id; norun/watch.-*.pid.Actual on
main/ v1.2.0:run/watch.-.pid.Observed 2026-08-18: vanilla v1.2.0 via grok monitor tool (session
var set in the grok Shell, unset in monitor re-eval) produced argv
watch.sh - …andwatch.-.pid. Same host, fold restored: nowatch.-*.Suggested fix (one PR, one file)
Restore the bats case from #477 in the same PR if CI should lock it.
Related
_agmsg_agent_binaries).