feature: SIGUSR2 handler for live config and rules reload

Resolved 💬 1 comment Opened Mar 28, 2026 by langdon Closed May 31, 2026

Summary

Changing Codex configuration or rules currently requires restarting the session, which loses all in-progress context. A SIGUSR2 handler that reloads config and rules files live would allow operators to update agent behavior mid-session.

Use case

Common mid-session scenarios where live reload would help:

  • Switching the active model (e.g., to a faster model for a bulk subtask)
  • Adding or updating rules files without losing conversation context
  • Updating provider configuration without a full restart

Proposed behavior

  1. Codex registers a SIGUSR2 handler in the Node wrapper (codex-cli/bin/codex.js).
  2. On receipt, Codex re-reads its config file (~/.codex/config.toml or CODEX_CONFIG path) and any active rules files.
  3. Settings that can safely change mid-session take effect immediately (model, provider, rules). Settings that cannot (e.g., transport mode, sandbox policy) are logged as "requires restart."
  4. Codex emits a brief in-session notice: [config reloaded] so the operator knows the signal was received.

Why SIGUSR2

SIGHUP is the Unix convention for config reload in long-running processes, but Codex already forwards SIGHUP to child processes. SIGUSR2 is the standard alternative when SIGHUP is unavailable for application use.

Prior art

A similar proposal was filed for Claude Code: anthropics/claude-code#36849.

---

This issue was drafted collaboratively by a human operator and an AI assistant (AI-C per ai-attribution).

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗