From f2717a9bae8e737957e5860f858db98bb2f52e9d Mon Sep 17 00:00:00 2001 From: apstndb <803393+apstndb@users.noreply.github.com> Date: Tue, 18 Aug 2026 05:48:11 +0900 Subject: [PATCH 1/2] fix(resolve): map grok-build to grok in the pid walk (#859) Without this arm, grok-build falls through to claude/codex/gemini, so agmsg_agent_pid never sees a live grok and watchers are not liveness-gated. Co-authored-by: Cursor --- scripts/lib/resolve-project.sh | 1 + tests/test_resolve_project.bats | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/scripts/lib/resolve-project.sh b/scripts/lib/resolve-project.sh index e18e22cdf..befbe0919 100644 --- a/scripts/lib/resolve-project.sh +++ b/scripts/lib/resolve-project.sh @@ -236,6 +236,7 @@ _agmsg_agent_binaries() { antigravity) echo "antigravity" ;; copilot) echo "copilot" ;; opencode) echo "opencode" ;; + grok-build) echo "grok" ;; *) echo "claude codex gemini" ;; esac } diff --git a/tests/test_resolve_project.bats b/tests/test_resolve_project.bats index cd4c7d476..600d74097 100644 --- a/tests/test_resolve_project.bats +++ b/tests/test_resolve_project.bats @@ -435,3 +435,8 @@ setup_git_repo() { [ "$result" = "$base/parent" ] rm -rf "$base" } + +@test "agent-binaries: grok-build maps to grok (#859)" { + [ "$(_agmsg_agent_binaries grok-build)" = "grok" ] + [ "$(_agmsg_agent_binaries claude-code)" = "claude" ] +} From 761f087782563111ff6825567a6e46e2a0878b5f Mon Sep 17 00:00:00 2001 From: apstndb <803393+apstndb@users.noreply.github.com> Date: Tue, 18 Aug 2026 06:11:02 +0900 Subject: [PATCH 2/2] docs(resolve): note why pid names omit the shared basename agent (#856) Homebrew grok-build and the Cursor CLI installer both ship `agent`. Listing it on either type would attach the wrong pid (#93). Co-authored-by: Cursor --- scripts/lib/resolve-project.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/lib/resolve-project.sh b/scripts/lib/resolve-project.sh index befbe0919..c9029eaa8 100644 --- a/scripts/lib/resolve-project.sh +++ b/scripts/lib/resolve-project.sh @@ -228,6 +228,9 @@ agmsg_find_registered_project_variant() { } # Map an agent type to the binary basename(s) its process may carry. +# Names must be type-distinctive. Do not list `agent`: Homebrew grok-build +# and the Cursor CLI installer both use that basename (#856). Matching it +# would attach the wrong pid (#93). The alias is an intentional miss. _agmsg_agent_binaries() { case "$1" in claude-code) echo "claude" ;;