Skip to content

[Bug]: Native codex/* provider catalog not registered during gateway startup — Unknown model: codex/gpt-5.4 on every restart #64938

Description

@adamamzalag

Environment

  • OpenClaw 2026.4.10 (44e5b62)
  • macOS 26.1.0 (arm64), Mac Mini M2 Pro
  • Codex CLI 0.120.0
  • Node v25.9.0

Config

  • plugins.entries.codex.enabled: true
  • codex in plugins.allow
  • agents.defaults.model.primary: "codex/gpt-5.4"
  • plugins.entries.codex.config.discovery.enabled: true
  • plugins.entries.codex.config.discovery.timeoutMs: 10000

Symptoms

  1. Gateway startup logs startup model warmup failed for codex/gpt-5.4: Error: Unknown model: codex/gpt-5.4 on every restart
  2. openclaw models list shows only the 2 hardcoded fallback models (gpt-5.4, gpt-5.4-mini) under codex/, not the full discovered catalog
  3. openclaw models list --all --provider codex returns "No models found"
  4. openclaw models list --all --json shows 0 models with provider=codex, while openai-codex has 9 discovered models
  5. openclaw models status --agent claude reports "Missing auth - codex"
  6. The Codex plugin shows as "loaded" in openclaw plugins list but is NOT in the gateway ready plugin list (10 plugins listed, codex absent)

What Works

  • codex app-server --listen stdio:// responds to initialize + model/list in <100ms, returning 5+ models
  • openclaw agent --agent claude --message "test" successfully uses codex/gpt-5.4 (provider=codex, model=gpt-5.4, status=ok)
  • The Codex harness works at runtime for actual messages — the provider catalog registration is the only broken part

Root Cause Hypothesis

The Codex provider registers with catalog.order: "late" in the plugin code. The gateway warmup check runs before the late-order catalog has completed, so warmup fails with "Unknown model." The catalog builder (buildCodexProviderCatalog) either never runs or its result is not persisted into the gateway's model registry.

Evidence: gateway log shows agent model: codex/gpt-5.4 and ready (10 plugins: ...) at 09:55:15, but codex is not in the 10 plugins. Warmup fails at 09:55:31 with Unknown model. The openai-codex provider (which uses the older registration path) has 9 models fully discovered and available.

Similar Issues

Expected Behavior

The native codex provider catalog should be fully registered before warmup runs, with the full discovered model list visible in openclaw models list.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions