feat(codex): support app-server network proxy profiles#93538
Conversation
|
Codex review: needs changes before merge. Reviewed June 16, 2026, 3:49 AM ET / 07:49 UTC. Summary PR surface: Source +311, Tests +324, Docs +74. Total +709 across 12 files. Reproducibility: yes. from source inspection: enable Review metrics: 1 noteworthy metric.
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:
Copy recommended automerge instructionNext step before merge
Security Review findings
Review detailsBest possible solution: Keep the plugin-local network-proxy feature, but align OpenClaw's protocol types and runtime requests to Codex's string profile-id Do we have a high-confidence way to reproduce the issue? Yes, from source inspection: enable Is this the best way to solve the issue? No; the feature belongs in the Codex plugin, but this implementation does not match the upstream app-server protocol. The narrower fix is to keep the config patch and send the selected profile name as the Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 1ae0eacf4b0f. Label changesLabel justifications:
Evidence reviewedPR surface: Source +311, Tests +324, Docs +74. Total +709 across 12 files. View PR surface stats
Acceptance criteria:
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
|
9850eb6 to
2be6ee7
Compare
324547a to
42a8886
Compare
|
Merge-ready proof for Summary:
Codex contract checked:
Verification:
|
42a8886 to
192575a
Compare
192575a to
9900b14
Compare
|
Merged via squash.
Thanks @vincentkoc! |
|
Post-merge follow-up landed on Follow-up commit: cf78500 What changed:
Verification:
|
Merged via squash. Prepared head SHA: 9900b14 Co-authored-by: vincentkoc <[email protected]> Co-authored-by: vincentkoc <[email protected]> Reviewed-by: @vincentkoc
Merged via squash. Prepared head SHA: 9900b14 Co-authored-by: vincentkoc <[email protected]> Co-authored-by: vincentkoc <[email protected]> Reviewed-by: @vincentkoc
Summary
appServer.networkProxyfor the bundled Codex plugin so OpenClaw can enable Codex's managed network proxy through an app-server permission profile.features.network_proxy.enabledpluspermissions.<profile>.network.*, including loopback proxy URLs, domain allowlists, SOCKS options, and local/private-network escape hatches.permissions: { type: "profile", id }, on thread start/resume and keeps bound turns sticky instead of reselecting an ephemeral generated profile.Linked context
Which issue does this close?
Which issues, PRs, or discussions are related?
Was this requested by a maintainer or owner?
Real behavior proof (required for external PRs)
tbx_01kv7mhsy79j2f048vxzhb78f3from branchcodex-network-proxy-app-server.node scripts/run-vitest.mjs extensions/codex/src/app-server/config.test.ts extensions/codex/src/app-server/thread-lifecycle.test.ts extensions/codex/src/conversation-binding.test.ts && env OPENCLAW_CHECK_CHANGED_REMOTE_CHILD=1 OPENCLAW_CHANGED_LANES_RAW_SYNC=1 corepack pnpm check:changed3 passed,187 passed;check:changedselectedlanes=extensions, extensionTests, docs; Blacksmith run summary endedexit=0.pnpm docs:listandscripts/committerwere not run locally because this Codex worktree is linked/sparse and local pnpm wrapper paths attempt dependency reconciliation; validation was run through the repo's Crabbox/Testbox path instead.tbx_01kv7m6nevz7vct3tfazeyta0efailedcheck:changedonbounded-turn.tsconfig typing after the rebase; this branch includes the typed merge fallback and the final Testbox gate is green.Tests and validation
node scripts/run-vitest.mjs extensions/codex/src/app-server/config.test.ts extensions/codex/src/app-server/thread-lifecycle.test.ts extensions/codex/src/conversation-binding.test.tstbx_01kv7mhsy79j2f048vxzhb78f3: targeted Vitest plusOPENCLAW_CHECK_CHANGED_REMOTE_CHILD=1 OPENCLAW_CHANGED_LANES_RAW_SYNC=1 corepack pnpm check:changed.agents/skills/autoreview/scripts/autoreview --mode local --base origin/mainreported no accepted/actionable findings.Regression coverage added or updated:
Dependency/protocol proof:
codex-rs/app-server-protocol/src/protocol/v2/permissions.rs:505throughpermissions.rs:519:PermissionProfileSelectionParamsis tagged and uses theProfile { id, modifications }shape.codex-rs/app-server-protocol/src/protocol/v2/thread.rs:117throughthread.rs:124andthread.rs:274throughthread.rs:281: thread start/resume exposepermissions: Option<PermissionProfileSelectionParams>and cannot combine it withsandbox.codex-rs/app-server-protocol/src/protocol/v2/turn.rs:75throughturn.rs:84: turn/start has optionalpermissions, but this PR avoids using it for generated thread-local profiles unless an explicit sandbox override is requested.Risk checklist
Did user-visible behavior change? (
Yes/No)Yes, for users who opt into the new Codex app-server network proxy config.
Did config, environment, or migration behavior change? (
Yes/No)Yes, new optional plugin config keys under
appServer.networkProxy.Did security, auth, secrets, network, or tool execution behavior change? (
Yes/No)Yes, network sandbox/proxy behavior changes when explicitly enabled.
What is the highest-risk area?
Misrouting sandbox/profile selection across thread start, resume, and bound turns.
How is that risk mitigated?
The runtime only enables the profile when
appServer.networkProxy.enabledis set, persists the active generated profile name in bindings, omits reselecting ephemeral profiles on bound turns, keeps explicit sandbox overrides higher priority, and covers those cases in unit tests plus Testbox type/lint gates.Current review state
What is the next action?
Maintainer review.
What is still waiting on author, maintainer, CI, or external proof?
CI after PR creation. No known author-side blockers.
Which bot or reviewer comments were addressed?
Local autoreview initially caught the protocol shape and ephemeral profile reselection issues; both were fixed before this PR. Final autoreview is clean.
AI-assisted: yes; the implementation was reviewed against upstream Codex protocol source and validated with Crabbox/Testbox before opening.