Skip to main content

no-unsupported-hook-handler

Disallow hook handler modes that current Codex releases skip.

Rule catalog ID: R014

Targeted pattern scope

  • **/.codex/hooks.json
  • inline [hooks] tables in **/.codex/config.toml

What this rule reports

  • Codex skips async handlers for {{eventName}}. Remove async or set it to false.
  • Codex currently executes only command hook handlers; {{eventName}} uses {{type}}.

Why this rule exists

Disallow hook handler modes that current Codex releases skip.

❌ Incorrect

A file in the targeted scope that produces any diagnostic listed above is incorrect for this rule.

✅ Correct

A file is correct when it uses the documented Codex structure and produces no diagnostic from this rule.

Behavior and migration notes

Included in:

  • codex.configs.recommended
  • codex.configs.strict
  • codex.configs.all

ESLint flat config example

The preset layers supply the correct Markdown, TOML, or JSON language configuration. Override the rule only in a later matching flat-config entry:

import codex from "@typpi/eslint-plugin-codex";

export default [
...codex.configs.recommended,
{
rules: { "codex/no-unsupported-hook-handler": "error" },
},
];

Further reading