Files
boshu2__agentops/hooks/codex-hooks.json
T
Boden Fuller 52d99f9ea3 feat(codex): add native Codex CLI hooks support
Codex CLI v0.115.0+ supports hooks (SessionStart, Stop,
UserPromptSubmit, PreToolUse, PostToolUse). Add codex-hooks.json
mapping 8 AgentOps hooks to the Codex hook format.

The install-codex-plugin.sh script now:
- Copies hook scripts to the plugin cache
- Installs/merges hooks.json to ~/.codex/hooks.json
- Enables codex_hooks feature in config.toml
- Upgrades hook_runtime from codex-hookless-fallback to codex-native-hooks

Hooks installed: session-start, ao-inject, flywheel-close,
prompt-nudge, quality-signals, go-test-precommit, commit-review,
ratchet-advance.
2026-04-07 09:37:35 -04:00

64 lines
1.9 KiB
JSON

{
"$schema": "../schemas/hooks-manifest.v1.schema.json",
"hooks": [
{
"name": "agentops-session-start",
"event": "SessionStart",
"command": "bash ${AGENTOPS_PLUGIN_ROOT:-~/.codex/plugins/cache/agentops}/hooks/session-start.sh",
"timeout": 10000
},
{
"name": "agentops-inject",
"event": "SessionStart",
"command": "bash ${AGENTOPS_PLUGIN_ROOT:-~/.codex/plugins/cache/agentops}/hooks/ao-inject.sh",
"timeout": 10000
},
{
"name": "agentops-flywheel-close",
"event": "Stop",
"command": "bash ${AGENTOPS_PLUGIN_ROOT:-~/.codex/plugins/cache/agentops}/hooks/ao-flywheel-close.sh",
"timeout": 15000
},
{
"name": "agentops-prompt-nudge",
"event": "UserPromptSubmit",
"command": "bash ${AGENTOPS_PLUGIN_ROOT:-~/.codex/plugins/cache/agentops}/hooks/prompt-nudge.sh",
"timeout": 5000
},
{
"name": "agentops-quality-signals",
"event": "UserPromptSubmit",
"command": "bash ${AGENTOPS_PLUGIN_ROOT:-~/.codex/plugins/cache/agentops}/hooks/quality-signals.sh",
"timeout": 3000
},
{
"name": "agentops-go-test-precommit",
"event": "PreToolUse",
"command": "bash ${AGENTOPS_PLUGIN_ROOT:-~/.codex/plugins/cache/agentops}/hooks/go-test-precommit.sh",
"matcher": {
"type": "bash"
},
"timeout": 60000
},
{
"name": "agentops-commit-review",
"event": "PreToolUse",
"command": "bash ${AGENTOPS_PLUGIN_ROOT:-~/.codex/plugins/cache/agentops}/hooks/commit-review-gate.sh",
"matcher": {
"type": "bash",
"pattern": "git commit"
},
"timeout": 10000
},
{
"name": "agentops-ratchet-advance",
"event": "PostToolUse",
"command": "bash ${AGENTOPS_PLUGIN_ROOT:-~/.codex/plugins/cache/agentops}/hooks/ratchet-advance.sh",
"matcher": {
"type": "bash"
},
"timeout": 5000
}
]
}