Skip to content

fix(codex): expose selectable node exec - #104198

Merged
steipete merged 2 commits into
mainfrom
codex/fix-codex-node-selection
Jul 11, 2026
Merged

steipete merged 2 commits into
mainfrom
codex/fix-codex-node-selection

Conversation

@steipete

Copy link
Copy Markdown
Contributor

Addresses the mixed-session node-exec portion of #101961.

What Problem This Solves

Codex-backed agent sessions using the default tools.exec.host=auto kept Codex native shell access but omitted OpenClaw's node-capable exec tool. An agent could discover a connected Mac node, but its only shell tool ran on the app-server host; direct nodes invoke system.run correctly rejected the request and instructed the unavailable exec host=node path.

Why This Change Was Made

The Codex plugin already owns node_exec and node_process dynamic-tool adapters for whole-session host=node routing. This change reuses that owner boundary for mixed sessions when auto resolves to the Gateway with no active OpenClaw sandbox.

The adapter forces host=node, strips model-supplied security and ask overrides, and preserves configured node bindings. Unbound sessions expose only the node name/id selector; bound sessions hide and pin it. Explicit gateway routing and sandbox-backed auto sessions do not gain the node surface.

User Impact

Codex agents can keep native local shell access and choose a paired Mac, Windows, or CLI node for individual commands through node_exec. Existing OpenClaw node approval, allowlist, connectivity, and system.run.prepare policy remain authoritative.

Evidence

  • Live before-fix reproduction on OpenClaw 2026.7.2: the Gateway saw a connected 2026.7.2 macOS app node advertising system.run, but the Codex agent had only native bash; direct node invocation failed closed as reserved, and the agent could not run uname on the node.
  • Upstream Codex source inspection: app-server accepts Responses-compatible dynamic tool identifiers and dispatches dynamic tool calls back to the client; node_exec requires no protocol change.
  • Focused Testbox: corepack pnpm test extensions/codex/src/app-server/dynamic-tool-build.test.ts — 54 passed.
  • Changed-surface Testbox: OPENCLAW_CHECK_CHANGED_REMOTE_CHILD=1 OPENCLAW_CHANGED_LANES_RAW_SYNC=1 corepack pnpm check:changed — passed extension/test typechecks, lint, policy guards, and import-cycle checks.
  • Fresh autoreview caught and verified configured-node binding preservation; regression coverage now proves selectable, bound, explicit-gateway, and sandbox-disabled behavior.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation extensions: codex size: S maintainer Maintainer-authored PR labels Jul 11, 2026
@steipete
steipete merged commit 82abf72 into main Jul 11, 2026
90 checks passed
@steipete
steipete deleted the codex/fix-codex-node-selection branch July 11, 2026 05:50
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 11, 2026
* fix(codex): expose selectable node exec

* chore: defer Codex node release note
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 extensions: codex maintainer Maintainer-authored PR size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant