Prefer shell function setup for Codex monitor shim#193
Conversation
f772425 to
248482b
Compare
e002ba1 to
85de8c3
Compare
|
Thanks for this — the shell-function-first direction is sound and fits where #192 took Windows. It delegates to the existing bash One blocking item — a coexistence bug for existing installs. A user who already has the generated Changing the default subcommand from |
85de8c3 to
fe1aacd
Compare
|
Thanks for the careful catch. I reproduced the coexistence case and confirmed the function path could resolve the existing generated Updated in
Focused validation:
I also attempted the full |
Summary
codex-shim-install.shprint a shell function by default instead of installing~/.agents/bin/codexdelivery set monitor codexprint that shell function and leave the global PATH shim as an explicit opt-inWhy
The current Codex monitor beta setup installs a global
~/.agents/bin/codexshim and then asks users to put~/.agents/binbefore the real Codex binary onPATH. That is easy to miss and affects every shell that inherits thatPATH.A shell function keeps the interception local to the user's interactive shell profile while still launching monitored Codex sessions with the normal
codexcommand. The previous global PATH shim remains available via an explicitcodex-shim-install.sh installcommand for users who prefer it.Validation
bash -n scripts/drivers/types/codex/codex-shim-install.sh scripts/drivers/types/codex/_delivery.shgit diff --checkbats tests/test_codex_shim.batsbats --filter 'codex' tests/test_delivery.batsbats tests/test_install.batsdelivery.sh set monitor codexprints acodex() { ... }function and does not create~/.agents/bin/codexNote: a full
bats tests/test_delivery.batsrun still hits an unrelated existing local failure indelivery set monitor: existing settings with single-quoted hook commands stays valid JSON (#134): SQLite reportsError: stepping, malformed JSON (1)for that test's seeded settings JSON before this patch's Codex-specific assertions are reached.