Skip to content

Hot-reload hook configuration during a live session #17636

@ignatremizov

Description

@ignatremizov

What variant of Codex are you using?

CLI / TUI

What feature would you like to see?

Hot-reload hook configuration during a live session, so hook changes made by the agent or the user can take effect without restarting the thread.

More specifically:

  • if ~/.codex/hooks.json changes
  • if repo-local hook configuration changes
  • if supported hook-providing plugin config changes
  • Codex should reload the effective hook set for subsequent events in the same live session

This matters because hooks are increasingly part of workflow composition rather than one-time startup config. Today an agent can edit instructions, scripts, and repo state, but cannot reliably update the hook behavior that governs the current session without forcing a restart.

Concrete cases:

  • an agent should be able to install or adjust a hook as part of a task and have later events in the same session use it
  • a user should be able to iterate on hook behavior without restarting the thread each time
  • hook-driven approval/context automation should not require thread restarts to test changes

Any of these would solve it:

  1. watch hook config files and refresh the effective hook registry automatically
  2. add a manual reload command such as /reload-hooks
  3. re-resolve hook config before each lifecycle event if the cost is acceptable
  4. expose an app-server/CLI control path that allows trusted local automation to request hook reload explicitly

Additional information

Related adjacent issues:

I did not find an existing issue specifically for hot-reloading hooks or letting an agent manage its own hooks during the current live session.

Metadata

Metadata

Assignees

No one assigned

    Labels

    configIssues involving config.toml, config keys, config merging, or config updatesenhancementNew feature or requesthooksIssues related to event hooks

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions