fix(codex): unchain app-server defaults (#70082) · openclaw/openclaw@abf940d
pashpashpash
·
2026-04-22
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -19,6 +19,7 @@ Docs: https://docs.openclaw.ai
|
19 | 19 | ### Fixes |
20 | 20 | |
21 | 21 | - Gateway/pairing webchat: render `/pair qr` replies as structured media instead of raw markdown text, preserve inline reply threading and silent-control handling on media replies, avoid persisting sensitive QR images into transcript history, and keep local webchat media embedding behind internal-only trust markers. (#70047) Thanks @BunsDev. |
| 22 | +- Codex harness: default app-server runs to unchained local execution, so OpenAI heartbeats can use network and shell tools without stalling behind native Codex approvals or the workspace-write sandbox. |
22 | 23 | - OpenAI/Responses: keep embedded OpenAI Responses runs on HTTP when `models.providers.openai.baseUrl` points at a local mock or other non-public endpoint, so mocked/custom endpoints no longer drift onto the hardcoded public websocket transport. (#69815) Thanks @vincentkoc. |
23 | 24 | - Channels/config: require resolved runtime config on channel send/action/client helpers and block runtime helper `loadConfig()` calls, so SecretRefs are resolved at startup/boundaries instead of being re-read during sends. |
24 | 25 | - CLI/channels: preserve bundled setup promotion metadata when a loaded partial channel plugin omits it, so adding a non-default account still moves legacy single-account fields such as Telegram `streaming` into `accounts.default`. |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -263,9 +263,12 @@ By default, the plugin starts Codex locally with:
|
263 | 263 | codex app-server --listen stdio:// |
264 | 264 | ``` |
265 | 265 | |
266 | | -By default, OpenClaw asks Codex to request native approvals. You can tune that |
267 | | -policy further, for example by tightening it and routing reviews through the |
268 | | -guardian: |
| 266 | +By default, OpenClaw starts local Codex harness sessions fully unchained: |
| 267 | +`approvalPolicy: "never"` and `sandbox: "danger-full-access"`. That matches the |
| 268 | +trusted local operator posture used by the Codex CLI and lets autonomous |
| 269 | +heartbeats use network and shell tools without waiting on an invisible native |
| 270 | +approval path. You can tighten that policy, for example by routing reviews |
| 271 | +through the guardian: |
269 | 272 | |
270 | 273 | ```json5 |
271 | 274 | { |
@@ -320,8 +323,8 @@ Supported `appServer` fields:
|
320 | 323 | | `authToken` | unset | Bearer token for WebSocket transport. | |
321 | 324 | | `headers` | `{}` | Extra WebSocket headers. | |
322 | 325 | | `requestTimeoutMs` | `60000` | Timeout for app-server control-plane calls. | |
323 | | -| `approvalPolicy` | `"on-request"` | Native Codex approval policy sent to thread start/resume/turn. | |
324 | | -| `sandbox` | `"workspace-write"` | Native Codex sandbox mode sent to thread start/resume. | |
| 326 | +| `approvalPolicy` | `"never"` | Native Codex approval policy sent to thread start/resume/turn. | |
| 327 | +| `sandbox` | `"danger-full-access"` | Native Codex sandbox mode sent to thread start/resume. | |
325 | 328 | | `approvalsReviewer` | `"user"` | Use `"guardian_subagent"` to let Codex guardian review native approvals. | |
326 | 329 | | `serviceTier` | unset | Optional Codex service tier, for example `"priority"`. | |
327 | 330 | |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -66,12 +66,12 @@
|
66 | 66 | "approvalPolicy": { |
67 | 67 | "type": "string", |
68 | 68 | "enum": ["never", "on-request", "on-failure", "untrusted"], |
69 | | -"default": "on-request" |
| 69 | +"default": "never" |
70 | 70 | }, |
71 | 71 | "sandbox": { |
72 | 72 | "type": "string", |
73 | 73 | "enum": ["read-only", "workspace-write", "danger-full-access"], |
74 | | -"default": "workspace-write" |
| 74 | +"default": "danger-full-access" |
75 | 75 | }, |
76 | 76 | "approvalsReviewer": { |
77 | 77 | "type": "string", |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -60,16 +60,16 @@ describe("Codex app-server config", () => {
|
60 | 60 | ).toThrow("appServer.url is required"); |
61 | 61 | }); |
62 | 62 | |
63 | | -it("defaults native Codex approvals to on-request", () => { |
| 63 | +it("defaults native Codex approvals to unchained local execution", () => { |
64 | 64 | const runtime = resolveCodexAppServerRuntimeOptions({ |
65 | 65 | pluginConfig: {}, |
66 | 66 | env: {}, |
67 | 67 | }); |
68 | 68 | |
69 | 69 | expect(runtime).toEqual( |
70 | 70 | expect.objectContaining({ |
71 | | -approvalPolicy: "on-request", |
72 | | -sandbox: "workspace-write", |
| 71 | +approvalPolicy: "never", |
| 72 | +sandbox: "danger-full-access", |
73 | 73 | approvalsReviewer: "user", |
74 | 74 | }), |
75 | 75 | ); |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -136,11 +136,11 @@ export function resolveCodexAppServerRuntimeOptions(
|
136 | 136 | approvalPolicy: |
137 | 137 | resolveApprovalPolicy(config.approvalPolicy) ?? |
138 | 138 | resolveApprovalPolicy(env.OPENCLAW_CODEX_APP_SERVER_APPROVAL_POLICY) ?? |
139 | | -"on-request", |
| 139 | +"never", |
140 | 140 | sandbox: |
141 | 141 | resolveSandbox(config.sandbox) ?? |
142 | 142 | resolveSandbox(env.OPENCLAW_CODEX_APP_SERVER_SANDBOX) ?? |
143 | | -"workspace-write", |
| 143 | +"danger-full-access", |
144 | 144 | approvalsReviewer: |
145 | 145 | resolveApprovalsReviewer(config.approvalsReviewer) ?? |
146 | 146 | (env.OPENCLAW_CODEX_APP_SERVER_GUARDIAN === "1" ? "guardian_subagent" : "user"), |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -188,6 +188,8 @@ describe("runCodexAppServerAttempt", () => {
|
188 | 188 | params: expect.objectContaining({ |
189 | 189 | model: "gpt-5.4-codex", |
190 | 190 | modelProvider: "openai", |
| 191 | +approvalPolicy: "never", |
| 192 | +sandbox: "danger-full-access", |
191 | 193 | }), |
192 | 194 | }, |
193 | 195 | { |
@@ -435,9 +437,9 @@ describe("runCodexAppServerAttempt", () => {
|
435 | 437 | threadId: "thread-existing", |
436 | 438 | model: "gpt-5.4-codex", |
437 | 439 | modelProvider: "openai", |
438 | | -approvalPolicy: "on-request", |
| 440 | +approvalPolicy: "never", |
439 | 441 | approvalsReviewer: "user", |
440 | | -sandbox: "workspace-write", |
| 442 | +sandbox: "danger-full-access", |
441 | 443 | persistExtendedHistory: true, |
442 | 444 | }); |
443 | 445 | }); |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。