Skip to content

docs: describe Claude CLI as a primary runtime with canonical model refs - #166319

Merged
obviyus merged 2 commits into
mainfrom
docs/claude-cli-primary-route
Oct 6, 2026
Merged

obviyus merged 2 commits into
mainfrom
docs/claude-cli-primary-route

Conversation

@obviyus

@obviyus obviyus commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator

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-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 (d8f1124, January 2026), when a CLI backend had no tools. Later docs rewrites (852e8f7 and docs: rewrite published docs grounded in current source #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 fix(models): list each Claude CLI model once in the model picker #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 91236e8). 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.

@clawsweeper

clawsweeper Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review in progress

ClawSweeper is reviewing this revision. This supersedes any previous blocked status.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime docker Docker and sandbox tooling size: XS labels Oct 6, 2026
@obviyus
obviyus marked this pull request as ready for review October 6, 2026 22:16
@obviyus

obviyus commented Oct 6, 2026

Copy link
Copy Markdown
Collaborator Author

@clawsweeper review

@clawsweeper

clawsweeper Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 6, 2026
@clawsweeper

clawsweeper Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed October 6, 2026, 6:20 PM ET / 22:20 UTC.

ClawSweeper review

What this changes

Updates 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
Reviewed head: 7bebb17b3e16016b2d7cb07801f19d11e65f2dd0

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, source-supported documentation correction with no actionable patch findings.
Proof confidence 🌊 off-meta tidepool Not applicable: Real behavior proof is not required because this PR only changes files under docs/.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: Real behavior proof is not required because this PR only changes files under docs/.
Evidence reviewed 7 items Verified introduced documentation changes: The pinned merge-base-to-head diff changes documentation wording and examples only; frontmatter titles and runtime implementations are unchanged.
Canonical configuration owner: The login migration seeds canonical Anthropic model entries with Claude CLI runtime policy and returns the selected canonical default. Explicit existing runtime choices are preserved by modelEntryWithClaudeCliRuntime. These production files have no differences between fetched main and the reviewed head.
Gateway tool bridge and implementation boundary: The Anthropic-owned backend declares modelProvider anthropic, bundleMcp true, and claude-config-file integration, and executes the installed Claude Code transport. The changed claims do not depend on the sibling Codex implementation.
Findings None None.
Security None None.

How this fits together

OpenClaw 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]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Docs +3. Total +3 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 0 0 0 0
Docs 3 20 17 +3
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 20 17 +3

Review metrics

None.

Technical review

Best 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.

Labels

Label changes:

  • add P3: This corrects operator documentation and examples without changing runtime behavior, configuration contracts, or stored state.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: Real behavior proof is not required because this PR only changes files under docs/.

Label justifications:

  • P3: This corrects operator documentation and examples without changing runtime behavior, configuration contracts, or stored state.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: Real behavior proof is not required because this PR only changes files under docs/.

Evidence

What I checked:

  • Verified introduced documentation changes: The pinned merge-base-to-head diff changes documentation wording and examples only; frontmatter titles and runtime implementations are unchanged. Public docs: docs/gateway/cli-backends.md. (docs/gateway/cli-backends.md:10, 7bebb17b3e16)
  • Canonical configuration owner: The login migration seeds canonical Anthropic model entries with Claude CLI runtime policy and returns the selected canonical default. Explicit existing runtime choices are preserved by modelEntryWithClaudeCliRuntime. These production files have no differences between fetched main and the reviewed head. (extensions/anthropic/cli-migration.ts:148, 51f772aeefbc)
  • Gateway tool bridge and implementation boundary: The Anthropic-owned backend declares modelProvider anthropic, bundleMcp true, and claude-config-file integration, and executes the installed Claude Code transport. The changed claims do not depend on the sibling Codex implementation. (extensions/anthropic/cli-backend.ts:175, 51f772aeefbc)
  • Correction remains necessary: The original CLI backend page still describes the runtime as a text-only safety net and demonstrates legacy model references, despite already documenting canonical runtime configuration elsewhere on the same page. Public docs: docs/gateway/cli-backends.md. (docs/gateway/cli-backends.md:10, 91236e8c9501)
  • Related work and discussion: The supplied discussion identifies fix(models): list each Claude CLI model once in the model picker #166311 as separate model-picker deduplication work, including its ownership of the Anthropic provider-page paragraph. Live comments contain a review request and automation acknowledgments, with no additional substantive objections.
  • Area-history routing: Current-main path history records Peter Steinberger's provider refactors and Ayaan Zaidi's native Claude authentication work. Deeper blame and historical-object inspection encountered unavailable promisor objects and HTTP 403 responses, so no source-line introduction attribution or first-shipped release is claimed. (extensions/anthropic/cli-migration.ts, 51f772aeefbc)

Likely related people:

  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Ayaan Zaidi: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • 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.

@obviyus
obviyus merged commit 69751cf into main Oct 6, 2026
130 of 131 checks passed
@obviyus
obviyus deleted the docs/claude-cli-primary-route branch October 6, 2026 22:23
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 7, 2026
…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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docker Docker and sandbox tooling docs Improvements or additions to documentation gateway Gateway runtime P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant