Repository navigation
docs: describe Claude CLI as a primary runtime with canonical model refs - #166319
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review in progressClawSweeper is reviewing this revision. This supersedes any previous blocked status. |
|
@clawsweeper review |
|
🦞👀 Re-review progress:
|
|
Codex review: needs maintainer review before merge. Reviewed October 6, 2026, 6:20 PM ET / 22:20 UTC. ClawSweeper reviewWhat this changesUpdates CLI backend, Docker, and ACP documentation to describe Claude Code as a primary agent runtime using canonical Anthropic model references and Gateway tools through MCP. Merge readiness✅ Ready for maintainer review Keep open: this is a useful, source-supported documentation correction that current main still needs. No introduced correctness defect was found, and the related model-picker work does not supersede it. Priority: P3 Review scores
Verification
How this fits togetherOpenClaw selects a model and its configured runtime before executing an agent turn. The Anthropic plugin can run canonical Anthropic models through the installed Claude Code CLI, with Gateway tools supplied through a local MCP bridge. flowchart TD
A[Login or onboarding] --> B[Canonical model configuration]
B --> C[Runtime selection]
D[Agent request] --> C
C --> E[Claude Code CLI]
E <--> F[Gateway MCP tools]
E --> G[Agent reply]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceDocs +3. Total +3 across 3 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep the operator documentation consistent with the existing canonical model configuration, runtime selection, and MCP tool bridge. Do we have a high-confidence way to reproduce the issue? Not applicable: this is documentation work; source inspection verifies the mismatch between the existing fallback-only description and the supported Claude CLI runtime. Is this the best way to solve the issue? Yes: updating the existing documentation and examples is a focused solution that follows the current configuration owner without introducing another implementation. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 51f772aeefbc. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
…efs (openclaw#166319) Related: openclaw#166311 ## What Problem This Solves The CLI backends page tells people Claude Code is a "text-only fallback… not a primary path", and its quick start uses a `claude-cli/claude-sonnet-5` ref. Neither matches what onboarding sets up today, and Doctor rewrites that ref anyway. ## User Impact Someone who sets up Claude Code with OpenClaw now reads the setup that onboarding actually writes. That setup keeps `anthropic/*` model refs and runs them through Claude Code as the primary runtime, with Gateway tools available through the MCP bridge. The quick start, fallback, and Docker examples all use the canonical form that Doctor produces, so copying them no longer leaves config for Doctor to rewrite. ## Why This Change Was Made - **Where the wording came from.** The "text-only fallback / safety net, not a primary path" framing dates back to the first CLI backend commit (711d884, January 2026), when a CLI backend had no tools. Later docs rewrites (46236a1 and openclaw#100142) kept the framing, even after `bundleMcp` arrived. Today the bundled `claude-cli` backend sets `bundleMcp: true` (`extensions/anthropic/cli-backend.ts`). Choosing **Claude CLI** in onboarding (`buildAnthropicCliMigrationResult` in `extensions/anthropic/cli-migration.ts`) sets an `anthropic/*` default model and adds `agentRuntime: { id: "claude-cli" }` to the Claude model entries. So Claude Code is the primary runtime. - **Canonical refs.** The quick start, the fallback example, and the Docker smoke command now use `anthropic/*` refs, relying on the runtime pin that the login writes. This matches `docs/providers/anthropic.md` and `docs/concepts/agent-runtimes.md`, which already document `anthropic/*` plus `agentRuntime.id` as the preferred form and `claude-cli/*` as legacy compatibility input. - **How it works.** Step 1 now says the backend is chosen by the model's runtime policy. A standalone backend's provider prefix still works, matching `docs/plugins/cli-backend-plugins.md#selecting-the-backend`. - **Not changed.** `docs/providers/anthropic.md` is untouched. Its route paragraph is owned by openclaw#166311, and the rest of the page already shows the canonical form. - **ACP page.** `docs/tools/acp-agents.md` said CLI backends are "text-only local fallback runtimes" with "no OpenClaw tools". Its comparison row and operator rule now describe them as a model runtime for normal agent turns, with Gateway tools only through the MCP bridge. ## Evidence - **Doctor (real path, origin/main e832181).** Doctor rewrites the old fallback example into the new one. I ran `openclaw doctor --fix --non-interactive` from source on an isolated `HOME`, `OPENCLAW_STATE_DIR` and `OPENCLAW_CONFIG_PATH` under `/tmp`, using the previous docs fallback config. It rewrote `fallbacks: ["claude-cli/claude-sonnet-5"]` and the `claude-cli/claude-sonnet-5` model key to `anthropic/claude-sonnet-5` with `agentRuntime: { id: "claude-cli" }`. That is exactly the new example. - **Onboarding (real path, isolated state, Claude Code logged in).** `openclaw onboard --non-interactive --auth-choice anthropic-cli` wrote `model.primary: "anthropic/claude-opus-5-5"` and `agentRuntime: { id: "claude-cli" }` on all ten bundled Claude model entries, including `anthropic/claude-sonnet-5` and `anthropic/claude-sonnet-4-6`. No `claude-cli/*` keys were written. That is the shape the quick start and Docker text describe. - **Docs checks.** - Passed: `pnpm format:docs:check`, `pnpm docs:check-mdx`, `pnpm docs:check-config-examples` (the new fallback block is validated against the schema), `pnpm docs:check-links:anchors` (0 broken links), `pnpm docs:check-i18n-glossary`, and `git diff --check`. - `pnpm docs:spellcheck` reports only 4 existing findings, all in untouched files (`web/control-ui/chat.md`, `cli/fleet.md`, `channels/x.md`). - Docs only. There is no UI change, so no screenshots. ## Bounded cost - **Runtime and config.** Nothing changes at runtime. The new examples are exactly the config Doctor and onboarding already produce, so readers who copy them get the same config, without a later Doctor rewrite. - **Scope.** Docs only: 3 files, +20/−17. There is no code, config schema, protocol, or migration change. Co-authored-by: Ayaan Zaidi <[email protected]>
Related: #166311
What Problem This Solves
The CLI backends page tells people Claude Code is a "text-only fallback… not a primary path", and its quick start uses a
claude-cli/claude-sonnet-5ref. Neither matches what onboarding sets up today, and Doctor rewrites that ref anyway.User Impact
Someone who sets up Claude Code with OpenClaw now reads the setup that onboarding actually writes. That setup keeps
anthropic/*model refs and runs them through Claude Code as the primary runtime, with Gateway tools available through the MCP bridge. The quick start, fallback, and Docker examples all use the canonical form that Doctor produces, so copying them no longer leaves config for Doctor to rewrite.Why This Change Was Made
bundleMcparrived. Today the bundledclaude-clibackend setsbundleMcp: true(extensions/anthropic/cli-backend.ts). Choosing Claude CLI in onboarding (buildAnthropicCliMigrationResultinextensions/anthropic/cli-migration.ts) sets ananthropic/*default model and addsagentRuntime: { id: "claude-cli" }to the Claude model entries. So Claude Code is the primary runtime.anthropic/*refs, relying on the runtime pin that the login writes. This matchesdocs/providers/anthropic.mdanddocs/concepts/agent-runtimes.md, which already documentanthropic/*plusagentRuntime.idas the preferred form andclaude-cli/*as legacy compatibility input.docs/plugins/cli-backend-plugins.md#selecting-the-backend.docs/providers/anthropic.mdis untouched. Its route paragraph is owned by fix(models): list each Claude CLI model once in the model picker #166311, and the rest of the page already shows the canonical form.docs/tools/acp-agents.mdsaid CLI backends are "text-only local fallback runtimes" with "no OpenClaw tools". Its comparison row and operator rule now describe them as a model runtime for normal agent turns, with Gateway tools only through the MCP bridge.Evidence
openclaw doctor --fix --non-interactivefrom source on an isolatedHOME,OPENCLAW_STATE_DIRandOPENCLAW_CONFIG_PATHunder/tmp, using the previous docs fallback config. It rewrotefallbacks: ["claude-cli/claude-sonnet-5"]and theclaude-cli/claude-sonnet-5model key toanthropic/claude-sonnet-5withagentRuntime: { id: "claude-cli" }. That is exactly the new example.openclaw onboard --non-interactive --auth-choice anthropic-cliwrotemodel.primary: "anthropic/claude-opus-5-5"andagentRuntime: { id: "claude-cli" }on all ten bundled Claude model entries, includinganthropic/claude-sonnet-5andanthropic/claude-sonnet-4-6. Noclaude-cli/*keys were written. That is the shape the quick start and Docker text describe.pnpm format:docs:check,pnpm docs:check-mdx,pnpm docs:check-config-examples(the new fallback block is validated against the schema),pnpm docs:check-links:anchors(0 broken links),pnpm docs:check-i18n-glossary, andgit diff --check.pnpm docs:spellcheckreports only 4 existing findings, all in untouched files (web/control-ui/chat.md,cli/fleet.md,channels/x.md).Bounded cost