Skip to content

Codex runtime route is hard to verify after the 2026.6.1 openai-codex migration #90420

Closed

Description

@ooiuuii

Summary

After the OpenClaw 2026.6.1 Codex migration, legacy openai-codex/* model references are supposed to become canonical openai/* model references with agentRuntime.id = "codex".

That route is functionally correct, but it is hard to verify from the model picker / models.list surface when the selected model visually looks like a plain OpenAI model. In a real upgrade, this made it easy to miss stale legacy route state in a live Telegram direct session.

Real environment

  • OpenClaw: official 2026.6.1 upgrade path from a 5.x install
  • Runtime shape: native Codex runtime with preserved OAuth/subscription auth
  • Channel shape: Telegram direct session using the main agent
  • Intended route after migration: openai/gpt-5.5 with agentRuntime.id = "codex"
  • Privacy note: direct chat ids, IPs, OAuth account ids, and tokens are intentionally redacted

Actual behavior observed

A new smoke session could look healthy after migration, while the existing real Telegram direct/main session still failed with:

Unknown model: openai-codex/gpt-5.5

The stale route was not obvious from the model picker/model-list surface because the repaired route also appears as openai/gpt-5.5 unless runtime metadata is visible separately.

Expected behavior

When a model choice is configured as an OpenAI model but routed through the Codex runtime, the Gateway/UI model surface should make that runtime visible while preserving the canonical selected model value.

For example, a repaired route should be observable as:

{
  "provider": "openai",
  "id": "gpt-5.5",
  "name": "gpt-5.5",
  "agentRuntime": {
    "id": "codex",
    "source": "model",
    "label": "OpenAI Codex"
  }
}

This lets operators distinguish:

  • plain openai/gpt-5.5
  • openai/gpt-5.5 routed through Codex
  • stale openai-codex/* session/config state
  • explicit OpenClaw/default runtime overrides

Why this matters

Without visible runtime metadata, the safe 6.1 migration path is harder to audit:

  1. A newly-created smoke session can pass.
  2. A real existing Telegram/direct session can still contain stale openai-codex/* state.
  3. The healthy canonical route still displays as openai/gpt-5.5 unless runtime metadata is surfaced.
  4. Operators can think migration is complete while real sessions still fail.

This is an observability/diagnostic gap around a migration and runtime routing boundary, not a request to reintroduce openai-codex/* as the user-facing provider route.

Related work

PR #90328 proposes exposing configured model runtime metadata through models.list and the model picker so openai/gpt-5.5 can show OpenAI Codex when it is routed through the Codex runtime.

Related context: #84032, #90036, #90047.

Activity

  1. clawsweeper commented on Jun 4, 2026

    @clawsweeper
    Contributor

    Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed June 21, 2026, 7:43 AM ET / 11:43 UTC.

    Summary
    Keep open. Current main and v2026.6.9 still lack agentRuntime metadata on models.list model choices and WebUI picker labels, while the proof-positive implementation at #90328 remains open for maintainer protocol/product acceptance.

    Reproducibility: yes. for the source-level observability gap: current main lacks agentRuntime on ModelChoice, models.list does not decorate rows with runtime metadata, and the WebUI picker label path has no runtime suffix. I did not replay the original Telegram upgrade scenario.

    Root-cause cluster
    Relationship: canonical
    Canonical: #90420
    Summary: This issue is the specific 2026.6.1 OpenAI/Codex migration observability report; the open PR is the implementation candidate, while older/broader reports and overlapping runtime-label PRs do not replace it before the canonical PR lands.

    Members:

    Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

    Next step
    The same-author open PR already owns the implementation and needs maintainer protocol/product acceptance, so a competing automated fix PR should not be queued.

    Review details

    Best possible solution:

    Review and land #90328, or an equivalent single canonical optional ModelChoice.agentRuntime contract, while preserving canonical openai/* model values.

    Do we have a high-confidence way to reproduce the issue?

    Yes, for the source-level observability gap: current main lacks agentRuntime on ModelChoice, models.list does not decorate rows with runtime metadata, and the WebUI picker label path has no runtime suffix. I did not replay the original Telegram upgrade scenario.

    Is this the best way to solve the issue?

    Yes, conditionally: projecting the existing runtime resolver into optional model-choice display metadata preserves canonical openai/* refs and avoids reintroducing openai-codex/*. The remaining question is maintainer acceptance of the public protocol/display contract.

    AGENTS.md: found and applied where relevant.

    Remaining risk / open question:

    • The remaining implementation adds an optional public Gateway ModelChoice field and client display behavior, so maintainer protocol/product acceptance is still required before merge.
    • This review confirms the source-level observability gap but did not replay the original 2026.6.1 Telegram upgrade/session scenario end to end.
    • Overlapping open runtime-label/model-picker PRs could create parallel metadata shapes unless maintainers route them to the same canonical field.

    Codex review notes: model internal, reasoning high; reviewed against d1cbe29f3d52.

    Label changes

    Label justifications:

    • P2: The issue affects real OpenAI/Codex route diagnosability after migration but is not an emergency crash, data-loss, or unusable-runtime report.
    • impact:session-state: The motivating failure involved an existing Telegram direct session retaining stale openai-codex/* route state after migration.
    • impact:auth-provider: The report is about distinguishing canonical model choice, OpenAI/Codex auth route, and Codex runtime selection.
    Evidence reviewed

    What I checked:

    • Repository policy read and applied: Root AGENTS.md and scoped gateway/server-methods/UI guides were read fully; provider routing, Gateway protocol, WebUI picker behavior, and Codex/runtime visibility are compatibility-sensitive review inputs here. (AGENTS.md:16, d1cbe29f3d52)
    • Current protocol schema lacks model-choice runtime metadata: ModelChoiceSchema exposes id, name, provider, alias, available, contextWindow, and reasoning, but no agentRuntime field for models.list rows. (packages/gateway-protocol/src/schema/agents-models-skills.ts:15, d1cbe29f3d52)
    • Current Gateway projection omits runtime metadata: buildPublicModelsListEntry strips runtime params and returns catalog metadata plus availability; it does not call the existing runtime metadata resolver or attach display runtime data. (src/gateway/server-methods/models-list-result.ts:207, d1cbe29f3d52)
    • Current WebUI picker labels have no runtime suffix path: buildCatalogDisplayLookup disambiguates by name/provider/raw label only, so a canonical openai/gpt-5.5 Codex route can still display like a plain OpenAI model. (ui/src/ui/chat-model-ref.ts:187, d1cbe29f3d52)
    • Runtime metadata source exists but is not projected to model choices: resolveModelAgentRuntimeMetadata already derives runtime id/source from provider/model policy and session overlays, making the remaining gap the models.list/picker projection contract. (src/agents/agent-runtime-metadata.ts:8, d1cbe29f3d52)
    • Docs define runtime policy but not models.list runtime output: Current docs say provider/model runtime policy belongs on model/provider config and OpenAI official models select Codex by default, while the models.list protocol section only documents view selection. Public docs: docs/gateway/config-agents.md. (docs/gateway/config-agents.md:467, d1cbe29f3d52)

    Likely related people:

    • ooiuuii: Authored the open focused PR that directly adds the requested models.list runtime metadata and WebUI picker runtime label behavior. (role: linked implementation author; confidence: high; commits: bc62b391bf7f; files: packages/gateway-protocol/src/schema/agents-models-skills.ts, src/gateway/server-methods/models-list-result.ts, src/gateway/server-methods/models-list-runtime-metadata.ts)
    • obviyus: Recent history shows clustered models-list-result.ts work around Codex model visibility and model availability, adjacent to the missing metadata projection. (role: gateway model-list contributor; confidence: high; commits: afa04d6454f5, 85343ea54608, 21512a696ff1; files: src/gateway/server-methods/models-list-result.ts)
    • pashpashpash: History on the runtime metadata path includes OpenAI Codex migration/runtime policy work that is the source this issue wants surfaced. (role: runtime routing contributor; confidence: medium; commits: 02fe0d8978db, 8f4eaa9c00be; files: src/agents/agent-runtime-metadata.ts, src/agents/harness/policy.ts)
    • steipete: History shows OpenAI provider identity unification plus docs/runtime status work around the same model-provider/runtime boundary. (role: adjacent runtime and docs contributor; confidence: medium; commits: 4c33aaa86c16, 634174f050b4, e5dc0e6d15ea; files: src/agents/openai-routing.ts, docs/gateway/config-agents.md, src/agents/agent-runtime-metadata.ts)
    • Mule-ME: Prior merged Control UI work preserved configured model metadata in the picker, a nearby precedent for this label-disambiguation path. (role: adjacent UI picker contributor; confidence: medium; commits: 4977c4ab8221; files: ui/src/ui/chat-model-ref.ts, ui/src/ui/chat-model-ref.test.ts)
    How this review workflow works
    • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
    • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
    • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
    • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
    • Maintainers can also comment @clawsweeper review to request a fresh review only.
    • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
    • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
    • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.
  2. ooiuuii commented on Jun 14, 2026

    @ooiuuii
    ContributorAuthor

    @clawsweeper re-review

    Retrying because the previous issue review failed with a retryable Codex transport failure before it could establish a reproduction path. The related fix PR #90328 now explicitly refs this issue and has current proof/status labels (proof: sufficient, rating: 🐚 platinum hermit, status: 👀 ready for maintainer look). Please re-evaluate the issue for appropriate triage labels against that updated context.

  3. clawsweeper commented on Jun 14, 2026

    @clawsweeper
    Contributor

    🦞🧹
    ClawSweeper re-review requested.

    I asked ClawSweeper to review this item again.
    Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
    Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

    Re-review progress:

  4. added
    P2Normal backlog priority with limited blast radius.
    impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.
    impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.
    issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.
    clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.
    clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.
    clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.
    clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.
    clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.
    and removed
    clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.
    on Jun 14, 2026
  5. added a commit that references this issue on Jul 16, 2026
    3c8269c
  6. added a commit that references this issue on Jul 16, 2026
    2cb99a4
  7. locked as resolved and limited conversation to collaborators on Sep 4, 2026
  8. added a commit that references this issue on Sep 11, 2026
    36041a0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal backlog priority with limited blast radius.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions