Problem
install.sh determines the account that will run Harnesses in SERVICE_USER, but find_user_bin probes SUDO_USER and that user's home. write_auto_harness can therefore record an operator-owned binary directory in bin= even when --user <service-user> selects a different execution account.
Personal installs hide the mismatch because the invoking user and execution user are the same. On a shared host, the generated Harness can either fail because the service user cannot traverse the operator's home or quietly depend on one operator's mutable installation. AGY exposed this existing gap, but it applies to every auto-detected command.
Scope
Resolve auto-detected binaries for the configured launch identity in SERVICE_USER. Preserve same-user behavior and system-wide binary detection. When the invoking user and service user differ and a binary exists only for the invoker, skip the live Harness and explain how to install the CLI for the service user or configure the Harness explicitly.
Apply one policy to Claude, Codex, Grok, Kimi, AGY, and Bash. Preserve existing Harness files byte-for-byte. Keep caller-scoped uses of SUDO_USER, including the user-local va link and source build, unchanged.
Acceptance criteria
Out of scope
This issue does not block AGY Harness support. A shared host can install AGY for its service user and configure that Harness explicitly.
Problem
install.shdetermines the account that will run Harnesses inSERVICE_USER, butfind_user_binprobesSUDO_USERand that user's home.write_auto_harnesscan therefore record an operator-owned binary directory inbin=even when--user <service-user>selects a different execution account.Personal installs hide the mismatch because the invoking user and execution user are the same. On a shared host, the generated Harness can either fail because the service user cannot traverse the operator's home or quietly depend on one operator's mutable installation. AGY exposed this existing gap, but it applies to every auto-detected command.
Scope
Resolve auto-detected binaries for the configured launch identity in
SERVICE_USER. Preserve same-user behavior and system-wide binary detection. When the invoking user and service user differ and a binary exists only for the invoker, skip the live Harness and explain how to install the CLI for the service user or configure the Harness explicitly.Apply one policy to Claude, Codex, Grok, Kimi, AGY, and Bash. Preserve existing Harness files byte-for-byte. Keep caller-scoped uses of
SUDO_USER, including the user-localvalink and source build, unchanged.Acceptance criteria
SERVICE_USER.bin=names the resolved directory.harnesses.d/<name>.conffiles remain byte-identical, and--no-auto-harnessis unchanged.Out of scope
This issue does not block AGY Harness support. A shared host can install AGY for its service user and configure that Harness explicitly.