Skip to content

[Bug] Deprecated codex_hooks warning appears even when [features].hooks is enabled #22148

Open

Description

@omermosko4

What happened?

Codex CLI shows the deprecated [features].codex_hooks warning even though the active config already uses the replacement key and has hooks enabled.

Active config.toml snippet:

[features]
hooks = true

Observed warning:

[features].codex_hooks is deprecated. Use [features].hooks instead.
Enable it with --enable hooks or [features].hooks in config.toml. See https://developers.openai.com/codex/config-basic#feature-flags for details.

Expected behavior

No deprecation or enablement warning should be shown when [features].hooks = true is present in the active config.

Impact

The warning is shown regardless of the actual hooks feature state, which makes it look like the config still uses the deprecated key when it does not.

Version

codex-cli 0.130.0

Environment

macOS, config loaded from ~/.codex/config.toml.

Activity

  1. changed the title [-]Deprecated codex_hooks warning appears even when [features].hooks is enabled[/-] [+][Bug] Deprecated codex_hooks warning appears even when [features].hooks is enabled[/+] on May 11, 2026
  2. added
    bug
    CLI
    hooks
    config
    on May 11, 2026
  3. etraut-openai commented on May 11, 2026

    @etraut-openai
    Contributor

    Codex is working as intended here. If you want to avoid the deprecation warning, delete the deprecated key.

  4. etraut-openai commented on May 12, 2026

    @etraut-openai
    Contributor

    Misunderstood the bug report. Reopening.

  5. added
    TUI
    and removed
    CLI
    on May 12, 2026
  6. etraut-openai commented on May 12, 2026

    @etraut-openai
    Contributor

    I'm not able to repro the problem.

    I'm guessing that you have codex_hooks = true in one of your config.toml files. Perhaps a project-local config file?

  7. omermosko4 commented on May 12, 2026

    @omermosko4
    Author

    I'm not able to repro the problem.

    I'm guessing that you have codex_hooks = true in one of your config.toml files. Perhaps a project-local config file?

    Nope, I only have the global ~/.codex/config.toml file

  8. TyceHerrman commented on May 12, 2026

    @TyceHerrman

    Seeing the same thing

  9. mySebbe commented on May 15, 2026

    @mySebbe

    I can reproduce this in Codex Desktop for Windows too, and in my case the active user config is already migrated.

    Environment:

    • Codex Desktop package: OpenAI.Codex_26.506.3741.0_x64__2p2nqsd0c76g0
    • Desktop app path: .../app/Codex.exe
    • App-bundled / PATH CLI: codex-cli 0.130.0-alpha.5
    • ~/.codex/config.toml contains:
    [features]
    hooks = true

    I searched the plausible active config locations and did not find an active codex_hooks entry in TOML/config. The warning still appears in the Desktop UI and logs.

    One additional data point: the installed Desktop bundle itself still contains a legacy internal override. In resources/app.asar I find exactly one features.codex_hooks occurrence:

    config:{web_search:`disabled`,features.codex_hooks:!1}

    This appears to be in an ephemeral thread_title generation path. The Desktop logs line up with that: the deprecation notice is emitted around internal/unknown turn/started events, followed shortly by:

    ephemeral_generation_token_usage ... feature=thread_title ...
    

    So at least for Codex Desktop on Windows, this looks like it may be triggered by an app-internal config override rather than by the user's config.toml. Migrating that internal override to features.hooks (or suppressing legacy deprecation notices for app-internal overrides) should likely clear the false warning.

  10. Zephyrlux commented on May 15, 2026

    @Zephyrlux

    I can reproduce this on Codex Desktop for macOS as well.

    Environment:

    • Codex Desktop log release: 26.513.20950
    • App-bundled CLI: codex-cli 0.131.0-alpha.9
    • PATH CLI: codex-cli 0.130.0
    • Active user config: ~/.codex/config.toml contains a [features] table, but no active codex_hooks key.
    • I did not find a project-local .codex/config.toml or .codex/hooks.json under the active workspace chain.

    Evidence:

    • codex features list reports hooks stable true.
    • The Desktop log emits the warning after hooks/list / thread startup activity, e.g.:
    2026-05-15T07:34:39.424Z info ... method=hooks/list ...
    2026-05-15T07:34:39.464Z warning ... summary="`[features].codex_hooks` is deprecated. Use `[features].hooks` instead."
    
    • The macOS app bundle itself contains the legacy internal override in /Applications/Codex.app/Contents/Resources/app.asar:
    config:{web_search:`disabled`,"features.codex_hooks":!1}

    This matches @mySebbe's Windows finding. On macOS this also appears to be triggered by an app-internal config override rather than by a user/project config.toml entry.

  11. seandearnaley commented on May 18, 2026

    @seandearnaley

    also experiencing this issue, no sign of a hooks configuration.

  12. dionysuzx commented on May 22, 2026

    @dionysuzx

    same issue. it's showing up with a project level config selected, but that project level config also no longer exists (so the "open config.toml ↗" doesn't work)

  13. jabza commented on May 22, 2026

    @jabza

    Same issue - wondering if there's other config.toml around from older Codex cli installs?

  14. papperrollinggery commented on May 27, 2026

    @papperrollinggery

    +1, same issue on v0.129.0 (macOS arm64). config.toml has [features] hooks = true, no codex_hooks anywhere. Warning appears every session start. Confirmed via strings that codex_hooks is an internal feature flag name in the native binary — the deprecation check seems to trigger on the internal name, not the config key.

  15. removed
    TUI
    on Jul 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugconfighooks

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions