Commit Graph
5330 Commits
Author SHA1 Message Date
rhan-oai 8e65c9fb07 merge commit for archive created by Sapling 2026-04-06 21:44:46 -07:00
rhan-oai 90aeef1626 [codex-analytics] denormalize thread metadata onto turn events 2026-04-06 21:40:46 -07:00
rhan-oai 68a8e6e26a [codex-analytics] add steering metadata 2026-04-06 21:40:46 -07:00
rhan-oai b09d3612d3 [codex-analytics] add queued submission metadata 2026-04-06 21:40:45 -07:00
rhan-oai d6753245d6 [codex-analytics] add token usage metadata 2026-04-06 21:40:45 -07:00
rhan-oai a860b59e5d [codex-analytics] feature plumbing and emittance 2026-04-06 21:40:44 -07:00
rhan-oai 988463e895 merge commit for archive created by Sapling 2026-04-06 21:32:13 -07:00
rhan-oai e816560966 [codex-analytics] denormalize thread metadata onto turn events 2026-04-06 21:24:19 -07:00
rhan-oai c08e755619 [codex-analytics] add steering metadata 2026-04-06 21:16:30 -07:00
Ahmed Ibrahim 24c598e8a9 Honor null thread instructions (#16964)
- Treat explicit null thread instructions as a blank-slate override
while preserving omitted-field fallback behavior.
- Preserve null through rollout resume/fork and keep explicit empty
strings distinct.
- Add app-server v2 start/fork coverage for the tri-state instruction
params.
2026-04-07 04:10:19 +00:00
pakrym-oai 4bb507d2c4 Make AGENTS.md discovery FS-aware (#15826)
## Summary
- make AGENTS.md discovery and loading fully FS-aware and remove the
non-FS discover helper
- migrate remote-aware codex-core tests to use TestEnv workspace setup
instead of syncing a local workspace copy
- add AGENTS.md corner-case coverage, including directory fallbacks and
remote-aware integration coverage

## Testing
- cargo test -p codex-core project_doc -- --nocapture
- cargo test -p codex-core hierarchical_agents -- --nocapture
- cargo test -p codex-core agents_md -- --nocapture
- cargo test -p codex-tui status -- --nocapture
- cargo test -p codex-tui-app-server status -- --nocapture
- just fix
- just fmt
- just bazel-lock-update
- just bazel-lock-check
- just argument-comment-lint
- remote Linux executor tests in progress via scripts/test-remote-env.sh
2026-04-06 20:26:21 -07:00
Ruslan Nigmatullin 232db0613a app-server: Fix compilation of a test in mcp_resource (#16972) 2026-04-06 20:17:08 -07:00
viyatb-oai 9d13d29acd [codex] Add danger-full-access denylist-only network mode (#16946)
## Summary

This adds `experimental_network.danger_full_access_denylist_only` for
orgs that want yolo / danger-full-access sessions to keep full network
access while still enforcing centrally managed deny rules.

When the flag is true and the session sandbox is `danger-full-access`,
the network proxy starts with:

- domain allowlist set to `*`
- managed domain `deny` entries enforced
- upstream proxy use allowed
- all Unix sockets allowed
- local/private binding allowed

Caveat: the denylist is best effort only. In yolo / danger-full-access
mode, Codex or the model can use an allowed socket or other
local/private network path to bypass the proxy denylist, so this should
not be treated as a hard security boundary.

The flag is intentionally scoped to `SandboxPolicy::DangerFullAccess`.
Read-only and workspace-write modes keep the existing managed/user
allowlist, denylist, Unix socket, and local-binding behavior. This does
not enable the non-loopback proxy listener setting; that still requires
its own explicit config.

This also threads the new field through config requirements parsing,
app-server protocol/schema output, config API mapping, and the TUI debug
config output.

## How to use

Add the flag under `[experimental_network]` in the network policy config
that is delivered to Codex. The setting is not under `[permissions]`.

```toml
[experimental_network]
enabled = true
danger_full_access_denylist_only = true

[experimental_network.domains]
"blocked.example.com" = "deny"
"*.blocked.example.com" = "deny"
```

With that configuration, yolo / danger-full-access sessions get broad
network access except for the managed denied domains above. The denylist
remains a best-effort proxy policy because the session may still use
allowed sockets to bypass it. Other sandbox modes do not get the
wildcard domain allowlist or the socket/local-binding relaxations from
this flag.

## Verification

- `cargo test -p codex-config network_requirements`
- `cargo test -p codex-core network_proxy_spec`
- `cargo test -p codex-app-server map_requirements_toml_to_api`
- `cargo test -p codex-tui debug_config_output`
- `cargo test -p codex-app-server-protocol`
- `just write-app-server-schema`
- `just fmt`
- `just fix -p codex-config -p codex-core -p codex-app-server-protocol
-p codex-app-server -p codex-tui`
- `just fix -p codex-core -p codex-config`
- `git diff --check`
- `cargo clean`
2026-04-06 19:38:51 -07:00
viyatb-oaiandCodex 806e5f7c69 fix: warn when bwrap cannot create user namespaces (#15893)
## Summary
- add a Linux startup warning when system `bwrap` is present but cannot
create user namespaces
- keep the Linux-specific probe, sandbox-policy gate, and stderr
matching in `codex-sandboxing`
- polish the missing-`bwrap` warning to point users at the sandbox
prerequisites and OS package-manager install path

## Details
- probes system `bwrap` with `--unshare-user`, `--unshare-net`, and a
minimal bind before command execution
- detects known bubblewrap setup failures for `RTM_NEWADDR`,
`RTM_NEWLINK`, uid-map permission denial, and `No permissions to create
a new namespace`
- preserves the existing suppression for sandbox-bypassed policies such
as `danger-full-access` and `external-sandbox`
- updates the Linux sandbox docs to call out the user-namespace
requirement

---------

Co-authored-by: Codex <noreply@openai.com>
2026-04-06 19:19:35 -07:00
Matthew Zeng 5fe9ef06ce [mcp] Support MCP Apps part 1. (#16082)
- [x] Add `mcpResource/read` method to read mcp resource.
2026-04-06 19:17:14 -07:00
Eric Traut ee12772e80 Validate exec input before starting app-server (#16890)
Addresses #16443

This was a regression introduced when we moved exec on top of the app
server APIs.

Problem: codex exec resolved prompt/stdin and output schema after
starting the in-process app-server, so early `process::exit(1)` paths
could bypass session shutdown.

Solution: Resolve prompt/stdin and output schema before app-server
startup so validation failures happen before any exec session is
created.
2026-04-06 18:13:05 -07:00
Ruslan Nigmatullin b34a3a6e92 app-server: Unify config changes handling a bit (#16961) 2026-04-06 18:04:00 -07:00
pakrym-oai 0de7662dab Add setTimeout support to code mode (#16153)
The implementation is less than ideal - it starts a thread per timer. A
better approach might be to switch to tokio and use their timer
imlementation.
2026-04-06 17:46:28 -07:00
pakrym-oai 1f2411629f Refactor config types into a separate crate (#16962)
Move config types into a separate crate because their macros expand into
a lot of new code.
2026-04-07 00:32:41 +00:00
Curtis 'Fjord' Hawthorne d2df7c54b2 Promote image_detail_original to experimental (#16957) 2026-04-06 17:25:16 -07:00
rhan-oai 7acd902435 Merge 81b291f2a9 into sapling-pr-archive-rhan-oai 2026-04-06 17:22:48 -07:00
rhan-oai 997c10b5ad [codex-analytics] add queued submission metadata 2026-04-06 17:22:36 -07:00
rhan-oai 81b291f2a9 [codex-analytics] denormalize thread metadata onto turn events 2026-04-06 17:22:36 -07:00
rhan-oai f5c978d126 [codex-analytics] add token usage metadata 2026-04-06 17:22:36 -07:00
rhan-oai 9c6b36fb68 [codex-analytics] add steering metadata 2026-04-06 17:22:36 -07:00
rhan-oai 3328a11b87 [codex-analytics] feature plumbing and emittance 2026-04-06 17:22:36 -07:00
starr-openai a504d8f0fa Disable env-bound tools when exec server is none (#16349)
## Summary
- make `CODEX_EXEC_SERVER_URL=none` map to an explicit disabled
environment mode instead of inferring from a missing URL
- expose environment capabilities (`exec_enabled`, `filesystem_enabled`)
so tool building can gate behavior explicitly and future
multi-environment work has a clearer seam
- suppress env-backed tools when the relevant capability is unavailable,
including exec tools, `js_repl`, `apply_patch`, `list_dir`, and
`view_image`
- keep handler/runtime backstops so disabled environments still reject
execution if a tool path somehow bypasses registration

## Testing
- `just fmt`
- `cargo test -p codex-exec-server`
- `cargo test -p codex-tools
disabled_environment_omits_environment_backed_tools`
- `cargo test -p codex-tools
environment_capabilities_gate_exec_and_filesystem_tools_independently`
- remote devbox Bazel build via `codex-applied-devbox`:
`//codex-rs/cli:cli`
2026-04-06 17:22:06 -07:00
rhan-oai e3617c1828 Merge 0e87522fef into sapling-pr-archive-rhan-oai 2026-04-06 16:48:54 -07:00
rhan-oai c5550b4db9 Merge 48b68244f7 into sapling-pr-archive-rhan-oai 2026-04-06 16:48:45 -07:00
rhan-oai 252e92e9ac Merge 3423ede1c0 into sapling-pr-archive-rhan-oai 2026-04-06 16:48:35 -07:00
rhan-oai 81f01aad8e Merge 79d7d4a95b into sapling-pr-archive-rhan-oai 2026-04-06 16:48:24 -07:00
rhan-oai 4ad624ad50 Merge f85b185d47 into sapling-pr-archive-rhan-oai 2026-04-06 16:47:40 -07:00
rhan-oai 0e87522fef [codex-analytics] denormalize thread metadata onto turn events 2026-04-06 16:45:51 -07:00
rhan-oai 48b68244f7 [codex-analytics] add steering metadata 2026-04-06 16:45:50 -07:00
rhan-oai 3423ede1c0 [codex-analytics] add queued submission metadata 2026-04-06 16:45:49 -07:00
rhan-oai 79d7d4a95b [codex-analytics] add token usage metadata 2026-04-06 16:45:49 -07:00
rhan-oai f85b185d47 [codex-analytics] feature plumbing and emittance 2026-04-06 16:45:48 -07:00
Eric Traut 9f737c28dd Speed up /mcp inventory listing (#16831)
Addresses #16244

This was a performance regression introduced when we moved the TUI on
top of the app server API.

Problem: `/mcp` rebuilt a full MCP inventory through
`mcpServerStatus/list`, including resources and resource templates that
made the TUI wait on slow inventory probes.

Solution: add a lightweight `detail` mode to `mcpServerStatus/list`,
have `/mcp` request tools-and-auth only, and cover the fast path with
app-server and TUI tests.

Testing: Confirmed slow (multi-second) response prior to change and
immediate response after change.

I considered two options:
1. Change the existing `mcpServerStatus/list` API to accept an optional
"details" parameter so callers can request only a subset of the
information.
2. Add a separate `mcpServer/list` API that returns only the servers,
tools, and auth but omits the resources.

I chose option 1, but option 2 is also a reasonable approach.
2026-04-06 16:27:02 -07:00
rhan-oai 756c45ec61 [codex-analytics] add protocol-native turn timestamps (#16638)
---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/openai/codex/pull/16638).
* #16870
* #16706
* #16659
* #16641
* #16640
* __->__ #16638
2026-04-06 16:22:59 -07:00
rhan-oai 7fc3ec79e7 merge commit for archive created by Sapling 2026-04-06 15:51:48 -07:00
Eric Traut e88c2cf4d7 tui: route device-code auth through app server (#16827)
Addresses #7646
Also enables device code auth for remote TUI sessions

Problem: TUI onboarding handled device-code login directly rather than
using the recently-added app server support for device auth. Also, auth
screens kept animating while users needed to copy login details.

Solution: Route device-code onboarding through app-server login APIs and
make the auth screens static while those copy-oriented flows are
visible.
2026-04-06 15:47:26 -07:00
Eric Traut 54faa76960 Respect residency requirements in mcp-server (#16952)
Addresses #16951

Problem: codex mcp-server did not apply the configured residency
requirement, so requests from non-US regions could miss the `residency`
header and fail with a 401.

Solution: Set the default client residency requirement after loading
config in the MCP server startup path, matching the existing exec and
TUI behavior.
2026-04-06 15:46:55 -07:00
rhan-oai f9dea6ff99 [codex-analytics] feature plumbing and emittance 2026-04-06 15:43:33 -07:00
xl-openai e62d645e67 feat: refresh non-curated cache from plugin list. (#16191)
1. Use versions for non-curated plugin (defined in plugin.json) for
cache refresh
2. Trigger refresh from plugin/list roots
2026-04-06 15:40:00 -07:00
xl-openai 03edd4fbee feat: fallback curated plugin download from backend endpint. (#16947)
Add one more fallback for downloading the curated plugin repo from
chatgpt.com.

Have to be the last fallback for now as it is a lagging backup.
2026-04-06 15:36:20 -07:00
rhan-oai e27233fcbc Merge b5474cf38c into sapling-pr-archive-rhan-oai 2026-04-06 15:12:35 -07:00
viyatb-oai 36cd163504 [codex] Allow PyTorch libomp shm in Seatbelt (#16945)
## Summary
- Add a targeted macOS Seatbelt allow rule for PyTorch/libomp KMP
registration shared-memory objects.
- Scope the rule to read/create/unlink operations on names matching
`^/__KMP_REGISTERED_LIB_[0-9]+$`.
- Add a base-policy regression assertion in `seatbelt_tests.rs`.

## Why
Importing PyTorch on macOS under the Codex sandbox can abort when libomp
attempts to create the KMP registration POSIX shm object and Seatbelt
denies `ipc-posix-shm-write-create`.

## Validation
- `just fmt`
- `cargo test -p codex-sandboxing`
- `cargo clippy -p codex-sandboxing --all-targets`
- `just argument-comment-lint`
- `git diff --check`
- End-to-end PyTorch import under `codex sandbox macos` exited `0` with
no KMP shm denial
- `cargo clean`
2026-04-06 22:12:30 +00:00
rhan-oai f01d37036e [codex-analytics] add protocol-native turn timestamps 2026-04-06 15:11:09 -07:00
rhan-oai b5474cf38c [codex-analytics] denormalize thread metadata onto turn events 2026-04-06 15:11:09 -07:00
rhan-oai 4639cbb251 [codex-analytics] add steering metadata 2026-04-06 15:11:09 -07:00