diff --git a/plugins/codex/hooks/hooks.json b/plugins/codex/hooks/hooks.json index 19e33b818..9b761dfdf 100644 --- a/plugins/codex/hooks/hooks.json +++ b/plugins/codex/hooks/hooks.json @@ -18,7 +18,7 @@ { "type": "command", "command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/session-lifecycle-hook.mjs\" SessionEnd", - "timeout": 5 + "timeout": 3 } ] } diff --git a/tests/commands.test.mjs b/tests/commands.test.mjs index c34b06059..c9e2ce8f9 100644 --- a/tests/commands.test.mjs +++ b/tests/commands.test.mjs @@ -208,6 +208,8 @@ test("hooks keep session-end cleanup and stop gating enabled", () => { assert.match(source, /SessionEnd/); assert.match(source, /stop-review-gate-hook\.mjs/); assert.match(source, /session-lifecycle-hook\.mjs/); + const sessionEndTimeout = JSON.parse(source).hooks.SessionEnd[0].hooks[0].timeout; + assert.ok(sessionEndTimeout <= 3, "SessionEnd timeout must not exceed Codex CLI's 3s cap"); }); test("setup command can offer Codex install and still points users to codex login", () => {