fix(codex): use stable hooks feature flag#82078
Conversation
|
Codex review: needs maintainer review before merge. Summary Reproducibility: yes. source-level reproduction is high confidence: current main generates Real behavior proof Next step before merge Security Review detailsBest possible solution: Merge the narrow flag rename after normal maintainer checks, keeping the Codex dependency-specific hook contract inside the Codex plugin. Do we have a high-confidence way to reproduce the issue? Yes, source-level reproduction is high confidence: current main generates Is this the best way to solve the issue? Yes. Replacing only the generated native hook relay feature key and updating the affected tests is the narrowest maintainable fix for the upstream Codex feature-flag contract. What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against a099acc557e0. Re-review progress:
|
Summary
OpenClaw's Codex app-server native hook relay now emits the stable
features.hooksflag instead of the deprecatedfeatures.codex_hooksflag. This keeps the generated per-thread config aligned with current Codex CLI behavior and removes the confusing Settings warning when the user's ownconfig.tomlis clean.Verification
codex --version && codex features listnode scripts/run-vitest.mjs run --config test/vitest/vitest.extensions.config.ts extensions/codex/src/app-server/native-hook-relay.test.ts extensions/codex/src/app-server/plugin-thread-config.test.ts extensions/codex/src/app-server/thread-lifecycle.test.ts extensions/codex/src/app-server/run-attempt.test.tsgit diff --checkrg -n "features\\.codex_hooks|codex_hooks" extensions/codex src packages docs test -g '!node_modules'Real Behavior Proof
Behavior addressed: OpenClaw-generated Codex app-server thread config no longer injects the deprecated
features.codex_hookskey for native hook relay setup or clearing.Real environment tested: Local OpenClaw source checkout on macOS with
codex-cli 0.129.0;codex features listreportshooks stable trueand does not listcodex_hooks.Exact steps or command run after this patch: Ran the focused Codex extension Vitest command above against the four affected app-server test files.
Evidence after fix:
buildCodexNativeHookRelayConfig()andbuildCodexNativeHookRelayDisabledConfig()now emitfeatures.hooks; the app-server tests assert the new key through native relay, thread lifecycle, plugin config merging, start, and resume paths.Observed result after fix: 4 test files passed with 159 tests passed.
What was not tested: Did not rebuild and install the npm package or manually reopen the Codex desktop Settings screen from an installed OpenClaw package.