Skip to content

fix: lower the SessionEnd hook timeout to Codex CLI's 3s cap - #619

Open
epsalmond wants to merge 1 commit into
openai:mainfrom
epsalmond:fix/session-end-timeout-clamp
Open

fix: lower the SessionEnd hook timeout to Codex CLI's 3s cap#619
epsalmond wants to merge 1 commit into
openai:mainfrom
epsalmond:fix/session-end-timeout-clamp

Conversation

@epsalmond

Copy link
Copy Markdown

Summary

Codex CLI clamps SessionEnd hook timeouts to 3 seconds (SESSION_END_MAX_TIMEOUT_SEC in codex-rs/hooks/src/events/session_end.rs) and prints a warning on every startup when a manifest declares more:

warning: clamping SessionEnd hook timeout to 3s in .../plugins/cache/openai-codex/codex/1.0.6/hooks/hooks.json

The bundled manifest declares 5 seconds, so every session that loads the plugin starts with this warning while the hook runs under a 3-second budget anyway. This lowers the declared timeout to 3 so the manifest matches what actually runs. The SessionStart and Stop timeouts are untouched — Codex does not clamp those.

Fixes #582

Validation

  • node --test tests/commands.test.mjs — 8 passed, including a new assertion that the SessionEnd timeout stays within the 3-second cap
  • npm test — 87 passed; the 4 failures (status/result/resolveStateDir tests) fail identically on a clean checkout of main in this environment
  • npm run check-version — all version metadata matches 1.0.6

Codex CLI clamps SessionEnd hook timeouts to 3 seconds
(SESSION_END_MAX_TIMEOUT_SEC in codex-rs/hooks/src/events/session_end.rs)
and warns on every startup when the manifest declares more. Declare 3s
so the manifest matches what actually runs and the warning goes away.

Fixes openai#582
@epsalmond
epsalmond marked this pull request as ready for review August 9, 2026 00:34
@epsalmond
epsalmond requested a review from a team August 9, 2026 00:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Codex clamps official plugin SessionEnd timeout from 5s to 3s

1 participant