Skip to main content
CODEX:S:0005 deterministic high structure codex

Hook Command Has Field

Hook handlers with "type": "command" in .codex/hooks.json MUST include a "command" field containing the shell command to execute. Without it, Codex has no command to run and the hook fails silently.

Antipatterns

  • Missing command field. Defining "type": "command" without a "command" key.
  • Empty command string. Setting "command": "" which passes the key check but executes nothing.

Pass / Fail

Pass

{ "type": "command", "command": "npm run lint" }

Fail

{ "type": "command" }

Limitations

Checks that at least one handler has a command field with a non-empty value.