You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`transport`|`"stdio"`|`"stdio"` spawns Codex; `"websocket"` connects to `url`. |
91
+
|`homeScope`|`"agent"`|`"agent"` isolates Codex state per OpenClaw agent. `"user"` shares the native `$CODEX_HOME` or `~/.codex`, uses native auth, and enables owner-only thread management. User scope requires stdio. |
91
92
|`command`| managed Codex binary | Executable for stdio transport. Leave unset to use the managed binary. |
92
93
|`args`|`["app-server", "--listen", "stdio://"]`| Arguments for stdio transport. |
93
94
|`url`| unset | WebSocket app-server URL. |
@@ -265,7 +266,7 @@ that combination.
265
266
266
267
## Auth and environment isolation
267
268
268
-
Auth is selected in this order:
269
+
In the default per-agent home, auth is selected in this order:
269
270
270
271
1. An explicit OpenClaw Codex auth profile for the agent.
271
272
2. The app-server's existing account in that agent's Codex home.
@@ -289,17 +290,26 @@ per-agent directory under that agent's OpenClaw state. That keeps Codex config,
289
290
accounts, plugin cache/data, and thread state scoped to the OpenClaw agent
290
291
instead of leaking in from the operator's personal `~/.codex` home.
291
292
293
+
Set `appServer.homeScope: "user"` to share native Codex state with Codex
294
+
Desktop and the CLI. This local-stdio-only mode uses `$CODEX_HOME` when set and
295
+
`~/.codex` otherwise, including native auth, config, plugins, and threads.
296
+
OpenClaw skips its auth-profile bridge for the app-server. Verified owner turns
297
+
can use `codex_threads` to list, search, read, fork, rename, archive, and restore
298
+
those threads. Fork a thread before continuing it in OpenClaw; independent
299
+
Codex processes do not coordinate concurrent writers for the same thread.
300
+
292
301
OpenClaw does not rewrite `HOME` for normal local app-server launches. Codex-run
293
302
subprocesses such as `openclaw`, `gh`, `git`, cloud CLIs, and shell commands see
294
303
the normal process home and can find user-home config and tokens. Codex may also
295
304
discover `$HOME/.agents/skills` and `$HOME/.agents/plugins/marketplace.json`;
296
305
that `.agents` discovery is intentionally shared with the operator home and is
297
306
separate from isolated `~/.codex` state.
298
307
299
-
OpenClaw plugins and OpenClaw skill snapshots still flow through OpenClaw's own
300
-
plugin registry and skill loader. Personal Codex `~/.codex` assets do not. If
301
-
you have useful Codex CLI skills or plugins from a Codex home that should become
302
-
part of an OpenClaw agent, inventory them explicitly:
308
+
In the default agent scope, OpenClaw plugins and OpenClaw skill snapshots still
309
+
flow through OpenClaw's own plugin registry and skill loader; personal Codex
310
+
`~/.codex` assets do not. If you have useful Codex CLI skills or plugins from a
311
+
Codex home that should become part of an isolated OpenClaw agent, inventory
312
+
them explicitly:
303
313
304
314
```bash
305
315
openclaw migrate codex --dry-run
@@ -328,8 +338,8 @@ If a deployment needs additional environment isolation, add those variables to
328
338
329
339
`appServer.clearEnv` only affects the spawned Codex app-server child process.
330
340
OpenClaw removes `CODEX_HOME` and `HOME` from this list during local launch
331
-
normalization: `CODEX_HOME` stays per-agent, and `HOME` stays inherited so
332
-
subprocesses can use normal user-home state.
341
+
normalization: `CODEX_HOME` stays pointed at the selected agent or user scope,
342
+
and `HOME` stays inherited so subprocesses can use normal user-home state.
|`transport`|`"stdio"`|`"stdio"` spawns Codex; `"websocket"` connects to `url`. |
606
+
|`homeScope`|`"agent"`|`"agent"` isolates Codex state per OpenClaw agent. `"user"` shares the native `$CODEX_HOME` or `~/.codex`, uses native auth, and enables owner-only thread management. User scope requires stdio. |
564
607
|`command`| managed Codex binary | Executable for stdio transport. Leave unset to use the managed binary; set it only for an explicit override. |
565
608
|`args`|`["app-server", "--listen", "stdio://"]`| Arguments for stdio transport. |
566
609
|`url`| unset | WebSocket app-server URL. |
567
610
|`authToken`| unset | Bearer token for WebSocket transport. Accepts a literal string or SecretInput such as `${CODEX_APP_SERVER_TOKEN}`. |
568
611
|`headers`|`{}`| Extra WebSocket headers. Header values accept literal strings or SecretInput values, for example `x-codex-client-session-token: "${CODEX_CLIENT_SESSION_TOKEN}"`. |
569
-
|`clearEnv`|`[]`| Extra environment variable names removed from the spawned stdio app-server process after OpenClaw builds its inherited environment. OpenClaw keeps per-agent `CODEX_HOME` and inherited `HOME` for local launches.|
612
+
|`clearEnv`|`[]`| Extra environment variable names removed from the spawned stdio app-server process after OpenClaw builds its inherited environment. OpenClaw keeps the selected `CODEX_HOME` and inherited `HOME` for local launches. |
570
613
|`codeModeOnly`|`false`| Opt into Codex's code-mode-only tool surface. OpenClaw dynamic tools remain registered with Codex so nested `tools.*` calls return through the app-server `item/tool/call` bridge. |
571
614
|`remoteWorkspaceRoot`| unset | Remote Codex app-server workspace root. When set, OpenClaw infers the local workspace root from the resolved OpenClaw workspace, preserves the current cwd suffix under this remote root, and sends only the final app-server cwd to Codex. If the cwd is outside the resolved OpenClaw workspace root, OpenClaw fails closed instead of sending a gateway-local path to the remote app-server. |
572
615
|`requestTimeoutMs`|`60000`| Timeout for app-server control-plane calls. |
0 commit comments