Commit Graph
12072 Commits
Author SHA1 Message Date
Michael Bolin ae3b4b3aa2 Merge 7b40cacf12 into sapling-pr-archive-bolinfest 2026-04-20 22:15:02 -07:00
Michael Bolin 7b40cacf12 tests: isolate approval fixtures from host rules 2026-04-20 22:14:49 -07:00
Michael Bolin eae2f2165e shell-escalation: carry resolved permission profiles 2026-04-20 22:14:49 -07:00
Michael Bolin 26d1c11a0d mcp: include permission profiles in sandbox state 2026-04-20 22:14:49 -07:00
Michael Bolin 2b7faa4457 tui: carry permission profiles on user turns 2026-04-20 22:14:49 -07:00
Michael Bolin e8c0aaf4a4 tui: sync session permission profiles 2026-04-20 22:14:49 -07:00
Michael Bolin e28c7f4c44 app-server: accept command permission profiles 2026-04-20 22:14:49 -07:00
Michael Bolin 1b138ad5c4 protocol: report session permission profiles 2026-04-20 22:14:49 -07:00
Michael Bolin e73d50e61e rollout: persist turn permission profiles 2026-04-20 22:14:49 -07:00
Michael Bolin 806be7c01c clients: send permission profiles to app-server 2026-04-20 22:14:49 -07:00
Michael Bolin 3c66e19d9a app-server: accept permission profile overrides 2026-04-20 22:14:49 -07:00
Michael Bolin 5da4873690 app-server: expose thread permission profiles 2026-04-20 22:14:49 -07:00
Michael Bolin ef231cfc0b core: derive active permission profiles 2026-04-20 22:14:49 -07:00
Michael Bolin 55f76fbcaf exec-server: carry filesystem sandbox profiles 2026-04-20 22:14:49 -07:00
Michael Bolin 9a0c246f65 sandboxing: intersect permission profiles semantically 2026-04-20 22:14:49 -07:00
Michael Bolin d30536f649 merge commit for archive created by Sapling 2026-04-20 22:14:28 -07:00
Michael Bolin 13aee89df3 chore: enable await-holding clippy lints
Follow-up to https://github.com/openai/codex/pull/18178, where we said the await-holding clippy rule would be enabled separately.

Enable `await_holding_lock` and `await_holding_invalid_type` after the preceding commits fixed or explicitly documented the current offenders.
2026-04-20 22:14:12 -07:00
Michael Bolin c649344a34 chore: document intentional await-holding cases 2026-04-20 22:14:12 -07:00
Abhinav ab26554a3a Add remote_sandbox_config to our config requirements (#18763)
## Why

Customers need finer-grained control over allowed sandbox modes based on
the host Codex is running on. For example, they may want stricter
sandbox limits on devboxes while keeping a different default elsewhere.

Our current cloud requirements can target user/account groups, but they
cannot vary sandbox requirements by host. That makes remote development
environments awkward because the same top-level `allowed_sandbox_modes`
has to apply everywhere.

## What

Adds a new `remote_sandbox_config` section to `requirements.toml`:

```toml
allowed_sandbox_modes = ["read-only"]

[[remote_sandbox_config]]
hostname_patterns = ["*.org"]
allowed_sandbox_modes = ["read-only", "workspace-write"]

[[remote_sandbox_config]]
hostname_patterns = ["*.sh", "runner-*.ci"]
allowed_sandbox_modes = ["read-only", "danger-full-access"]
```

During requirements resolution, Codex resolves the local host name once,
preferring the machine FQDN when available and falling back to the
cleaned kernel hostname. This host classification is best effort rather
than authenticated device proof.

Each requirements source applies its first matching
`remote_sandbox_config` entry before it is merged with other sources.
The shared merge helper keeps that `apply_remote_sandbox_config` step
paired with requirements merging so new requirements sources do not have
to remember the extra call.

That preserves source precedence: a lower-precedence requirements file
with a matching `remote_sandbox_config` cannot override a
higher-precedence source that already set `allowed_sandbox_modes`.

This also wires the hostname-aware resolution through app-server,
CLI/TUI config loading, config API reads, and config layer metadata so
they all evaluate remote sandbox requirements consistently.

## Verification

- `cargo test -p codex-config remote_sandbox_config`
- `cargo test -p codex-config host_name`
- `cargo test -p codex-core
load_config_layers_applies_matching_remote_sandbox_config`
- `cargo test -p codex-core
system_remote_sandbox_config_keeps_cloud_sandbox_modes`
- `cargo test -p codex-config`
- `cargo test -p codex-core` unit tests passed; `tests/all.rs`
integration matrix was intentionally stopped after the relevant focused
tests passed
- `just fix -p codex-config`
- `just fix -p codex-core`
- `cargo check -p codex-app-server`
2026-04-21 05:05:02 +00:00
Dylan HurdandCodex 86535c9901 feat(auto-review) Handle request_permissions calls (#18393)
## Summary
When auto-review is enabled, it should handle request_permissions tool.
We'll need to clean up the UX but I'm planning to do that in a separate
pass

## Testing
- [x] Ran locally
<img width="893" height="396" alt="Screenshot 2026-04-17 at 1 16 13 PM"
src="https://github.com/user-attachments/assets/4c045c5f-1138-4c6c-ac6e-2cb6be4514d8"
/>

---------

Co-authored-by: Codex <noreply@openai.com>
2026-04-20 21:48:57 -07:00
Dylan Hurd 543a08dac9 chore(app-server) linguist-generated (#18807)
## Summary
Start marking app-server schema files as
[linguist-generated](https://docs.github.com/en/repositories/working-with-files/managing-files/customizing-how-changed-files-appear-on-github),
so we can more easily parse reviews
2026-04-20 21:42:00 -07:00
canvrno-oai 2cc146f5ea Fallback display names for TUI skill mentions (#18786)
This updates TUI skill mentions to show a fallback label when a skill
does not define a display name, so unnamed skills remain understandable
in the picker without changing behavior for skills that already have
one.

<img width="1028" height="198" alt="Screenshot 2026-04-20 at 6 25 15 PM"
src="https://github.com/user-attachments/assets/84077b85-99d0-4db9-b533-37e1887b4506"
/>
2026-04-20 20:46:55 -07:00
Michael Bolin 7166be1480 merge commit for archive created by Sapling 2026-04-20 20:13:08 -07:00
Michael Bolin bb8f4b8bf3 sandboxing: intersect permission profiles semantically 2026-04-20 20:12:47 -07:00
Matthew Zeng 1132ef887c Make MCP resource read threadless (#18292)
## Summary

Making thread id optional so that we can better cache resources for MCPs
for connectors since their resource templates is universal and not
particular to projects.

- Make `mcpServer/resource/read` accept an optional `threadId`
- Read resources from the current MCP config when no thread is supplied
- Keep the existing thread-scoped path when `threadId` is present
- Update the generated schemas, README, and integration coverage

## Testing
- `just write-app-server-schema`
- `just fmt`
- `cargo test -p codex-app-server-protocol`
- `cargo test -p codex-mcp`
- `cargo test -p codex-app-server --test all mcp_resource`
- `just fix -p codex-mcp`
- `just fix -p codex-app-server-protocol`
- `just fix -p codex-app-server`
2026-04-20 19:59:36 -07:00
Dylan Hurd 58e7605efc fix(guardian) Dont hard error on feature disable (#18795)
## Summary 
This shouldn't error for now

## Test plan
- [x] Updated unit test
2026-04-20 19:54:39 -07:00
Michael Bolin 7c4e862d2c Merge d9b343612d into sapling-pr-archive-bolinfest 2026-04-20 19:45:06 -07:00
Michael Bolin d9b343612d tests: isolate approval fixtures from host rules 2026-04-20 19:42:55 -07:00
Michael Bolin 0f8b8aed8e shell-escalation: carry resolved permission profiles 2026-04-20 19:42:55 -07:00
Michael Bolin 71636e4ea7 mcp: include permission profiles in sandbox state 2026-04-20 19:42:55 -07:00
Michael Bolin 2f70f509b5 tui: carry permission profiles on user turns 2026-04-20 19:42:55 -07:00
Michael Bolin 6d8ce0b430 tui: sync session permission profiles 2026-04-20 19:42:55 -07:00
Michael Bolin 4937fa7d26 app-server: accept command permission profiles 2026-04-20 19:42:55 -07:00
Michael Bolin eb2cbf577f protocol: report session permission profiles 2026-04-20 19:42:55 -07:00
Michael Bolin 299778060d rollout: persist turn permission profiles 2026-04-20 19:42:55 -07:00
Michael Bolin fac89b19c7 clients: send permission profiles to app-server 2026-04-20 19:42:55 -07:00
Michael Bolin 68b5f9d41f app-server: accept permission profile overrides 2026-04-20 19:42:55 -07:00
Michael Bolin 47010046fd app-server: expose thread permission profiles 2026-04-20 19:42:55 -07:00
Michael Bolin 31d1b49a15 core: derive active permission profiles 2026-04-20 19:42:55 -07:00
Michael Bolin 26a7cc7ea6 exec-server: carry filesystem sandbox profiles 2026-04-20 19:42:55 -07:00
Michael Bolin 8aa3a11ada sandboxing: intersect permission profiles semantically 2026-04-20 19:42:55 -07:00
Michael Bolin 3d2f123895 protocol: preserve glob scan depth in permission profiles (#18713)
## Why

#18274 made `PermissionProfile` the canonical file-system permissions
shape, but the round-trip from `FileSystemSandboxPolicy` to
`PermissionProfile` still dropped one piece of policy metadata:
`glob_scan_max_depth`.

That field is security-relevant for deny-read globs such as `**/*.env`.
On Linux, bubblewrap sandbox construction uses it to bound unreadable
glob expansion. If a profile copied from active runtime permissions
loses this value and is submitted back as an override, the resulting
`FileSystemSandboxPolicy` can behave differently even though the visible
permission entries look equivalent.

## What changed

- Add `glob_scan_max_depth` to protocol `FileSystemPermissions` and
preserve it when converting to/from `FileSystemSandboxPolicy`.
- Keep legacy `read`/`write` JSON for simple path-only permissions, but
force canonical JSON when glob scan depth is present so the metadata is
not silently dropped.
- Carry `globScanMaxDepth` through app-server
`AdditionalFileSystemPermissions`, generated JSON/TypeScript schemas,
and app-server/TUI conversion call sites.
- Preserve the metadata through sandboxing permission normalization,
merging, and intersection.
- Carry the merged scan depth into the effective
`FileSystemSandboxPolicy` used for command execution, so bounded
deny-read globs reach Linux bubblewrap materialization.

## Verification

- `cargo test -p codex-sandboxing glob_scan -- --nocapture`
- `cargo test -p codex-sandboxing policy_transforms -- --nocapture`
- `just fix -p codex-sandboxing`





---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/openai/codex/pull/18713).
* #18288
* #18287
* #18286
* #18285
* #18284
* #18283
* #18282
* #18281
* #18280
* #18279
* #18278
* #18277
* #18276
* #18275
* __->__ #18713
2026-04-20 19:42:45 -07:00
xl-openai 6e9e2c2eef feat: Support more plugin MCP file shapes. (#18780)
Update core-plugins MCP loading to accept either an mcpServers object or
a top-level server map in .mcp.json
2026-04-20 19:42:01 -07:00
Michael Bolin 97745db729 Merge 86529cae16 into sapling-pr-archive-bolinfest 2026-04-20 19:31:10 -07:00
Michael Bolin 86529cae16 chore: enable await-holding clippy lints
Follow-up to https://github.com/openai/codex/pull/18178, where we said the await-holding clippy rule would be enabled separately.

Enable `await_holding_lock` and `await_holding_invalid_type` after the preceding commits fixed or explicitly documented the current offenders.
2026-04-20 19:30:59 -07:00
Michael Bolin 48830448e9 chore: document intentional await-holding cases 2026-04-20 19:30:59 -07:00
Michael Bolin b8fa5e7789 Merge 2a33df043c into sapling-pr-archive-bolinfest 2026-04-20 19:24:34 -07:00
Michael Bolin 2a33df043c chore: enable await-holding clippy lints
Follow-up to https://github.com/openai/codex/pull/18178, where we said the await-holding clippy rule would be enabled separately.

Enable `await_holding_lock` and `await_holding_invalid_type` after the preceding commits fixed or explicitly documented the current offenders.
2026-04-20 19:24:26 -07:00
Michael Bolin aca6ccc4ee chore: document intentional await-holding cases 2026-04-20 19:24:25 -07:00
Michael Bolin ff05532723 refactor: narrow async lock scopes (#18418)
## Why

This is part of the follow-up work from #18178 to make Codex ready for
Clippy's
[`await_holding_lock`](https://rust-lang.github.io/rust-clippy/master/index.html#await_holding_lock)
/
[`await_holding_invalid_type`](https://rust-lang.github.io/rust-clippy/master/index.html#await_holding_invalid_type)
lints.

This bottom PR keeps the scope intentionally small:
`NetworkProxyState::record_blocked()` only needs the state write lock
while it mutates the blocked-request ring buffer and counters. The debug
log payload and `BlockedRequestObserver` callback can be produced after
that lock is released.

## What changed

- Copies the blocked-request snapshot values needed for logging while
updating the state.
- Releases the `RwLockWriteGuard` before logging or notifying the
observer.

## Verification

- `cargo test -p codex-network-proxy`


---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/openai/codex/pull/18418).
* #18698
* #18423
* __->__ #18418
2026-04-21 02:23:30 +00:00