codeflash-agent/plugin/hooks/hooks.json
Kevin Turcios de6046df8d Replace Node.js SessionStart hook with bash (106ms → 5ms)
The codex session-lifecycle-hook.mjs SessionStart path only appends
two env vars to CLAUDE_ENV_FILE. Rewrite that as a bash script to
avoid ~100ms V8 startup overhead. SessionEnd stays in Node.js since
it needs async broker teardown and process tree management.
2026-04-21 05:07:03 -05:00

58 lines
1.3 KiB
JSON

{
"hooks": {
"SessionStart": [
{
"hooks": [
{
"type": "command",
"command": "bash \"${CLAUDE_PLUGIN_ROOT}/hooks/session-start.sh\"",
"timeout": 5
},
{
"type": "command",
"command": "bash \"${CLAUDE_PLUGIN_ROOT}/vendor/codex/scripts/session-start-env.sh\"",
"timeout": 5
}
]
}
],
"SessionEnd": [
{
"hooks": [
{
"type": "command",
"command": "bash \"${CLAUDE_PLUGIN_ROOT}/hooks/session-end.sh\"",
"timeout": 5
},
{
"type": "command",
"command": "node \"${CLAUDE_PLUGIN_ROOT}/vendor/codex/scripts/session-lifecycle-hook.mjs\" SessionEnd",
"timeout": 5
}
]
}
],
"PreCompact": [
{
"hooks": [
{
"type": "command",
"command": "bash \"${CLAUDE_PLUGIN_ROOT}/hooks/pre-compact.sh\"",
"timeout": 5
}
]
}
],
"Stop": [
{
"hooks": [
{
"type": "command",
"command": "node \"${CLAUDE_PLUGIN_ROOT}/vendor/codex/scripts/stop-review-gate-hook.mjs\"",
"timeout": 900
}
]
}
]
}
}