Skip to content

codex-stop-truth-gate

Ask Codex for one more pass when final code-change claims omit validation evidence.

hook Stop codex mode: enforce

Ask Codex for one more pass when final code-change claims omit validation evidence.

FieldValue
idcodex-stop-truth-gate
status_messageChecking final-answer evidence
modeenforce
logical_eventStop
commandpython3 {repo_root}/hooks/wagents-hook.py codex-stop-truth-gate --harness {harness}
timeout5
harnesses["codex"]
Full hook config + command reference
config/hook-registry.json (entry)
{
"id": "codex-stop-truth-gate",
"description": "Ask Codex for one more pass when final code-change claims omit validation evidence.",
"status_message": "Checking final-answer evidence",
"mode": "enforce",
"logical_event": "Stop",
"command": "python3 {repo_root}/hooks/wagents-hook.py codex-stop-truth-gate --harness {harness}",
"timeout": 5,
"harnesses": [
"codex"
]
}
hooks/wagents-hook.py (policy + guard)
def _policy_codex_stop_truth_gate(payload: NormalizedPayload) -> int:
if payload.stop_hook_active:
return 0
...
# checks last assistant message for claims without evidence
if has_claim and not has_evidence:
return _stop_retry(payload, "Add explicit validation evidence (tests, commands, diffs) before stopping.")
return 0

Command: python3 .../wagents-hook.py codex-stop-truth-gate --harness codex


View source on GitHub