Version: databricks 0.2.10 · codex-cli 0.146.1 · Windows 11 26200 · %COMSPEC% = C:\WINDOWS\system32\cmd.exe
All three hooks in hooks/codex-hooks.json use ${PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}. Codex spawns hooks via %COMSPEC%, which is cmd.exe. cmd.exe has no ${VAR:-default} expansion, so the token is passed through literally:
python3: can't open file '...\${PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}\hooks\databricks-context.py': [Errno 22] Invalid argument
python: can't open file '...\${PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}\hooks\databricks-context.py': [Errno 22] Invalid argument
Both fallbacks fail, so the hooks have never run on Windows. The scripts themselves are fine — invoked directly they exit 0 and emit correct JSON.
The failure is silent. The trailing || true masks it whenever Git for Windows' true.exe is on PATH (it ships at C:\Program Files\Git\usr\bin\true.exe). Under a narrower PATH the mask fails and codex reports SessionStart hook (failed) error: hook exited with code 1. So the observable symptom is environment-dependent, but the hook is non-functional either way.
Suggested fix: add a commandWindows variant using an absolute %PLUGIN_ROOT% path and a cmd-safe fallback (|| exit /b 0 rather than || true). Related upstream: openai/codex#34690.
Version: databricks 0.2.10 · codex-cli 0.146.1 · Windows 11 26200 · %COMSPEC% = C:\WINDOWS\system32\cmd.exe
All three hooks in hooks/codex-hooks.json use ${PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}. Codex spawns hooks via %COMSPEC%, which is cmd.exe. cmd.exe has no ${VAR:-default} expansion, so the token is passed through literally:
Both fallbacks fail, so the hooks have never run on Windows. The scripts themselves are fine — invoked directly they exit 0 and emit correct JSON.
The failure is silent. The trailing || true masks it whenever Git for Windows' true.exe is on PATH (it ships at C:\Program Files\Git\usr\bin\true.exe). Under a narrower PATH the mask fails and codex reports SessionStart hook (failed) error: hook exited with code 1. So the observable symptom is environment-dependent, but the hook is non-functional either way.
Suggested fix: add a commandWindows variant using an absolute %PLUGIN_ROOT% path and a cmd-safe fallback
(|| exit /b 0 rather than || true). Related upstream: openai/codex#34690.