diff --git a/plugins/codex/hooks/hooks.json b/plugins/codex/hooks/hooks.json index 19e33b818..bd54ad05a 100644 --- a/plugins/codex/hooks/hooks.json +++ b/plugins/codex/hooks/hooks.json @@ -7,7 +7,7 @@ { "type": "command", "command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/session-lifecycle-hook.mjs\" SessionStart", - "timeout": 5 + "timeout": 60 } ] } diff --git a/tests/commands.test.mjs b/tests/commands.test.mjs index c34b06059..00414798a 100644 --- a/tests/commands.test.mjs +++ b/tests/commands.test.mjs @@ -210,6 +210,13 @@ test("hooks keep session-end cleanup and stop gating enabled", () => { assert.match(source, /session-lifecycle-hook\.mjs/); }); +test("session start hook allows enough time to restore session state", () => { + const hooks = JSON.parse(read("hooks/hooks.json")); + const sessionStartHook = hooks.hooks.SessionStart[0].hooks[0]; + + assert.equal(sessionStartHook.timeout, 60); +}); + test("setup command can offer Codex install and still points users to codex login", () => { const setup = read("commands/setup.md"); const readme = fs.readFileSync(path.join(ROOT, "README.md"), "utf8");