Duplicate Hooks
Resolved 💬 1 comment Opened May 31, 2026 by ossfork Closed Jun 16, 2026
What version of Codex CLI is running?
codex-cli 0.135.0
What subscription do you have?
Pro
Which model were you using?
gpt-5.5
What platform is your computer?
Darwin 24.6.0 arm64 arm
What terminal emulator and version are you using (if applicable)?
Ghostty
Codex doctor report
I queried Codex’s hooks/list RPC directly:
- For one cwd, Codex returns 5 preToolUse hooks from ~/.codex/hooks.json.
- For two cwds, Codex returns two entries, each with the same 5 global user hooks.
- If the UI flattens those per-cwd results, it shows 10 rows: 1-5 repeated as 6-10.
So the duplicate list is effectively:
cwd A: ~/.codex/hooks.json preToolUse 0..4
cwd B: ~/.codex/hooks.json preToolUse 0..4
The source path and keys are identical in both copies, for example:
~/.codex/hooks.json:pre_tool_use:0:0
~/.codex/hooks.json:pre_tool_use:1:0
~/.codex/hooks.json:pre_tool_use:2:0
...
So expected runtime config is still 5 PreToolUse hooks per cwd, not 10. The 10-row view looks like a Codex TUI/app listing bug or UX issue: it is showing global user hooks once per cwd instead of grouping or deduping them
What issue are you seeing?
I can see duplicate hooks, like i have 5 hooks, but it shows 10 in codex cli settings. e.g. PreToolUse with 5 hooks, then 6-10 are simply duplicating 1-5.
What steps can reproduce the bug?
codex --cd "$PWD"
What is the expected behavior?
only show expected global hooks without duplication
Additional information
_No response_
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗