Codex hooks aren't running
Most often, Codex is waiting for you to approve TokenNibbler’s two hooks: open Codex, choose Trust all and continue, and run a command. If the card or Run checks shows one of the messages below, its section has the fix.
What you see
Section titled “What you see”| Message | Section |
|---|---|
| Connected · approve the hooks in Codex, or in Run checks: “No Codex hook received yet. Approve the TokenNibbler hook in Codex (/hooks), restart Codex and run a shell command.” | Approve the hooks in Codex |
| Codex hooks are turned off, with “Codex config.toml sets [features] hooks = false.” | Hooks turned off in config.toml |
| Reconnect Codex, with “The Codex hook points to an older TokenNibbler location.” | Reconnect Codex |
| “Codex command hook could not reach the local service. Reconnect Codex.” (or “Codex output hook …”) | Reconnect Codex |
| Codex needs attention, with “Cannot parse Codex hooks.json. The existing file has not been changed.” | hooks.json can’t be read |
| Codex not found, or “Codex was not found on this PC. Install Codex, then try again.” | Codex not found |
Approve the hooks in Codex
Section titled “Approve the hooks in Codex”Why it happens: Codex asks you to review new hooks before it runs them, and TokenNibbler never approves hooks for you.
- On the ChatGPT card, select Open Codex. When Codex asks about the new hooks, choose Trust all and continue.
- In a Codex session that’s already open, type
/hooksto review and approve TokenNibbler’s hooks there. - Restart any Codex sessions that were open before you connected. They load hooks when they start.
- Run a shell command in Codex, such as a build or a test. The card changes to Connected · last output with the time.
If Open Codex isn’t shown, run codex in a terminal and choose Trust all and continue there. If you see “Codex could not start on this PC. Open a terminal and run codex to see why.”, do that: Codex’s own message says what it needs.
Hooks turned off in config.toml
Section titled “Hooks turned off in config.toml”Why it happens: Your Codex config.toml turns hooks off. Codex runs hooks by default, and TokenNibbler never edits config.toml, so this is a change you make.
- Open
%USERPROFILE%\.codex\config.toml(on a Mac,~/.codex/config.toml), or the one inCODEX_HOME. - Find
hooks = falseunder[features], orfeatures.hooks = falseat the top, and remove the line. - Save, restart Codex, and run a shell command.
If Run checks says “Codex config.toml also defines hooks; Codex loads both and may show a warning”, that’s for your information: Codex loads the hooks from both places and may show a warning about it.
Reconnect Codex
Section titled “Reconnect Codex”Why it happens: The hooks in hooks.json point to an older TokenNibbler location, or a hook couldn’t reach TokenNibbler’s local service when Run checks ran it the way Codex does.
- If the card says Local service unavailable or Run checks says “Local service is not reachable”, fix that first: see Local service unavailable.
- On the ChatGPT card, select Reconnect. TokenNibbler replaces its own hooks and keeps everything else.
- If Codex asks about the hooks again, choose Trust all and continue, then restart open Codex sessions.
hooks.json can’t be read
Section titled “hooks.json can’t be read”Why it happens: hooks.json isn’t valid JSON, so TokenNibbler leaves it exactly as it is.
- Open the file shown in Settings › Integrations, usually
%USERPROFILE%\.codex\hooks.json(on a Mac,~/.codex/hooks.json). - Fix the JSON: remove comments and trailing commas, and check every bracket is closed.
- Select Connect Codex again.
Code mode
Section titled “Code mode”Codex runs code-mode models’ commands inside a script, where a hook cannot change the output. In the Microsoft Store and Mac versions, these commands run exactly as Codex typed them, with their full output, and Run checks says so in one line. That line is for your information: nothing needs fixing. On a Mac, version 1.0.2 words it as “Codex command wrapping is available on Windows only”, marked !; nothing needs fixing there either. TokenNibbler still shortens Codex’s direct shell output, plus Claude Code and its MCP results.
Codex not found
Section titled “Codex not found”Why it happens: TokenNibbler looks for Codex’s folder, %USERPROFILE%\.codex (on a Mac, ~/.codex), or the folder in CODEX_HOME, and for the codex command.
- Install the Codex CLI and sign in with
codex login. - If you keep Codex’s files elsewhere, set
CODEX_HOMEto that folder, then restart TokenNibbler. - Select Connect Codex. TokenNibbler looks for the
codexcommand again within 30 seconds, so there’s no need to restart it after installing.
Still stuck?
Section titled “Still stuck?”Select Run checks in Settings › Integrations, copy the results, and send them with a screenshot of the ChatGPT card through the contact page. Troubleshooting: start here lists what else helps. To see what the connection changes, read Connect Codex.