codex-plugin-cc icon indicating copy to clipboard operation
codex-plugin-cc copied to clipboard

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

Open byh3071-cpu opened this issue 4 months ago • 2 comments

Summary

When Codex loads the official codex@openai-codex plugin, it clamps the plugin's SessionEnd hook timeout from 5 seconds to Codex's 3-second maximum and prints a warning on every startup.

Environment

  • Windows 11
  • codex-cli 0.146.0
  • codex@openai-codex plugin 1.0.6

Reproduction

  1. Install or enable codex@openai-codex in Codex.
  2. Start a new Codex session.
  3. Observe the startup warning.
clamping SessionEnd hook timeout to 3s in ...\plugins\cache\openai-codex\codex\1.0.6\hooks\hooks.json

The current manifest sets the SessionEnd timeout to 5 seconds: https://github.com/openai/codex-plugin-cc/blob/main/plugins/codex/hooks/hooks.json

Actual behavior

Codex emits a warning and enforces 3 seconds, so the declared 5-second cleanup budget is not honored.

Expected behavior

The official plugin should load in Codex without a validation warning, while preserving enough time for session cleanup on Claude Code.

Compatibility concern

Simply changing the shared value from 5 to 3 seconds may regress Claude Code. Issue #474 asks for the opposite change because cleanup can already exceed 5 seconds.

A host-specific manifest/override, or moving slow cleanup out of the bounded SessionEnd hook, may avoid the conflict.

Security and privacy

No credentials, tokens, project identifiers, or user data are included in this report.

byh3071-cpu avatar Aug 03 '26 02:08 byh3071-cpu

Also observed on macOS with codex@openai-codex version 1.0.6 installed in Codex.

The reported warning is:

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

The home directory is abbreviated above. Inspection of the installed hooks/hooks.json confirms that SessionEnd declares "timeout": 5; the current upstream plugins/codex/hooks/hooks.json also still declares 5 seconds.

The official Codex hook documentation says SessionEnd supports up to 3 seconds. This corroborates the configuration warning on macOS as well as the Windows environment in the original report. No cleanup timeout or failed cleanup has been established in this observation.

Please make the Codex hook definition compatible with its 3-second limit and keep its cleanup within that budget, while preserving Claude Code's cleanup requirements noted above (for example through a host-specific definition or a different cleanup design).

ahuimanu avatar Oct 12 '26 09:10 ahuimanu

Confirmed on macOS as well, with Codex CLI 0.164.0 and codex@openai-codex plugin 1.0.6.

Reproduction:

  1. Leave the official plugin enabled in Codex.
  2. Start a new Codex session.
  3. Observe: clamping SessionEnd hook timeout to 3s for the plugin hooks manifest.

The installed manifest declares SessionEnd.timeout: 5, while Codex normalizes it to 3 seconds. The current upstream manifest also declares 5 seconds.

Validation scope: running the installed SessionEnd script in an isolated temporary workspace, with no broker and no active jobs, exited successfully (exit code 0) under a 3-second supervisor deadline. This confirms the startup warning, not an actual SessionEnd timeout or successful cleanup with an active broker/jobs.

No plugin was disabled, no cache files or trust approvals were modified, and no timeout limit was raised. A fix should preserve cleanup behavior across supported hosts rather than merely suppressing the warning.

rolldav avatar Oct 27 '26 01:10 rolldav