feat(codex): support remote app-server plugins#94203
Conversation
|
Codex review: found issues before merge. Reviewed June 17, 2026, 3:36 PM ET / 19:36 UTC. Summary PR surface: Source +330, Tests +375, Docs +15. Total +720 across 28 files. Reproducibility: not applicable. this is a feature/config PR, not a bug report needing a current-main failing reproduction. The PR body includes after-fix live terminal proof for a remote Codex app-server Google Calendar run plus focused tests for the changed paths. Review metrics: 2 noteworthy metrics.
Stored data model Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Remove the normal-PR CHANGELOG.md edits, keep the release-note context in the PR/squash metadata, and merge only after maintainers accept the remote WebSocket auth and remote plugin install/refresh compatibility behavior. Do we have a high-confidence way to reproduce the issue? Not applicable: this is a feature/config PR, not a bug report needing a current-main failing reproduction. The PR body includes after-fix live terminal proof for a remote Codex app-server Google Calendar run plus focused tests for the changed paths. Is this the best way to solve the issue? No, not as submitted: the Codex plugin-owned implementation is a plausible maintainable path and matches inspected upstream Codex contracts, but normal PRs should not edit CHANGELOG.md and the remote compatibility behavior still needs maintainer acceptance. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 3be74caeaec8. Label changesLabel justifications:
Evidence reviewedPR surface: Source +330, Tests +375, Docs +15. Total +720 across 28 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
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. How this review workflow works
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 84b51c14bb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const host = parsed.hostname.toLowerCase(); | ||
| return ( | ||
| host === "localhost" || | ||
| host === "127.0.0.1" || | ||
| host === "::1" || | ||
| host.startsWith("127.") |
There was a problem hiding this comment.
Recognize IPv6 loopback WebSocket URLs
When a local app-server is configured as ws://[::1]:..., Node's URL.hostname is [::1], not ::1, so this check classifies IPv6 localhost as remote. The new remote-auth assertion then rejects an unauthenticated local loopback app-server or applies remote defaults to it, which breaks valid IPv6 localhost setups.
Useful? React with 👍 / 👎.
| const prefix = `${localRoot}/`; | ||
| if (!value.startsWith(prefix)) { | ||
| return value; | ||
| } | ||
| return `${remoteRoot}/${value.slice(prefix.length)}`; |
There was a problem hiding this comment.
Normalize Windows separators before remote workspace mapping
On a Windows gateway, child paths under localRoot use backslashes, but the remote workspace mapper only tests for a / suffix prefix. In that environment only the exact root maps; a cwd such as C:\repo\pkg falls through unchanged and is sent to the remote Codex app-server, which cannot resolve that local Windows path.
Useful? React with 👍 / 👎.
| "properties": { | ||
| "localRoot": { "type": "string" }, | ||
| "remoteRoot": { "type": "string" } | ||
| } |
There was a problem hiding this comment.
Require both remote workspace roots in the manifest
The runtime schema requires both remoteWorkspace.localRoot and remoteWorkspace.remoteRoot, and readCodexPluginConfig drops the whole Codex plugin config when the zod parse fails. Because this manifest schema allows { remoteWorkspace: {} } or only one side, manifest-driven validation/setup can accept a config that the runtime silently ignores instead of reporting the missing paired root.
Useful? React with 👍 / 👎.
84b51c1 to
f94e771
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
95fef08 to
b09894b
Compare
* feat(codex): support remote app-server plugins * fix(codex): refresh remote plugin apps after install * fix(codex): infer remote app-server topology * docs(codex): document remote app-server plugin config * fix(codex): remove remote mutation policy * fix(codex): simplify remote workspace root * docs(codex): fix remote app-server PR docs
* feat(codex): support remote app-server plugins * fix(codex): refresh remote plugin apps after install * fix(codex): infer remote app-server topology * docs(codex): document remote app-server plugin config * fix(codex): remove remote mutation policy * fix(codex): simplify remote workspace root * docs(codex): fix remote app-server PR docs
Summary
Adds remote Codex app-server support for native Codex plugin turns in OpenClaw.
This PR:
local-loopbackorremote;appServer.remoteWorkspaceRootprojection so OpenClaw infers the local workspace root, preserves the current cwd suffix, and sends Codex only the final app-server cwd;Compatibility note
This PR intentionally treats non-loopback Codex app-server WebSocket URLs as remote:
appServer.authTokenor anAuthorizationheader;remoteWorkspaceRootnames only the remote app-server workspace root; OpenClaw derives the gateway-side root from the resolved OpenClaw workspace and fails closed if the effective cwd is outside that workspace.The old
appServer.remoteWorkspace.localRoot/remoteRootobject and the configurableappServer.remoteMutationPolicykey were removed from the current config shape. There is no backwards-compat shim in this PR.Real behavior proof
devboxconnected to remote Codex app-serverwss://kbox8-oai-kevinlin-openclaw-codex.devbox-1.gateway.internal.api.openai.org../openclaw.mjs --profile devbox agent --session-key agent:codex:remote-gcal-install-refresh-20260618-proof-v3 --message "Use the Google Calendar plugin through the configured remote Codex app-server. What is my Google Calendar schedule tomorrow? For this run, tomorrow is Thursday, June 18, 2026 in America/Los_Angeles. Return the events with times, and say if there are no events." --timeout 900 --jsonProof artifact:
.mem/main/proofs/...and are summarized in this PR body.plugin/installbecause it waited for initial app inventory, then could block on later remoteapp/listpages even after the Google Calendar app appeared.Earlier remote proof with preinstalled Google Calendar:
Validation
Latest validation on
e0b476d9ec9a6cb9e6cc5ae50752bf4caa664674:Passed: 4 files, 220 tests.
Passed.
Passed.
Passed in both the OpenClaw checkout and the local OpenAI spec workspace.
Passed in the local OpenAI spec workspace for the setup helper.
Blocked by internal npm registry auth while pnpm tried to fetch
@opentelemetry/exporter-metrics-otlp-proto-0.219.0.tgzfromsocket-firewall-registry.gateway.unified-30.internal.api.openai.org:ERR_PNPM_FETCH_403,No authorization header was set for the request.Earlier validation on this PR:
Passed: 4 files, 129 tests.
Passed: 1 file, 1 test.
Passed: 1 file, 3 tests.
Passed: 1 file, 41 tests.
Passed.