Repository navigation
Description
Scope: Docs gap directly in the Openclaw Code Mode addition introduced by #80600 — the addition created the naming overlap with the pre-existing Codex Code Mode and the current docs don't disambiguate strongly enough. Surfaced while testing #80600 on
2026.5.16-beta.4.
Problem
Two distinct features both called "code mode" exist in Openclaw, with fundamentally different mechanisms. The current docs distinguish them only briefly, and operators (and bug reporters) routinely conflate the two.
| Aspect | Codex Code Mode | Openclaw Code Mode |
|---|---|---|
| Default state | On in @openclaw/codex 2026.5.16+ for every codex-routed agent (unconditional features.code_mode: true + code_mode_only: true in buildCodexRuntimeThreadConfig) |
Off (opt-in via tools.codeMode.enabled: true) |
| Origin | Codex coding harness (separate runtime) | PR #80600 — Openclaw-owned, generic |
| Model writes | Shell scripts | JavaScript / TypeScript |
exec input field |
command |
code |
| Sandbox | Codex's own (process-level + filesystem rules) | QuickJS-WASI in-process VM |
| Integration with Openclaw hooks | Through codex internal channels | Routes through Openclaw's before_tool_call per design |
Change and value
Strengthen docs/reference/code-mode.md so the mechanistic difference between the two features is unambiguous:
- Replace the short distinguishing paragraph (lines 16–22) with a comparison table like the one above.
- Cross-link from any codex-side docs noting these are two differently-implemented features that happen to share a name.
Who's affected
- Bug reporters and maintainers — "code mode is broken" is currently ambiguous about which mechanism is involved
- Anyone planning an evaluation: the two features have different sandboxes, hooks integration, and failure modes
Evidence
Codex Code Mode dispatch sample (codex harness on openai/gpt-5.5, 2026-05-17):
{ "command": "wc -c .../MEMORY.md" }
{ "command": "tail -50 ../inbox.jsonl 2>/dev/null | grep -c '\"status\": \"pending\"'" }Openclaw Code Mode dispatch sample (Pi runtime on ollama-cloud/glm-5.1, 2026-05-17):
{ "code": "const important = 1; return important;", "language": "javascript" }
{ "code": "await tools.call('session_status', {})", "language": "javascript" }Same tool name (exec), entirely different input shape and execution path.
Related
- [codex] Add generic OpenClaw code mode #80600 (the PR introducing Openclaw Code Mode)
- See companion issue on
ctx.agentIdpropagation for Openclaw Code Mode exec dispatch — the naming overlap makes that bug harder to discover.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
Kaspre commentedon May 18, 2026
Companion bug filing: #83387 —
ctx.agentIdundefined inbefore_tool_callfor outer OC code-modeexecdispatch. The naming overlap is part of why that bug is subtle.clawsweeper commentedon May 18, 2026
Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed June 29, 2026, 9:33 PM ET / 01:33 UTC.
Summary
Keep open. Current main and the latest release still lack the requested side-by-side comparison and stronger Codex-side anchor, while the open linked PR is the active closing path.
Reproducibility: not applicable. as a runtime reproduction; this is a documentation clarity request. Source inspection confirms current main and v2026.6.10 still lack the requested comparison table and Codex-side comparison anchor.
Root-cause cluster
Relationship:
canonicalCanonical: #83390
Summary: This issue is the canonical docs request; the open linked PR is the active candidate fix, and the older overlapping PR is closed unmerged.
Members:
fixed_by_candidate: docs: clarify OpenClaw vs Codex code mode #90151 - The PR is open, mergeable, uses closing syntax for this issue, and changes the requested docs files.superseded: docs: clarify Code Mode runtime surfaces #83435 - The older docs PR targeted the same clarification but is closed unmerged and has been replaced by the active linked PR.partial_overlap: code-mode: ctx.agentId undefined in before_tool_call for outer code-mode exec dispatch #83387 - The companion issue shares the code-mode naming-confusion context but concerned a separate runtime hook-context bug that is already closed.adjacent_distinct: [codex] Add generic OpenClaw code mode #80600 - The merged PR introduced generic OpenClaw code mode and its initial docs, but it is not the remaining docs clarification itself.Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.
Ways to help us reproduce this
Next step
No new repair lane should be queued because the open linked PR already owns the docs-only fix.
Review details
Best possible solution:
Review and land #90151, then let this issue close through the linked PR merge.
Do we have a high-confidence way to reproduce the issue?
Not applicable as a runtime reproduction; this is a documentation clarity request. Source inspection confirms current main and v2026.6.10 still lack the requested comparison table and Codex-side comparison anchor.
Is this the best way to solve the issue?
Yes. A focused docs PR is the right layer, and the open linked PR already owns the requested table, cross-link, and source-accurate Codex wording.
AGENTS.md: found and applied where relevant.
Remaining risk / open question:
Codex review notes: model internal, reasoning high; reviewed against 54b09580f61b.
Label changes
Label justifications:
P3: This is a low-risk documentation clarification with no requested runtime behavior change.Evidence reviewed
What I checked:
AGENTS.md:1, 54b09580f61b)docs/reference/code-mode.md. (docs/reference/code-mode.md:17, 54b09580f61b)docs/plugins/codex-harness.md. (docs/plugins/codex-harness.md:32, 54b09580f61b)docs/reference/code-mode.md. (docs/reference/code-mode.md:17, aa69b12d0086)src/agents/code-mode.ts:201, 54b09580f61b)Likely related people:
docs/reference/code-mode.md,src/agents/code-mode.ts,src/agents/code-mode.worker.ts)docs/reference/code-mode.md,docs/plugins/codex-harness.md,docs/tools/tool-search.md)docs/reference/code-mode.md,docs/plugins/codex-harness.md)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.[-]docs: clarify mechanistic difference between Codex Code Mode and OC generic code mode[/-][+]docs: clarify mechanistic difference between Codex Code Mode and Openclaw Code Mode[/+]openclaw-barnacle commentedon Jul 14, 2026
This issue has been automatically marked as stale due to inactivity.
Please add updates or it will be closed.
openclaw-barnacle commentedon Jul 21, 2026
Closing due to inactivity.
If this is still an issue, please retry on the latest OpenClaw release and share updated details.
If you are absolutely sure it still happens on the latest release, open a new issue with fresh steps to reproduce.