Skip to content

codex-post-tool-verify-context

Run lightweight context-only post-edit quality checks and return verification guidance after Codex tool use.

hook PostToolUse codex mode: context

Run lightweight context-only post-edit quality checks and return verification guidance after Codex tool use.

FieldValue
idcodex-post-tool-verify-context
status_messageChecking post-edit quality
modecontext
logical_eventPostToolUse
matcherWrite|Edit|MultiEdit|apply_patch|edit|create|replace|write_file|Bash|bash|run_shell_command
commandpython3 {repo_root}/hooks/wagents-hook.py codex-post-tool-verify-context --harness {harness}
timeout5
harnesses["codex"]
Full hook config + command reference
config/hook-registry.json (entry)
{
"id": "codex-post-tool-verify-context",
"description": "Run lightweight context-only post-edit quality checks and return verification guidance after Codex tool use.",
"status_message": "Checking post-edit quality",
"mode": "context",
"logical_event": "PostToolUse",
"matcher": "Write|Edit|MultiEdit|apply_patch|edit|create|replace|write_file|Bash|bash|run_shell_command",
"command": "python3 {repo_root}/hooks/wagents-hook.py codex-post-tool-verify-context --harness {harness}",
"timeout": 5,
"harnesses": [
"codex"
]
}
hooks/wagents-hook.py (policy)
def _policy_codex_post_tool_verify_context(payload: NormalizedPayload) -> int:
repo_root, quality_paths = _quality_paths(payload)
paths = [str(path.relative_to(repo_root)) for path in quality_paths] or _candidate_paths(payload)
# ... runs fast ruff/ty on small set and emits additionalContext
...

Command: python3 ... codex-post-tool-verify-context --harness codex


View source on GitHub