Skip to content

Coverage reports Codex as hooked while Codex is waiting for the user to approve the hooks #300

Open

Description

@blitzcrieg1

What happened

Recent Codex desktop builds show a Review hooks dialog and run a hook only after the user approves it ("Allow selected", "Allow all", or "Not now"). On the dogfood machine Codex recorded zero events for a week, while the dashboard said "4 of 4 … every installed agent is hooked". The hook files were installed and correct; Codex simply had not been told it could run them.

Why it matters

This is a silent coverage gap of exactly the kind hooks status, doctor and the heartbeat exist to catch. On a fleet, one developer clicking "Not now" turns Codex capture off with no signal anywhere, and the coverage view still reads green.

What to find out

  • Where Codex stores the approval state, and whether it is readable without touching anything Codex owns.
  • Whether managed or enterprise-distributed Codex hooks skip the review.
  • Until then, a weaker signal that still helps: Codex installed and hooked, but no Codex event within N days of Codex activity, should be a coverage WARN rather than OK.

Also seen

The same dialog listed three stale hooks from the project's old name that call a script which no longer exists. hooks install should detect and report leftover entries pointing at missing scripts, so a user is not asked to approve hooks that can only fail.

Activity

  1. blitzcrieg1 commented on Oct 21, 2026

    @blitzcrieg1
    OwnerAuthor

    Two findings from 21 October, on the dogfood machine (Windows, Codex desktop):

    1. Approval applies to conversations started afterwards. An audit session left open from before the hooks were approved made 137 tool calls between 20:05 and 20:27 local time with zero hook runs, while config.toml already held trusted_hash entries for all five Agentmetry hooks. A new conversation ran them. Docs now say to restart open Codex conversations after approving. Editing hooks.json changes its hash, so Codex asks again.
    2. Even approved, the hooks could not launch on Windows, which is Codex hooks never launch on Windows: the quoted command fails under cmd and PowerShell #307: the quoted command fails under cmd and PowerShell. Fix in fix(codex): hooks launch on Windows, whichever shell Codex uses #308.

    What #300 asks for, a way to read approval state, is still open: it is in Codex's config.toml as [hooks.state.'<file>:<event>:<n>:<n>'] trusted_hash = ..., which coverage could compare against the current hook definitions once the hash algorithm is known. Until then doctor and the heartbeat report configured agents with no recent events (#304), which catches this case without reading approval state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions