
What happened
The developer wired a Stop hook, Hook-CodexGate.js, that reads the conversation log and blocks Claude Code once if changes were made without a successful Codex review — then fixed misjudgments reproduced on 2026年9月24日, growing tests from 26 to 43.
Why it matters
The gate is not enforcement but a reminder for when the AI forgets a written rule, and its fixes — showing only changes made after the last Codex pass and waiting for the completion notice rather than the launch — suggest such reminders misfire unless they read the log's exact strings and order.
Summaries like this, every morning.
The rule the developer started from was simple: after implementing, have a different AI review the work. Written down as prose, it was not followed, so the rule became a Stop hook (Hook-CodexGate.js) that reads the conversation log and returns decision: block once with a reason. The gate counts file edits and writes, shell rewrites, and requests to implementation subagents as changes, while leaving HANDOFF.md, memory files and temp folders out. Only a successful Codex command counts as a review, and a stop already blocked once is always let through, so the loop cannot spin.
The misjudgments the developer reproduced on 2026年9月24日 all came from reading the log too loosely. The list of changes shown on a block covered the whole conversation rather than only what came after the last Codex pass. A background Codex run counted as done at launch, so the fix was to judge by the completion notice and to ignore notices quoted inside tool output. The phrase "usage limit" appearing in the gate's own text made it look satisfied, so the fix was to count only the limit display from the script that calls Codex. Together with the token cost of stacking block messages, these point at the same lesson: a deterministic check over log strings and order is only as good as the spans it reads.
The second problem was parallel hooks. A completion-notice hook and the gate hook do not know each other's results, so completion could fire while the gate was still blocking. The developer's answer was a shared StopVerdict.js component that dry-runs the three gates (Codex, quality, Japanese) with a 12-second cutoff and withholds completion while background work has no end notice yet. Some Codex review findings were adopted; a rare case where background work longer than 3 hours could yield early completion was not.
Pick your industry and the AI tools you use, and get news related to your work every day.
Free · 30 seconds with Google · unsubscribe anytimeWhat is AIToday? →
Ask AI anything about this article. The AI reads this article, earlier AIToday articles, and Wikipedia, and cites its sources. Q&As are published on this page for other readers too.
Google Cloud revenue grew 82% year over year to $24.8 billion last quarter, up from $13.6 billion a year earli…

As Anthropic, Meta, Google, Amazon and Microsoft meet faith leaders — Anthropic cites "more than 15 religious…

Anthropic added to its terms of service a ban on "persistent, targeted abusive or cruel" behavior toward Claud…

The developer behind agentcells, a personal project that splits work into 'cell' units (triage, implement, rev…

inori launched a free site that analyzes X posts to match users to an AI model like GPT, Claude or Gemini

Google added an October 16 clause to its privacy policy saying Drive, Gmail and Google Photos data can be used…
