Commit Graph
12702 Commits
Author SHA1 Message Date
Michael Bolin d75207dec4 Merge 731b2ed1a0 into sapling-pr-archive-bolinfest 2026-04-22 23:19:12 -07:00
Michael Bolin cf4848b4a4 Merge 85fa5c059b into sapling-pr-archive-bolinfest 2026-04-22 23:15:01 -07:00
Michael Bolin 85fa5c059b ensure AdditionalFileSystemPermissions is created with entries field set 2026-04-22 23:14:53 -07:00
Michael Bolin 731b2ed1a0 tui: sync session permission profiles 2026-04-22 23:13:51 -07:00
Gav Verma 2ef2d675d6 Clarify cloud requirements error messages (#19078)
## Why
The current cloud-requirements failures say `workspace-managed config`,
which is ambiguous and can read like it refers to local managed config
such as `managed_config.toml`.

This code path only applies to cloud requirements, so the user-facing
message should name that source directly.

## What changed
- Updated the load failure in
[`codex-rs/cloud-requirements/src/lib.rs`](https://github.com/openai/codex/blob/46e704d1f93054daa9a3b5a9100333c540c81d50/codex-rs/cloud-requirements/src/lib.rs)
to say `failed to load cloud requirements (workspace-managed policies)`.
- Updated the parse failure in the same file to use the same `cloud
requirements (workspace-managed policies)` terminology.
- Kept `workspace-managed` hyphenated because it is used as a compound
modifier.
- Updated the matching assertion in
[`codex-rs/app-server/src/codex_message_processor.rs`](https://github.com/openai/codex/blob/46e704d1f93054daa9a3b5a9100333c540c81d50/codex-rs/app-server/src/codex_message_processor.rs).
- Reused `CLOUD_REQUIREMENTS_LOAD_FAILED_MESSAGE` in the
`codex-cloud-requirements` test where the test is asserting that
crate-local contract directly.

## Testing
`cargo test -p codex-cloud-requirements`
2026-04-22 23:07:08 -07:00
Michael Bolin 9f3158defe Merge b53ebc2774 into sapling-pr-archive-bolinfest 2026-04-22 23:02:29 -07:00
Michael Bolin b53ebc2774 ensure AdditionalFileSystemPermissions is created with entries field set 2026-04-22 23:02:19 -07:00
Michael Bolin c91196f343 Merge 73b88f95ee into sapling-pr-archive-bolinfest 2026-04-22 22:57:57 -07:00
Michael Bolin 923084d81c Merge 08df3a31f3 into sapling-pr-archive-bolinfest 2026-04-22 22:55:08 -07:00
Michael Bolin 73b88f95ee tests: isolate approval fixtures from host rules 2026-04-22 22:54:41 -07:00
Michael Bolin 9c6bee159d shell-escalation: carry resolved permission profiles 2026-04-22 22:54:41 -07:00
Michael Bolin f3618d2cd0 mcp: include permission profiles in sandbox state 2026-04-22 22:54:41 -07:00
Michael Bolin b6e06a7c84 tui: carry permission profiles on user turns 2026-04-22 22:54:41 -07:00
Michael Bolin 08df3a31f3 tui: sync session permission profiles 2026-04-22 22:54:40 -07:00
xl-openai 951be1a8a1 feat: Warn and continue on unknown feature requirements (#19038)
Requirements feature flags now fail open like config feature flags, but
with a startup warning.

<img width="443" height="68" alt="image"
src="https://github.com/user-attachments/assets/76767fa7-8ce8-4fc7-8a09-902fcdda6298"
/>
2026-04-22 22:50:44 -07:00
xl-openai fb6308cf64 Use remote plugin IDs for detail reads and enlarge list pages (#19079)
1. For remote plugin use plugin id (plugin name) directly for read
plugin details;
2. Request up to 200 remote plugins per directory list page.
2026-04-22 22:50:20 -07:00
Leo ShimonakaandDylan Hurd 7730fb3ab8 Add computer_use feature requirement key (#19071)
## Summary
- add the `computer_use` requirements-only feature key
- include it in generated config schema output
- cover the new key in feature metadata tests

## Testing
- `cargo test -p codex-features`
- `just write-config-schema`
- `just fmt`
- `just fix -p codex-features`

cc @xl-openai

---------

Co-authored-by: Dylan Hurd <dylan.hurd@openai.com>
2026-04-22 22:49:26 -07:00
Michael Bolin 88520afe2c Merge f2e091cc3e into sapling-pr-archive-bolinfest 2026-04-22 22:45:51 -07:00
Michael Bolin 3f51be045d merge commit for archive created by Sapling 2026-04-22 22:44:53 -07:00
Michael Bolin f2e091cc3e tests: isolate approval fixtures from host rules 2026-04-22 22:44:21 -07:00
Michael Bolin c69c677311 tui: sync session permission profiles 2026-04-22 22:44:21 -07:00
Michael Bolin e8205156ee shell-escalation: carry resolved permission profiles 2026-04-22 22:44:21 -07:00
Michael Bolin cb931f3cf8 mcp: include permission profiles in sandbox state 2026-04-22 22:44:21 -07:00
Michael Bolin 98e4cb1cad tui: carry permission profiles on user turns 2026-04-22 22:44:21 -07:00
Eric Traut 08b5e96678 TUI: preserve permission state after side conversations (#18924)
Addresses #18854

## Why

The `/permissions` selector updates the active TUI session state, but
the cached session snapshot used when replaying a thread could still
contain the old approval or sandbox settings. After opening and leaving
`/side`, the main thread replay could restore those stale settings into
the `ChatWidget`, so the UI and the next submitted turn could fall back
to the old permission mode.

## What

- Sync the active thread's cached `ThreadSessionState` whenever approval
policy, sandbox policy, or approval reviewer changes.

## Verification

Confirmed bug prior to fix and correct behavior after fix.
2026-04-22 22:40:35 -07:00
Michael Bolin 1de4254d2d Merge a21b9e5173 into sapling-pr-archive-bolinfest 2026-04-22 22:36:12 -07:00
Michael Bolin a21b9e5173 tests: isolate approval fixtures from host rules 2026-04-22 22:36:00 -07:00
Michael Bolin b68382f42c shell-escalation: carry resolved permission profiles 2026-04-22 22:36:00 -07:00
Michael Bolin 17d296a6de mcp: include permission profiles in sandbox state 2026-04-22 22:36:00 -07:00
Michael Bolin acdb526d4d tui: carry permission profiles on user turns 2026-04-22 22:36:00 -07:00
Michael Bolin 1d0f013cdf tui: sync session permission profiles 2026-04-22 22:36:00 -07:00
Abhinav 23afa173f4 Mark codex_hooks stable (#19012)
# Why

Hooks are ready to graduate to GA in the next release!

# What

- Moves `Feature::CodexHooks` into the stable feature group.
- Marks the `codex_hooks` feature spec as `Stage::Stable` and
default-enabled.
2026-04-23 05:34:05 +00:00
Michael Bolin 9d824cf4b4 app-server: accept command permission profiles (#18283)
## Why

`command/exec` is another app-server entry point that can run under
caller-provided permissions. It needs to accept `PermissionProfile`
directly so command execution is not left behind on `SandboxPolicy`
while thread APIs move forward.

Command-level profiles also need to preserve the semantics clients
expect from profile-relative paths. `:cwd` and cwd-relative deny globs
should be anchored to the resolved command cwd for a command-specific
profile, while configured deny-read restrictions such as `**/*.env =
none` still need to be enforced because they can come from config or
requirements rather than the command override itself.

## What Changed

This adds `permissionProfile` to `CommandExecParams`, rejects requests
that combine it with `sandboxPolicy`, and converts accepted profiles
into the runtime filesystem/network permissions used for command
execution.

When a command supplies a profile, the app-server resolves that profile
against the command cwd instead of the thread/server cwd. It also
preserves configured deny-read entries and `globScanMaxDepth` on the
effective filesystem policy so one-off command overrides cannot drop
those read protections. The PR also updates app-server docs/schema
fixtures and adds command-exec coverage for accepted, rejected,
cwd-scoped, and deny-read-preserving profile paths.

## Verification

- `cargo test -p codex-app-server
command_exec_permission_profile_cwd_uses_command_cwd`
- `cargo test -p codex-app-server
command_profile_preserves_configured_deny_read_restrictions`
- `cargo test -p codex-app-server
command_exec_accepts_permission_profile`
- `cargo test -p codex-app-server
command_exec_rejects_sandbox_policy_with_permission_profile`
- `just fix -p codex-app-server`

---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/openai/codex/pull/18283).
* #18288
* #18287
* #18286
* #18285
* #18284
* __->__ #18283
2026-04-22 22:33:16 -07:00
Eric Traut bbff4ee61a Add safety check notification and error handling (#19055)
Adds a new app-server notification that fires when a user account has
been flagged for potential safety reasons.
2026-04-22 22:24:12 -07:00
Michael Bolin a8257e6387 merge commit for archive created by Sapling 2026-04-22 22:00:05 -07:00
Michael Bolin 431e0ee3c4 app-server: accept command permission profiles 2026-04-22 21:59:08 -07:00
Shijie Rao 02170996e6 Default Fast service tier for eligible ChatGPT plans (#19053)
## Why

Enterprise and business-like ChatGPT plans should get Codex's Fast
service tier by default when the user or caller has not made an explicit
service-tier choice. At the same time, callers need a durable way to
choose standard routing without adding a new persisted `standard`
service tier value. This keeps existing config compatibility while
letting core own the managed default policy.

## What changed

- Resolve the effective service tier in core at session creation:
explicit `fast` or `flex` wins, explicit null/clear or
`[notice].fast_default_opt_out = true` resolves to standard routing, and
otherwise eligible ChatGPT plans resolve to Fast when FastMode is
enabled.
- Add `[notice].fast_default_opt_out` as the persisted opt-out marker
for managed Fast defaults.
- Treat app-server/TUI `service_tier: null` as an explicit
standard/clear choice by preserving that intent through config loading.
- Update TUI rendering to use core's effective service tier for startup
and status surfaces while still keeping `config.service_tier` as the
explicit configured choice.
- Update `/fast off` to clear `service_tier`, persist the opt-out
marker, and send explicit standard for subsequent turns.

## Verification

- Added unit coverage for config override/notice handling, service-tier
resolution, runtime null clearing, and `/fast off` turn propagation.
- `cargo build -p codex-cli`

Full test suite was not run locally per author request.
2026-04-22 21:54:44 -07:00
Michael Bolin 69b4b3ed36 Merge c5c355b19d into sapling-pr-archive-bolinfest 2026-04-22 21:45:17 -07:00
Michael Bolin 1f3e227f70 Merge ea0e559397 into sapling-pr-archive-bolinfest 2026-04-22 21:40:05 -07:00
Michael Bolin ea0e559397 tests: isolate approval fixtures from host rules 2026-04-22 21:39:46 -07:00
Michael Bolin 1809c700ca shell-escalation: carry resolved permission profiles 2026-04-22 21:39:46 -07:00
Michael Bolin 247dd38205 mcp: include permission profiles in sandbox state 2026-04-22 21:39:46 -07:00
Michael Bolin c2ad4f12bc tui: carry permission profiles on user turns 2026-04-22 21:39:46 -07:00
Michael Bolin a167893dc6 tui: sync session permission profiles 2026-04-22 21:39:46 -07:00
Michael Bolin 18591d6518 app-server: accept command permission profiles 2026-04-22 21:39:46 -07:00
Michael Bolin 082fc4f632 protocol: report session permission profiles (#18282)
## Why

Clients that observe `SessionConfigured` need the same canonical
permission view that app-server thread responses provide. Reporting the
profile in protocol events lets clients keep their local state
synchronized without reinterpreting legacy sandbox fields.

## What changed

This adds `permission_profile` to `SessionConfigured` and propagates it
through core, exec JSON output, MCP server messages, and TUI
history/widget handling.

## Verification

- `cargo test -p codex-tui permissions -- --nocapture`
- `cargo test -p codex-core --test all permissions_messages --
--nocapture`















































---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/openai/codex/pull/18282).
* #18288
* #18287
* #18286
* #18285
* #18284
* #18283
* __->__ #18282
2026-04-22 21:29:32 -07:00
Michael Bolin c5c355b19d bazel: shard slower Rust test targets 2026-04-22 21:25:07 -07:00
Andrei EternalandMichael Bolin 2b2de3f38b codex: support hooks in config.toml and requirements.toml (#18893)
## Summary

Support the existing hooks schema in inline TOML so hooks can be
configured from both `config.toml` and enterprise-managed
`requirements.toml` without requiring a separate `hooks.json` payload.

This gives enterprise admins a way to ship managed hook policy through
the existing requirements channel while still leaving script delivery to
MDM or other device-management tooling, and it keeps `hooks.json`
working unchanged for existing users.

This also lays the groundwork for follow-on managed filtering work such
as #15937, while continuing to respect project trust gating from #14718.
It does **not** implement `allow_managed_hooks_only` itself.

NOTE: yes, it's a bit unfortunate that the toml isn't formatted as
closely as normal to our default styling. This is because we're trying
to stay compatible with the spec for plugins/hooks that we'll need to
support & the main usecase here is embedding into requirements.toml

## What changed

- moved the shared hook serde model out of `codex-rs/hooks` into
`codex-rs/config` so the same schema can power `hooks.json`, inline
`config.toml` hooks, and managed `requirements.toml` hooks
- added `hooks` support to both `ConfigToml` and
`ConfigRequirementsToml`, including requirements-side `managed_dir` /
`windows_managed_dir`
- treated requirements-managed hooks as one constrained value via
`Constrained`, so managed hook policy is merged atomically and cannot
drift across requirement sources
- updated hook discovery to load requirements-managed hooks first, then
per-layer `hooks.json`, then per-layer inline TOML hooks, with a warning
when a single layer defines both representations
- threaded managed hook metadata through discovered handlers and exposed
requirements hooks in app-server responses, generated schemas, and
`/debug-config`
- added hook/config coverage in `codex-rs/config`, `codex-rs/hooks`,
`codex-rs/core/src/config_loader/tests.rs`, and
`codex-rs/core/tests/suite/hooks.rs`

## Testing

- `cargo test -p codex-config`
- `cargo test -p codex-hooks`
- `cargo test -p codex-app-server config_api`

## Documentation

Companion updates are needed in the developers website repo for:

- the hooks guide
- the config reference, sample, basic, and advanced pages
- the enterprise managed configuration guide

---------

Co-authored-by: Michael Bolin <mbolin@openai.com>
2026-04-22 21:20:09 -07:00
Michael Bolin f35273a3c3 merge commit for archive created by Sapling 2026-04-22 21:04:03 -07:00
Michael Bolin 9047f9a16c tests: isolate approval fixtures from host rules 2026-04-22 21:02:31 -07:00