Repository navigation
Description
Version: OpenClaw 2026.11.2, Node 26.12.1, Linux x64.
Symptoms
/modelprovider list:anthropic: Sign-in needed. If Claude Code is signed out, run claude auth login…,Models (anthropic) — 0 of 4 available./model anthropic/claude-opus-5-5→❌ A runtime is not available for anthropic/claude-opus-5-5. Same with--runtime claude-cli.- But
claude auth statusis valid and real agent turns routed toanthropic/*viaclaude-clisucceed (resolvedProvider: anthropic,modelApplied: true).
Root cause
In dist/model-auth-availability-*.mjs (evaluateRuntimeModelAuth), the CLI backend binding is resolved without config:
const binding = resolveCliRuntimeModelBackendBinding({ provider, runtime: runtimeProvider });resolveCliRuntimeModelBackendBinding only consults the plugin setup registry when params.config is defined (params.config === void 0 ? void 0 : resolvePluginSetupCliBackend(...)), so binding is undefined. Then:
if (ref.runtimeId && runtimeProvider !== normalizeProviderId(provider) && !binding)
return { availability: false, unavailableReason: "missing-auth" };runtimeProvider = claude-cli, normalizeProviderId(provider) = anthropic → missing-auth before the auth policy is even evaluated. model-runtime-choice then aborts with "runtime not available".
Secondary: when the profile selector returns nothing and the CLI backend policy declares nativeAuthProfileIds (["anthropic:claude-cli"]), the native credential is never accepted, because selectCliExecutionAuthProfile explicitly excludes native profile ids from its loop.
Fix (verified locally)
const binding = resolveCliRuntimeModelBackendBinding({
provider,
- runtime: runtimeProvider
+ runtime: runtimeProvider,
+ config: params.cfg,
+ env: params.env,
+ metadataSnapshot: params.metadataSnapshot
});plus, after the profile-selection miss, accept the native credential when authPolicy.nativeAuthProfileIds?.length (evidence native, mode oauth).
Result after patch + gateway restart
evaluateRuntimeModelAuth("anthropic", …):missing-auth→availability: true, evidence: "native".prepareModelChoice("anthropic/claude-sonnet-5-5")withoverride/manual-override, with and withoutruntimeId: "claude-cli":unavailable→resolved(4/4)./model anthropic 1→4 available;/model anthropic/claude-opus-5-5succeeds; real turn runs onclaude-cli/claude-opus-5-5.
Happy to provide more detail.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
clawsweeper commentedon Nov 10, 2026
Codex review: this still needs some work.
Summary
Keep open: current main still resolves the CLI binding without configuration and can reject a valid Claude CLI route before checking prepared native authentication.
Reproducibility: Source establishes a deterministic failure with a metadata-declared Claude backend, no ambient backend registration, and prepared native login: the missing binding triggers rejection before readiness is consulted; no live reproduction or tests were run.
Next step
Fix the omitted binding context after establishing a failing metadata-only Claude selection regression, preserving signed-out rejection and explicit account constraints.
Review details
Best possible solution:
Resolve CLI bindings from the prepared configuration and metadata, then retain the existing native-login and explicit-account readiness checks.
Do we have a high-confidence way to reproduce the issue?
Source establishes a deterministic failure with a metadata-declared Claude backend, no ambient backend registration, and prepared native login: the missing binding triggers rejection before readiness is consulted; no live reproduction or tests were run.
Is this the best way to solve the issue?
Passing the prepared binding context addresses the demonstrated defect; the suggested unconditional native fallback is unnecessary because a profile-selection miss already reaches prepared native readiness.
AGENTS.md: found and applied where relevant.
Remaining risk / open question:
Codex review notes: model internal, reasoning medium; reviewed against c321c038b59c.
Label changes
Label changes:
P2: The report establishes a bounded model-selection failure while inference through the configured CLI still works.impact:auth-provider: Runtime binding resolution can incorrectly classify usable native authentication as missing.impact:ux-friction: The model command directs an already authenticated operator toward unnecessary sign-in.issue-rating: 🦞 diamond lobster: Current issue advisory state selects this label.clawsweeper:source-repro: Current issue advisory state selects this label.clawsweeper:queueable-fix: Current issue advisory state selects this label.clawsweeper:fix-shape-clear: Current issue advisory state selects this label.Label justifications:
P2: The report establishes a bounded model-selection failure while inference through the configured CLI still works.impact:auth-provider: Runtime binding resolution can incorrectly classify usable native authentication as missing.impact:ux-friction: The model command directs an already authenticated operator toward unnecessary sign-in.Evidence reviewed
Acceptance criteria:
What I checked:
src/agents/model-auth-availability.cli-runtime.ts:78, c321c038b59c)src/agents/cli-backends.ts:214, c321c038b59c)src/agents/model-auth-availability.cli-runtime.ts:125, c321c038b59c)src/agents/model-auth-availability.runtime-policy.test.ts:27, c321c038b59c)docs/gateway/cli-backends.md:32, c321c038b59c)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 explainto ask for more context, or@clawsweeper stopto stop active automation.Reviewed November 10, 2026, 9:08 AM ET / 14:08 UTC.