openai/codex · error

failed to load required managed hooks: {}

Error message

failed to load required managed hooks: {}

What it means

Error "failed to load required managed hooks: {}" thrown in openai/codex.

Source

Thrown at codex-rs/hooks/src/registry.rs:81

    engine: ClaudeHooksEngine,
}

impl Hooks {
    /// Bind this session's hook runtime and output files to its thread, rejecting unloadable
    /// required managed hooks.
    pub fn new(
        config: HooksConfig,
        thread_id: ThreadId,
        mcp_executor: Arc<dyn HookMcpExecutor>,
    ) -> anyhow::Result<(Self, Receiver<codex_protocol::protocol::HookCompletedEvent>)> {
        let (result_sender, result_receiver) = async_channel::unbounded();
        let environment = Arc::new(std::env::vars_os().collect());
        let hooks = Self::from_config(config, mcp_executor, Arc::clone(&environment), |shell| {
            CommandHookRuntime::new(shell, environment, thread_id, result_sender)
        });
        let required_load_errors = hooks.engine.required_load_errors();
        if !required_load_errors.is_empty() {
            anyhow::bail!(
                "failed to load required managed hooks: {}",
                required_load_errors.join("; ")
            );
        }
        Ok((hooks, result_receiver))
    }

    /// Preserve in-flight background hooks while applying a refreshed configuration.
    pub fn reconfigured(&self, config: HooksConfig) -> Self {
        Self::from_config(
            config,
            Arc::clone(&self.engine.mcp_executor),
            Arc::clone(&self.environment),
            |shell| self.engine.command_runtime.reconfigured(shell),
        )
    }

    pub fn with_executor_hooks(&self, executor_hooks: Vec<ExecutorPluginHookSource>) -> Self {

View on GitHub (pinned to 339751715c)

When it happens

Trigger: Thrown at codex-rs/hooks/src/registry.rs:81 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of openai/codex@339751715c (2026-08-25). Data as JSON: /api/errors/97520363aeb342a6. Report an issue: GitHub.