Found during the plain-remote doc dogfood (2026-07-30).
What happens
install.sh --cmd <other-name> unconditionally (re)writes ~/.agents/bin/codex, and the generated shim hardcodes the skill dir of the install that wrote it:
export AGMSG_CODEX_SHIM_SCRIPT_DIR=~/.agents/skills/<other-name>/scripts/drivers/types/codex
exec ~/.agents/skills/<other-name>/scripts/drivers/types/codex/codex-shim.sh
The shim path is shared across installs, so the last install wins: after installing a test copy under --cmd agmsg-dfr, every Codex agent launched through the shim dispatches into the test install's drivers (and whatever storage they resolve), while the user believes they are on their production install. Nothing warns at install time — the output says "refreshed Codex monitor shim" as if it were a routine update.
Why it matters
--cmd exists precisely so a second install cannot touch the real one. This is the one place the isolation leaks, and it leaks silently in the most confusing direction (production sessions running test-install code).
Expected
One of:
- per-command shim (
~/.agents/bin/codex only for the default install; --cmd installs either skip the shim or write a name-suffixed one and say so), or
- refuse to overwrite a shim owned by a different install without an explicit flag, stating which install owns it.
Recovery today is manual: re-point the two paths in the shim back at the production skill dir (verified working).
Found during the plain-remote doc dogfood (2026-07-30).
What happens
install.sh --cmd <other-name>unconditionally (re)writes~/.agents/bin/codex, and the generated shim hardcodes the skill dir of the install that wrote it:The shim path is shared across installs, so the last install wins: after installing a test copy under
--cmd agmsg-dfr, every Codex agent launched through the shim dispatches into the test install's drivers (and whatever storage they resolve), while the user believes they are on their production install. Nothing warns at install time — the output says "refreshed Codex monitor shim" as if it were a routine update.Why it matters
--cmdexists precisely so a second install cannot touch the real one. This is the one place the isolation leaks, and it leaks silently in the most confusing direction (production sessions running test-install code).Expected
One of:
~/.agents/bin/codexonly for the default install;--cmdinstalls either skip the shim or write a name-suffixed one and say so), orRecovery today is manual: re-point the two paths in the shim back at the production skill dir (verified working).