Repository navigation
Description
Bug type
Behavior bug (model-selection control path)
Beta release blocker
No
Summary
The Control UI model picker can persist an openai/* model even when its required codex agent harness has no installed/activatable owner. The picker does not invoke the existing runtime-plugin ensure/install path and does not validate prepared-runtime readiness before committing the selection. The first turn then fails before inference.
This issue is intentionally limited to selection-time runtime readiness. A separate issue tracks working claude-cli/* rows being projected as unavailable and disabled by the picker.
Steps to reproduce
-
Use OpenClaw 2026.8.1 with valid OpenAI OAuth and no installed
@openclaw/codexplugin. -
Start with a working model, for example
claude-cli/claude-opus-5. -
In the Control UI model picker, select
openai/gpt-5.6-sol. -
Observe the Gateway log:
persisted sticky model selection agentId=main model=openai/gpt-5.6-sol target=defaults -
Send a message.
Expected behavior
Before committing the model selection, the UI/Gateway should do one of the following:
- verify that the resolved harness owner is registered and ready;
- invoke the supported runtime-plugin setup flow and require explicit capability acceptance where needed; or
- refuse the selection with an actionable explanation that names
@openclaw/codexand anyplugins.allowblocker.
The prior runnable selection should remain usable from the UI.
Actual behavior
-
sessions.patchaccepts the selection and sticky persistence writes it to the configured default under the current unset/effective scope. -
There is no Codex plugin install/provision attempt in the Gateway log.
-
The next turn fails in 26-27 ms:
Agent harness runtime "codex" is unavailable because its plugin registration is missing from this prepared run. -
openclaw models statusknows the route is unavailable, but that state does not gate the picker commit.
Source evidence
sessions.patchcallspersistSessionPatchModelSelection; that path does not callensureModelSelectionRuntimePlugins.- Runtime-plugin ensure/repair helpers exist for onboarding and CLI model-selection flows, but not this UI patch path.
- The official Codex harness requires
@openclaw/codexto be installed and, when a restrictive allowlist is configured,codexto be included inplugins.allow.
Version
OpenClaw 2026.8.1 (ea80657), npm install, macOS, Node 26.7.0.
Related
- [Bug]: Unregistered required agent harness leaves model-dependent turns failing while Gateway stays healthy #134304: readiness and actionable diagnostics for a configured-but-unregistered harness.
- [Feature]: Make the model picker write scope explicit (or default row clicks to session scope) #134306: the separate product/UX question of which scope a picker click persists to.
- [Bug]: Gateway reports authenticated claude-cli models unavailable, so Control UI hard-disables working rows #134325: working Claude CLI models are independently projected as unavailable and disabled client-side.
Privacy
No credentials, account identifiers, tokens, or private filesystem contents are included.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
goslingmanagment commentedon Aug 31, 2026
Correction on the dead-rows mechanism (updating my own report; the user-facing symptom and asks are unchanged):
claude-cli/*is wrong.openclaw plugins inspect anthropic --jsonon the affected box shows"activated": true, "status": "loaded", "activationReason": "bundled default enablement", and the full catalog (models list --all) still contains allclaude-cli/*andanthropic/*models.openai/*default still in place, a CLI probe succeeds immediately —openclaw agent --agent main --model claude-cli/claude-opus-5 -m 'Reply exactly PROBE_OK'returnsPROBE_OK. The backend, harness, and native Claude CLI auth are all healthy while the picker shows those same models as unselectable.sessions.patchat all (every sticky persist in the gateway log is anopenai/*model), so the disable is client-side. The likely trigger:claude-climodels reportAuth -— the synthetic native-CLI auth (syntheticAuthRefs: ["claude-cli"], markeropenclaw:claude-cli-native-auth) is not surfaced as a usable auth signal to the picker, whileopenai/*models show a stored OAuth profile.So the picker simultaneously (a) marks a provably working model unavailable with no reason shown, and (b) lets the user persist a model that cannot run. Expected behavior from the original report applies to both directions.
clawsweeper commentedon Aug 31, 2026
🦞⚠️
Automatic implementation stopped before completion.
Reason: The automatic implementation worker stopped before all deterministic gates completed. Open the workflow run for the exact blocker.
Worker: https://github.com/openclaw/clawsweeper/actions/runs/33418786680
clawsweeper commentedon Aug 31, 2026
Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed August 31, 2026, 1:42 PM ET / 17:42 UTC.
Summary
Keep open: current main still accepts and persists a selected OpenAI route without checking whether its required harness is runnable, while the later run boundary fails on the missing registration. The reported 2026.8.1 behavior is also present in the released source.
Reproducibility: yes. source-reproducible: current main accepts an allowed OpenAI model in sessions.patch, persists it under sticky scope, and only the later prepared run rejects the missing harness. The supplied 2026.8.1 report and released source match that path; this read-only review did not execute a local live setup.
Maintainer decision needed
Why: The defect must be fixed, but initiating plugin installation and capability consent from a session-selection RPC is a separate UX and security boundary from rejecting an unrunnable selection.
Next step
The missing invariant is source-proven, but a maintainer must choose the explicit setup-versus-rejection interaction across the Gateway, plugin-control-plane, and Control UI boundaries.
Review details
Best possible solution:
Publish and consume one prepared harness-readiness result before persistence, preserving the prior runnable selection and returning an actionable Codex-plugin/allowlist recovery path; keep installation and consent in the existing control-plane setup owner.
Do we have a high-confidence way to reproduce the issue?
Yes, source-reproducible: current main accepts an allowed OpenAI model in sessions.patch, persists it under sticky scope, and only the later prepared run rejects the missing harness. The supplied 2026.8.1 report and released source match that path; this read-only review did not execute a local live setup.
Is this the best way to solve the issue?
Yes for the invariant: readiness must be checked before persistence and the existing consented installer must not be called as an unprompted runtime shortcut. Maintainer direction is still needed on whether recovery is a rejection with guidance or an explicit setup flow.
AGENTS.md: found and applied where relevant.
Remaining risk / open question:
Codex review notes: model internal, reasoning high; reviewed against a6e3ebd5b4f7.
Label changes
Label justifications:
P1: A normal picker action can save a model route that causes the next real agent turn to fail before inference.impact:auth-provider: The failure is model-to-harness/plugin routing readiness, including the configured OpenAI authentication path.impact:ux-friction: The picker currently permits an invalid choice and does not provide its recovery path at selection time.Evidence reviewed
What I checked:
src/gateway/sessions-patch.ts:95, a6e3ebd5b4f7)src/gateway/server-methods/sessions-patch-model-selection.ts:20, a6e3ebd5b4f7)src/agents/harness/runtime-plugin.ts:136, a6e3ebd5b4f7)src/commands/runtime-plugin-install.ts:135, a6e3ebd5b4f7)src/gateway/server-methods/sessions-mutations.sticky-model.test.ts:180, a6e3ebd5b4f7)docs/plugins/codex-harness.md. (docs/plugins/codex-harness.md:100, ea806575e645)Likely related people:
How this review workflow works
@clawsweeper re-reviewcomments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.@clawsweeper re-reviewor@clawsweeper re-runon an open PR or issue to request a fresh review only.@clawsweeper reviewto request a fresh review only.@clawsweeper autofix,@clawsweeper automerge,@clawsweeper fix ci, or@clawsweeper address review.@clawsweeper explainto ask for more context, or@clawsweeper stopto stop active automation.[-][Bug]: Model picker persists a model whose harness runtime cannot register, then strands the user — previous default renders as dead rows with no reason[/-][+][Bug]: Model picker persists an OpenAI model without ensuring its required Codex harness can run[/+]goslingmanagment commentedon Aug 31, 2026
Clarification on the automated review: the picker does send a
sessions.patchrather than editing the config directly, but the Gateway then callspersistSessionPatchModelSelection. WithmodelSelectionScopeunset/effective in this live repro, that server-side sticky step did persist the configured default; the exact log ispersisted sticky model selection agentId=main model=openai/gpt-5.6-sol target=defaults. The scope/legibility question is tracked separately in #134306 and is not required to reproduce this issue: even with session-only scope, the picker can still accept an unexecutable model because runtime readiness is not checked.steipete commentedon Sep 1, 2026
Fixed by #134837, merged as 2e3cae2 and verified as an ancestor of current main.
The shared session projection now rejects a model with no activatable harness before changing the session or publishing a sticky default. Actual isolated Gateway RPC proof covered an absent custom harness, disabled implicit Codex, and a v2026.7.1-2-shaped agent roster/provider configuration migrated with
doctor --fix --non-interactive: bothsessions.patchandsessions.createreturned actionableINVALID_REQUEST; the previous model, label, and configuration stayed unchanged.The focused pair suite passed 118 cases, branch autoreview had no actionable P0–P2 findings, and exact-head CI run 33479490035 passed before the native prepare/merge wrapper landed it. Thanks @goslingmanagment for the report. Existing broken-config recovery remains tracked separately in #134304 / #134468.