Hooks don't work in Codex Desktop (internal error `ApiIdParam`)

Open 💬 1 comment Opened Jul 18, 2026 by nbros

What version of the Codex App are you using (From “About Codex” dialog)?

26.715.31925

What subscription do you have?

Pro

What platform is your computer?

Darwin 25.5.0 arm64

What issue are you seeing?

<img width="1630" height="1530" alt="Image" src="https://github.com/user-attachments/assets/94eaa593-b82d-47f2-b2c7-68ae689d141d" />

<img width="1558" height="642" alt="Image" src="https://github.com/user-attachments/assets/3b9245e8-4398-4515-9edc-ce54a67b879b" />

This looks like an internal Codex Desktop (well ChaptGPT now) error

What steps can reproduce the bug?

.codex/hooks.json

{
  "description": "Reproduction minimale d’un échec de continuation du hook Stop.",
  "hooks": {
    "Stop": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "node \"$(git rev-parse --show-toplevel)/.codex/hooks/repro-stop-continuation.mjs\"",
            "timeout": 10,
            "statusMessage": "Reproduction du hook Stop"
          }
        ]
      }
    ]
  }
}

.codex/hooks/repro-stop-continuation.mjs :

let stdin = "";
process.stdin.setEncoding("utf8");
for await (const chunk of process.stdin) {
  stdin += chunk;
}

const input = JSON.parse(stdin);
if (input.stop_hook_active !== true) {
  console.log(
    JSON.stringify({
      decision: "block",
      reason: "Minimal Stop hook continuation reproduction.",
    }),
  );
}

What is the expected behavior?

hook triggers, agent sees the result, no crash / internal error

Additional information

_No response_

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗