Commit Graph
5342 Commits
Author SHA1 Message Date
rhan-oai 848a365b93 merge commit for archive created by Sapling 2026-04-07 12:29:48 -07:00
rhan-oai 07d8b78a49 [codex-analytics] denormalize thread metadata onto turn events 2026-04-07 12:21:10 -07:00
rhan-oai 48c5be90cb [codex-analytics] add steering metadata 2026-04-07 12:21:10 -07:00
rhan-oai ac4d18c4af [codex-analytics] add queued submission metadata 2026-04-07 12:21:10 -07:00
rhan-oai d3f41f1b2c [codex-analytics] add token usage metadata 2026-04-07 12:21:10 -07:00
rhan-oai fc8860cfed [codex-analytics] feature plumbing and emittance 2026-04-07 12:21:10 -07:00
rhan-oai 0101eb2175 merge commit for archive created by Sapling 2026-04-07 11:54:47 -07:00
rhan-oai 858c958a1c [codex-analytics] denormalize thread metadata onto turn events 2026-04-07 11:51:15 -07:00
rhan-oai 150f8f0a7e [codex-analytics] add steering metadata 2026-04-07 11:44:35 -07:00
rhan-oai 9976d49992 [codex-analytics] add queued submission metadata 2026-04-07 11:41:55 -07:00
rhan-oai 6e02a3f5e6 [codex-analytics] add token usage metadata 2026-04-07 11:39:39 -07:00
rhan-oai af2561da23 [codex-analytics] feature plumbing and emittance 2026-04-07 11:28:01 -07:00
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