Skip to content

docs: clarify Code Mode runtime surfaces - #83435

Closed
HemantSudarshan wants to merge 1 commit into
openclaw:mainfrom
HemantSudarshan:Hemant/docs-code-mode-disambiguation
Closed

HemantSudarshan wants to merge 1 commit into
openclaw:mainfrom
HemantSudarshan:Hemant/docs-code-mode-disambiguation

Conversation

@HemantSudarshan

Copy link
Copy Markdown
Contributor

Fixes #83390.

Summary

  • Adds a side-by-side comparison in docs/reference/code-mode.md that separates Codex Code Mode from OpenClaw code mode by owner, default state, model input shape, sandbox/lifecycle, and OpenClaw tool path.
  • Adds the reverse link in docs/plugins/codex-harness.md, including the fail-closed nuance for narrow Codex native tool allowlists.
  • Batches docs formatter input in scripts/format-docs.mjs so the required docs formatting check can run on Windows without exceeding command-line limits, and reports formatter spawn failures cleanly.

Problem summary

Both Codex and OpenClaw expose features called "code mode", but they are different mechanisms. The current docs only distinguished them in prose, so bug reports and evaluations could confuse Codex app-server Code Mode with OpenClaw's opt-in QuickJS-WASI tool-surface adapter.

Root cause

docs/reference/code-mode.md lacked a mechanism table for the two surfaces, and docs/plugins/codex-harness.md described Codex native code mode without linking back to the OpenClaw code-mode reference. While validating the docs fix locally on Windows, scripts/format-docs.mjs also passed the full docs file list to oxfmt in one process, which can exceed the Windows argument limit before pnpm check:docs reaches the Markdown checks.

Architectural reasoning

This does not change runtime behavior. The docs align to the existing source contracts:

  • OpenClaw code mode remains opt-in through tools.codeMode.enabled, uses quickjs-wasi, and exposes exec with code plus optional language.
  • Codex Code Mode remains owned by Codex app-server thread config and can be disabled when OpenClaw narrows the native Codex tool surface to avoid widening access.
  • Nested OpenClaw code-mode tool calls are still documented as going through the normal OpenClaw tool executor, policy, approvals, hooks, session context, and audit paths.
  • The formatter change is tooling-only and keeps the existing formatting behavior, just in bounded batches.

Testing performed

  • pnpm install --frozen-lockfile
  • pnpm docs:list
  • DOCS_I18N_GLOSSARY_BASE=upstream/main pnpm check:docs
  • node scripts/format-docs.mjs --check
  • pnpm lint:docs
  • node --check scripts/format-docs.mjs
  • pnpm check:changed
  • git diff --check

DOCS_I18N_GLOSSARY_BASE=upstream/main was used locally because this fork's origin/main remote-tracking ref is stale relative to the upstream base; CI should resolve against the upstream PR base normally.

pnpm test:changed was attempted, but the changed-test resolver did not finish within the local timeout and was stopped. No runtime source or Vitest-covered behavior changes are included; the relevant proof for this patch is the docs gate plus changed-surface checks above.

Risk analysis

Risk is low. The docs change is clarifying existing contracts. The formatter change is limited to chunking oxfmt invocations and improving error output, with the full docs formatting check passing after the change. There are no changes to gateway/session flows, concurrency, cleanup logic, public API behavior, model routing, or plugin runtime behavior.

Backward compatibility

No user-facing behavior or API contract changes. Existing docs URLs and root-relative links are preserved.

Real behavior proof

Behavior addressed: Developers can now tell Codex Code Mode and OpenClaw code mode apart by mechanism, input shape, sandbox/lifecycle owner, and OpenClaw tool path.

Real environment tested: Windows checkout on Node v22.16.0 with pnpm 11.1.0, branch Hemant/docs-code-mode-disambiguation.

Exact steps or command run after this patch: DOCS_I18N_GLOSSARY_BASE=upstream/main pnpm check:docs.

Evidence after fix: The docs gate reported clean formatting, markdownlint 0 errors over 630 files, MDX check passed over 646 files, and link audit reported checked_internal_links=4390 with broken_links=0.

Observed result after fix: The updated docs pass the relevant docs validation, and the formatter no longer crashes on Windows from the full docs file list.

What was not tested: Full runtime/Vitest suite, because this patch changes docs and docs-format tooling only.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation scripts Repository scripts size: XS triage: mock-only-proof Candidate: PR proof only shows tests, mocks, snapshots, lint, typecheck, or CI. labels May 18, 2026
@clawsweeper

clawsweeper Bot commented May 18, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge.

Workflow note: Future ClawSweeper reviews update this same comment in place.

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.

Summary
Review failed before ClawSweeper could summarize the requested change.

Reproducibility: unclear. The review failed before ClawSweeper could establish a reproduction path.

PR rating
Overall: 🌊 off-meta tidepool
Proof: 🌊 off-meta tidepool
Patch quality: 🌊 off-meta tidepool
Summary: PR readiness rating was not assessed because the Codex review failed.

What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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.

Real behavior proof
Not applicable: Real behavior proof was not assessed because the Codex review failed.

Risk before merge

  • No close action taken because the review did not complete.

Maintainer options:

  1. Decide the mitigation before merge
    Retry the Codex review after fixing the execution failure.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Next step before merge
Review did not complete, so no work-lane recommendation was made.

Review details

Best possible solution:

Retry the Codex review after fixing the execution failure.

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

Unclear. The review failed before ClawSweeper could establish a reproduction path.

Is this the best way to solve the issue?

Unclear. Retry the review first so ClawSweeper can evaluate the actual issue and fix direction.

Label changes:

  • add rating: 🌊 off-meta tidepool: Current PR rating is 🌊 off-meta tidepool because proof is 🌊 off-meta tidepool, patch quality is 🌊 off-meta tidepool, and PR readiness rating was not assessed because the Codex review failed.
  • remove proof: sufficient: Current real behavior proof status is not_applicable, not sufficient.
  • remove P3: Current review triage priority is none.
  • remove rating: 🐚 platinum hermit: Current PR rating is rating: 🌊 off-meta tidepool, so this older rating label is no longer current.

Label justifications:

  • rating: 🌊 off-meta tidepool: Current PR rating is 🌊 off-meta tidepool because proof is 🌊 off-meta tidepool, patch quality is 🌊 off-meta tidepool, and PR readiness rating was not assessed because the Codex review failed.

What I checked:

  • failure reason: codex execution failed.
  • codex failure detail: Codex review failed for this PR with exit 1.
  • codex stdout: Per-item Codex failure; continuing with the rest of the shard.

Likely related people:

  • unknown: Codex failed before it could trace repository history. (role: review did not complete; confidence: low)

Codex review notes: model gpt-5.5, reasoning high; reviewed against 8961eae3f022.

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. labels May 18, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 18, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

CI is now complete on PR head 5daaa4227f749afd1002dc3fc5ceb3c4d76efbfe:

  • CI: success, run 26013735184
  • Workflow Sanity: success, run 26013735170
  • OpenGrep - PR Diff: success, run 26013735199

Relevant CI jobs include check-docs, check-lint, check-prod-types, check-test-types, check-dependencies, build-artifacts, contract shards, and boundary shards. Local proof in the PR body also includes DOCS_I18N_GLOSSARY_BASE=upstream/main pnpm check:docs, pnpm check:changed, node scripts/format-docs.mjs --check, and git diff --check.

@clawsweeper

clawsweeper Bot commented May 18, 2026 •

Copy link
Copy Markdown
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:

@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label May 18, 2026
@giodl73-repo giodl73-repo removed the triage: mock-only-proof Candidate: PR proof only shows tests, mocks, snapshots, lint, typecheck, or CI. label May 21, 2026
@openclaw-barnacle openclaw-barnacle Bot added the triage: mock-only-proof Candidate: PR proof only shows tests, mocks, snapshots, lint, typecheck, or CI. label May 21, 2026
@clawsweeper clawsweeper Bot added rating: 🌊 off-meta tidepool PR readiness rating does not apply to this item. and removed proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels May 21, 2026
@clawsweeper

clawsweeper Bot commented May 21, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper PR egg

🥚 Incubating: this PR egg is tucked into the review nest.

Hatch command

Comment @clawsweeper hatch when this PR is hatchable.

Hatchability rules:

  • Merged PRs are hatchable.
  • Open PRs are hatchable when they are status: 👀 ready for maintainer look, status: 🚀 automerge armed, or labeled clawsweeper:automerge.
  • Closed unmerged PRs are hatchable only when one of those hatchable labels is still present in the durable record.
What is this egg doing here?
  • Eggs appear after the PR passes real-behavior proof. It is here for vibes, not verdicts: it does not change labels, ratings, merge decisions, or automation.
  • The shell reacts to review momentum: open follow-up work warms it up, re-review makes it wobble, and a clean final review lets it hatch.
  • Hatchability usually comes from sufficient real-behavior proof, no blocking P0/P1/P2 findings, no security attention needed, and clean correctness. A merged PR is already final, so merge makes the egg hatchable independently.
  • The hatch is seeded from this repository and PR number, so the same PR keeps the same creature; the reviewed head SHA can only change safe visual details.
  • Rarity is just collectible sparkle: 🥚 common, 🌱 uncommon, 💎 rare, ✨ glimmer, and 🌈 legendary.

@steipete

Copy link
Copy Markdown
Contributor

Thanks. The useful Codex/OpenClaw code-mode distinction is now covered on main by commit 86b87df. This PR is also conflicted and includes an unrelated docs formatter script change, so I am closing it in favor of the narrower landed docs update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🌊 off-meta tidepool PR readiness rating does not apply to this item. scripts Repository scripts size: XS triage: mock-only-proof Candidate: PR proof only shows tests, mocks, snapshots, lint, typecheck, or CI.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs: clarify mechanistic difference between Codex Code Mode and Openclaw Code Mode

3 participants