codex - 💡(How to fix) Fix Hot-reload hook configuration during a live session [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openai/codex#17636Fetched 2026-04-14 05:41:58
View on GitHub
Comments
1
Participants
2
Timeline
9
Reactions
1
Timeline (top)
labeled ×5unlabeled ×2commented ×1cross-referenced ×1

Root Cause

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.

RAW_BUFFERClick to expand / collapse

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:

  • #14814 Add a native pre-turn dynamic context hook for time-sensitive metadata
  • #16430 Plugin docs/examples imply plugin-local hooks, but runtime only executes global hooks.json
  • #16466 Hooks should support stable bundle/plugin context for reusable hook scripts
  • #16607 Resumed threads keep stale model-visible skills after new skills are added

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.

extent analysis

TL;DR

Implementing a mechanism to reload hook configurations during a live session, such as watching hook config files or adding a manual reload command, can address the issue of requiring a restart to apply hook changes.

Guidance

  • Consider implementing a file watcher for ~/.codex/hooks.json and repo-local hook configuration files to automatically reload the effective hook set when changes are detected.
  • Introduce a manual reload command, such as /reload-hooks, to allow users and agents to explicitly request a hook reload.
  • Evaluate the feasibility of re-resolving hook config before each lifecycle event, weighing the potential performance impact against the benefits of dynamic hook updates.
  • Explore exposing an app-server/CLI control path for trusted local automation to request hook reloads, ensuring proper security and access controls are in place.

Example

No specific code example is provided, as the solution requires integration with the existing Codex architecture and hook management system.

Notes

The chosen solution should balance the need for dynamic hook updates with potential performance and security considerations. It is essential to ensure that any implementation does not introduce unintended side effects or vulnerabilities.

Recommendation

Apply a workaround, such as implementing a manual reload command or file watcher, as it provides a more immediate solution to the problem, allowing for more flexibility and control over hook updates during live sessions.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING