Repository navigation
Description
Empirical baseline
Today's codex job logs (~/.claude/plugins/data/codex-openai-codex/state/.../jobs/*.log) yielded a precise compliance measurement:
| Window | shell calls | contextcrawler-prefixed | compliance |
|---|---|---|---|
| Pre-#9 (before AGENTS.md hardening, < 04:25 UTC) | 42 | 0 | 0% |
| Post-#9 (after hardening, ≥ 04:25 UTC) | 261 | 209 | 80% |
PR #10 / issue #9 took codex from 0 → 80% by replacing the advisory wording with MUST + WRONG/RIGHT examples. The remaining 20% gap is the highest-ROI lever left for codex's effective gain (currently 80% × 35% ≈ 28% effective; lifting to 95% adoption → ~33% effective).
What slips past (sampled from today's unwrapped 52 calls)
Three patterns dominate:
rg -n "..."direct — ripgrep IS in AGENTS.md's apply-to list but NOT shown in the WRONG/RIGHT examples; low saliencegit -C /path status|log|diff— codex usesgit -C <dir>to avoidcd. AGENTS.md examples show baregit status-style; the-Cform doesn't trigger pattern-matchnl -ba file | sed -n '1,80p'— code reading via shell pipes. Should arguably go throughcontextcrawler read --max-lines Nbut no example demonstrates that mapping
Proposed AGENTS.md template additions
Add to the WRONG/RIGHT block in hooks/codex/rtk-awareness.md:
- WRONG: rg -n pat src/ RIGHT: contextcrawler grep -n pat src/
- WRONG: git -C dir status RIGHT: contextcrawler git -C dir status
- WRONG: nl -ba file | sed -n … RIGHT: contextcrawler read --max-lines N file
(Plain contextcrawler everywhere — no upstream brand naming.)
"Is it actually hitting" — the empirical verification this issue must include
Documentation alone doesn't count as a fix. The PR must ship a way to keep measuring compliance over time so future templates can be evaluated the same way:
-
Compliance measurement script (suggested at
scripts/codex-compliance.shor as acontextcrawlersubcommand). Inputs: codex job logs dir + optional time window. Outputs: total / wrapped / compliance %, plus a sample of unwrapped commands for inspection. Usable ascontextcrawler codex-compliance --since '2026-05-18 04:25'. -
A snapshot test comparing the new template's compliance against the old, run against a synthetic codex transcript fixture — to catch regressions in future AGENTS.md edits before they reach users.
-
PR success criterion: re-run the measurement after deploying the new template, confirm compliance climbs from 80% baseline to ≥95% on a fresh codex review run before this PR is mergeable.
The measurement script is the actual deliverable — the template tweak is cheap, the discipline of "test it lands" is the durable improvement.
Out of scope
- The 5% residual leak after the template update (probably edge cases like ad-hoc one-shot tools
awk,jq, etc. that don't deserve enumeration). Acceptable. - Moving codex to a hook-based interception (would close the gap to ~100% like the Claude harness) — that's a much bigger architectural change tracked separately if pursued.
Test plan
- Add the three new WRONG/RIGHT examples to
hooks/codex/rtk-awareness.md - Ship the compliance measurement (script or subcommand)
- Snapshot-test the template against a synthetic codex-log fixture
- Deploy the new template (
contextcrawler init -g --codex), run a real codex review/rescue, measure compliance, confirm ≥95% - If <95%, iterate on examples until the empirical bar is met
Activity
test(bench): Tier 1 standalone binary harness with isolated DB + JSON…
chore(release): v0.1.7 — version bump + release-engineering rebrand +…
thehoff commentedon Jun 10, 2026
Closing — codex-compliance push (80→95%) not on the near-term roadmap.