Commit Graph

5231 Commits

Author SHA1 Message Date
starr-openai
5d6ed7062f codex: share linux sandbox arg0 dispatch
Co-authored-by: Codex <noreply@openai.com>
2026-04-08 16:16:58 -07:00
starr-openai
59cf71736f test: fix sandbox manager argument comment
Co-authored-by: Codex <noreply@openai.com>
2026-04-08 15:46:25 -07:00
starr-openai
61500eed40 codex: centralize sandbox spawn env preparation
Prepare sandbox env inside the sandbox transform result so core and exec-server do not have to mutate the request at their spawn boundaries.

Co-authored-by: Codex <noreply@openai.com>
2026-04-08 15:18:40 -07:00
starr-openai
3ef4c50446 codex: avoid python stub in exec-server tests
Use /bin/sh for the PTY/stdin and write-denial probes so the tests do not depend on /usr/bin/python3 being usable on macOS Bazel runners.

Co-authored-by: Codex <noreply@openai.com>
2026-04-08 14:28:44 -07:00
starr-openai
bfbb55be89 codex: satisfy clippy in sandbox test helper
Co-authored-by: Codex <noreply@openai.com>
2026-04-08 14:28:44 -07:00
starr-openai
d9c23630e4 codex: fix rebased test compilation
Co-authored-by: Codex <noreply@openai.com>
2026-04-08 14:28:44 -07:00
starr-openai
209f50a22d codex: convert remote exec cwd at wire boundary
Keep unified_exec request state as AbsolutePathBuf, but serialize the cwd to PathBuf when constructing exec-server ExecParams.

Co-authored-by: Codex <noreply@openai.com>
2026-04-08 14:28:44 -07:00
starr-openai
7cbc9c6a79 codex: fix exec-server sandbox rebase build
Validate exec-server cwd values into AbsolutePathBuf before sandbox transforms, pass the helper executable as Option<&Path>, and keep the Linux helper alias cfg-specific so non-Linux builds typecheck.

Co-authored-by: Codex <noreply@openai.com>
2026-04-08 14:28:44 -07:00
starr-openai
0edcaba9eb codex: avoid arg0 dependency cycle in exec-server
Keep the standalone exec-server binary capable of self-dispatching its Linux sandbox helper by materializing a private codex-linux-sandbox symlink at startup. This gives sandbox launch a real helper-looking executable path without depending on the top-level codex-arg0 dispatcher.

Co-authored-by: Codex <noreply@openai.com>
2026-04-08 14:28:44 -07:00
starr-openai
a69385f63f Address exec-server sandbox review comments
- preserve sandbox child environment variables from shared launch requests
- dispatch codex-exec-server through codex-arg0 so helper arg0 is executable
- send sandbox preference to remote servers and report the server-selected sandbox

Co-authored-by: Codex <noreply@openai.com>
2026-04-08 14:28:44 -07:00
starr-openai
5824352d53 sandboxing: annotate transform test literals
Co-authored-by: Codex <noreply@openai.com>
2026-04-08 14:28:44 -07:00
starr-openai
2a59e8964d codex: fix PR 16736 CI failures
Co-authored-by: Codex <noreply@openai.com>
2026-04-08 14:28:44 -07:00
starr-openai
77174e47af codex: dispatch exec-server sandbox helper via argv0
Teach the standalone exec-server binary to run the Linux sandbox helper when it is re-execed with the codex-linux-sandbox argv0 alias. Point the exec-server sandbox transform at the current executable on Linux instead of requiring an env-provided helper path.

Co-authored-by: Codex <noreply@openai.com>
2026-04-08 14:28:44 -07:00
starr-openai
dabddb82ce codex: avoid reading sandbox type back from remote start
Co-authored-by: Codex <noreply@openai.com>
2026-04-08 14:28:44 -07:00
starr-openai
d2a1941ab2 codex: fix sandbox launch config callsites
Co-authored-by: Codex <noreply@openai.com>
2026-04-08 14:28:44 -07:00
starr-openai
6fcbd9b8d9 codex: fix core build after exec-server merge
Co-authored-by: Codex <noreply@openai.com>
2026-04-08 14:28:44 -07:00
starr-openai
083137fccd codex: remove unused exec-server network-proxy dependency
Co-authored-by: Codex <noreply@openai.com>
2026-04-08 14:28:44 -07:00
starr-openai
26bc39a982 codex: address remaining sandbox review feedback (#16736)
Co-authored-by: Codex <noreply@openai.com>
2026-04-08 14:28:44 -07:00
starr-openai
aa64ec9000 codex: drop dead exec-server sandbox override hook
Co-authored-by: Codex <noreply@openai.com>
2026-04-08 14:28:44 -07:00
starr-openai
09f332e2a3 codex: simplify remote sandbox launch payload
Co-authored-by: Codex <noreply@openai.com>
2026-04-08 14:28:44 -07:00
starr-openai
c8ede67d06 Address exec-server sandbox review feedback
Co-authored-by: Codex <noreply@openai.com>
2026-04-08 14:28:44 -07:00
starr-openai
6c3e55f61d codex: narrow exec-server sandbox wire smoke test 2026-04-08 14:28:44 -07:00
starr-openai
3a729c0da2 codex: wire linux sandbox helper into exec-server tests 2026-04-08 14:28:44 -07:00
starr-openai
f410a7e6a9 codex: add exec-server sandbox wire test 2026-04-08 14:28:44 -07:00
starr-openai
685f8cb6ee codex: preserve remote unified exec fallback inputs 2026-04-08 14:28:44 -07:00
starr-openai
df70ed0c73 codex: tighten remote unified exec launch path 2026-04-08 14:28:44 -07:00
starr-openai
79914729bb codex: fix CI failure on PR #16736 2026-04-08 14:28:44 -07:00
starr-openai
0ee9282dde codex: move unified exec sandbox launch to exec-server 2026-04-08 14:28:44 -07:00
Won Park
56dfe41605 Fix ToolsConfigParams initializer in tool registry test (#17154)
## Summary
- add the missing `image_generation_tool_auth_allowed` field to the new
tool registry plan test initializer

## Validation
- `just fmt`
- `cargo test -p codex-tools image_generation`
- `cargo test -p codex-tools --no-run`
2026-04-08 14:05:24 -07:00
canvrno-oai
58ad79b60e Fix missing fields (#17149)
Fix missing `image_generation_tool_auth_allowed` in two locations.
2026-04-08 13:53:53 -07:00
pakrym-oai
e4d6702b87 [codex] Support remote exec cwd in TUI startup (#17142)
When running with remote executor the cwd is the remote path. Today we
check for existence of a local directory on startup and attempt to load
config from it.

For remote executors don't do that.
2026-04-08 13:09:28 -07:00
starr-openai
f383cc980d Add sandbox support to filesystem APIs (#16751)
## Summary
- add optional `sandboxPolicy` support to the app-server filesystem
request surface
- thread sandbox-aware filesystem options through app-server and
exec-server adapters
- enforce sandboxed read/write access in the filesystem abstraction with
focused local and remote coverage

## Validation
- `cargo test -p codex-app-server-protocol`
- `cargo test -p codex-exec-server file_system`
- `cargo test -p codex-app-server suite::v2::fs`

---------

Co-authored-by: Codex <noreply@openai.com>
2026-04-08 12:10:48 -07:00
Won Park
e003f84e1e release ready, enabling only for siwc users (#17046)
**Disabling Image-Gen for Non-SIWC Codex Users**

We are only enabling image-gen feature for SIWC Codex users until there
comes a fix in ResponsesAPI to omit output from responses.completed, to
prevent the following issues:

1. websocket blows up due to heavier load (images) than before (text) 
2. http parser streams through n^2 of n-base64 bytes (sum of base64s of
all images generated in turn) that causes long delays in
turn_completion.
2026-04-08 11:22:39 -07:00
Owen Lin
e794457a59 fix(debug-config, guardian): fix /debug-config rendering and guardian… (#17138)
## Description

This PR fixes `/debug-config` so it shows more of the active
requirements state, including reviewer requirements and managed feature
pins. This made it clear that legacy MDM config was setting
`approvals_reviewer = "guardian_subagent"` and that we were translating
that into a requirements constraint.

Also, translate `approvals_reviewer = "guardian_subagent"` (from legacy
managed_config.toml) to `allowed_approvals_reviewers: guardian_subagent,
user` instead of `allowed_approvals_reviewers: guardian_subagent`.

Example `/debug-config`:
```
Config layer stack (lowest precedence first):
  1. system (/etc/codex/config.toml) (enabled)
  2. user (/Users/owen/.codex/config.toml) (enabled)
  3. project (/Users/owen/repos/codex/.codex/config.toml) (enabled)
  4. legacy managed_config.toml (MDM) (enabled)
     MDM value:
       ...

       # Enable Guardian Mode
       features.guardian_approval = true
       approvals_reviewer = "guardian_subagent"

Requirements:
  - allowed_approvals_reviewers: guardian_subagent, user (source: MDM managed_config.toml (legacy))
  - features: apps=true, plugins=true (source: cloud requirements)
```

Before this PR, the `Requirements` section showed None.
2026-04-08 11:08:09 -07:00
pakrym-oai
35b5720e8d Use AbsolutePathBuf for exec cwd plumbing (#17063)
## Summary
- Carry `AbsolutePathBuf` through tool cwd parsing/resolution instead of
resolving workdirs to raw `PathBuf`s.
- Type exec/sandbox request cwd fields as `AbsolutePathBuf` through
`ExecParams`, `ExecRequest`, `SandboxCommand`, and unified exec runtime
requests.
- Keep `PathBuf` conversions at external/event boundaries and update
existing tests/fixtures for the typed cwd.

## Validation
- `cargo check -p codex-core --tests`
- `cargo check -p codex-sandboxing --tests`
- `cargo test -p codex-sandboxing`
- `cargo test -p codex-core --lib tools::handlers::`
- `just fix -p codex-sandboxing`
- `just fix -p codex-core`
- `just fmt`

Full `codex-core` test suite was not run locally; per repo guidance I
kept local validation targeted.
2026-04-08 10:54:12 -07:00
Ahmed Ibrahim
d90a348870 Add WebRTC media transport to realtime TUI (#17058)
Adds the `[realtime].transport = "webrtc"` TUI media path using a new
`codex-realtime-webrtc` crate, while leaving app-server as the
signaling/event source.\n\nLocal checks: fmt, diff-check, dependency
tree only; test signal should come from CI.

---------

Co-authored-by: Codex <noreply@openai.com>
2026-04-08 10:26:55 -07:00
Matthew Zeng
7b6486a145 [mcp] Support server-driven elicitations (#17043)
- [x] Enables MCP elicitation for custom servers, not just Codex Apps
- [x] Adds an RMCP service wrapper to preserve elicitation _meta
- [x] Round-trips response _meta for persist/approval choices
- [x] Updates TUI empty-schema elicitations into message-only approval
prompts
2026-04-08 10:18:58 -07:00
Ahmed Ibrahim
06d88b7e81 Add realtime transport config (#17097)
Adds realtime.transport config with websocket as the default and webrtc
wired through the effective config.

Co-authored-by: Codex <noreply@openai.com>
2026-04-08 09:53:53 -07:00
Eric Traut
18171b1931 Skip MCP auth probing for disabled servers (#17098)
Addresses #16971

Problem: Disabled MCP servers were still queried for streamable HTTP
auth status during MCP inventory, so unreachable disabled entries could
add startup latency.

Solution: Return `Unsupported` immediately for disabled MCP server
configs before bearer token/OAuth status discovery.
2026-04-08 09:36:07 -07:00
Eric Traut
5c95e4588e Fix TUI crash when resuming the current thread (#17086)
Problem: Resuming the live TUI thread through `/resume` could
unsubscribe and reconnect the same app-server thread, leaving the UI
crashed or disconnected.

Solution: No-op `/resume` only when the selected thread is the currently
attached active thread; keep the normal resume path for
stale/displayed-only threads so recovery and reattach still work.
2026-04-08 09:35:54 -07:00
Eric Traut
dc5feb916d Show global AGENTS.md in /status (#17091)
Addresses #3793

Problem: /status only reported project-level AGENTS files, so sessions
with a loaded global $CODEX_HOME/AGENTS.md still showed Agents.md as
<none>.

Solution: Track the global instructions file loaded during config
initialization and prepend that path to the /status Agents.md summary,
with coverage for AGENTS.md, AGENTS.override.md, and global-plus-project
ordering.
2026-04-08 09:04:32 -07:00
pakrym-oai
4c07dd4d25 Configure multi_agent_v2 spawn agent hints (#17071)
Allow multi_agent_v2 features to have its own temporary configuration
under `[features.multi_agent_v2]`

```
[features.multi_agent_v2]
enabled = true
usage_hint_enabled = false
usage_hint_text = "Custom delegation guidance."
hide_spawn_agent_metadata = true
```

Absent `usage_hint_text` means use the default hint.

```
[features]
multi_agent_v2 = true
```

still works as the boolean shorthand.
2026-04-08 08:42:18 -07:00
jif-oai
2250fdd54a codex debug 14 (guardian approved) (#17130)
Removes lines 92-98 from core/templates/agents/orchestrator.md.
2026-04-08 14:14:32 +01:00
jif-oai
34fd336e7b codex debug 12 (guardian approved) (#17128)
Removes lines 78-84 from core/templates/agents/orchestrator.md.
2026-04-08 14:14:28 +01:00
jif-oai
6ee4680a81 codex debug 10 (guardian approved) (#17126)
Removes lines 64-70 from core/templates/agents/orchestrator.md.
2026-04-08 14:14:24 +01:00
jif-oai
34422855bb codex debug 8 (guardian approved) (#17124)
Removes lines 50-56 from core/templates/agents/orchestrator.md.
2026-04-08 14:14:19 +01:00
jif-oai
9601f2af4b codex debug 6 (guardian approved) (#17122)
Removes lines 36-42 from core/templates/agents/orchestrator.md.
2026-04-08 14:14:15 +01:00
jif-oai
99a12b78c2 codex debug 4 (guardian approved) (#17120)
Removes lines 22-28 from core/templates/agents/orchestrator.md.
2026-04-08 14:14:11 +01:00
jif-oai
11eff760d1 codex debug 2 (guardian approved) (#17118)
Removes lines 8-14 from core/templates/agents/orchestrator.md.
2026-04-08 14:14:06 +01:00
jif-oai
2b65f24de6 codex debug 15 (guardian approved) (#17131)
Removes lines 99-106 from core/templates/agents/orchestrator.md.
2026-04-08 14:11:01 +01:00