Commit Graph
13712 Commits
Author SHA1 Message Date
Michael Bolin ee327e0069 Merge 393a21dcd6 into sapling-pr-archive-bolinfest 2026-04-27 17:46:25 -07:00
Michael Bolin 393a21dcd6 permissions: add built-in default profiles 2026-04-27 17:44:45 -07:00
Michael Bolin 5fca8f2fa1 app-server-protocol: mark permission profiles experimental 2026-04-27 17:44:45 -07:00
Michael Bolin 12824baa72 Merge 88df7ef0b8 into sapling-pr-archive-bolinfest 2026-04-27 17:12:19 -07:00
Michael Bolin 88df7ef0b8 permissions: store thread sessions as profiles 2026-04-27 17:11:10 -07:00
Michael Bolin dd9545ccdf permissions: derive snapshot sandbox projections 2026-04-27 17:11:10 -07:00
Michael Bolin 1588963deb permissions: make SessionConfigured profile-only 2026-04-27 17:10:37 -07:00
Michael Bolin d17063d193 merge commit for archive created by Sapling 2026-04-27 17:06:01 -07:00
Michael Bolin 6cc84ca923 permissions: require profiles in TUI thread state 2026-04-27 17:05:37 -07:00
Michael Bolin 7481ea3952 permissions: store thread sessions as profiles 2026-04-27 17:05:37 -07:00
Michael Bolin 7a2d35660c permissions: derive snapshot sandbox projections 2026-04-27 17:05:37 -07:00
Michael Bolin 25a8e1d617 permissions: make SessionConfigured profile-only 2026-04-27 17:05:37 -07:00
Michael Bolin dfe7507253 merge commit for archive created by Sapling 2026-04-27 17:04:36 -07:00
Michael Bolin 457d0a6dfd permissions: store thread sessions as profiles 2026-04-27 17:04:20 -07:00
Michael Bolin 5772009240 permissions: derive snapshot sandbox projections 2026-04-27 17:04:20 -07:00
Michael Bolin 0676603e5e permissions: make SessionConfigured profile-only 2026-04-27 16:59:45 -07:00
Michael Bolin 5ffd2158da permissions: require profiles in TUI thread state 2026-04-27 16:59:08 -07:00
Michael Bolin 7a49eabf0b merge commit for archive created by Sapling 2026-04-27 16:58:48 -07:00
Michael Bolin 2558ae6bc4 permissions: store thread sessions as profiles 2026-04-27 16:55:02 -07:00
Michael Bolin 3fe6c38abf permissions: derive snapshot sandbox projections 2026-04-27 16:54:21 -07:00
Michael Bolin 1e8a11fda0 permissions: make SessionConfigured profile-only 2026-04-27 16:54:21 -07:00
Michael Bolin fcfcacf9a6 permissions: require profiles in TUI thread state 2026-04-27 16:54:21 -07:00
Michael Bolin 755880ef9c permissions: derive config defaults as profiles (#19772)
## Why

This continues the permissions migration by making legacy config default
resolution produce the canonical `PermissionProfile` first. The legacy
`SandboxPolicy` projection should stay available at compatibility
boundaries, but config loading should not create a legacy policy just to
immediately convert it back into a profile.

Specifically, when `default_permissions` is not specified in
`config.toml`, instead of creating a `SandboxPolicy` in
`codex-rs/core/src/config/mod.rs` and then trying to derive a
`PermissionProfile` from it, we use `derive_permission_profile()` to
create a more faithful `PermissionProfile` using the values of
`ConfigToml` directly.

This also keeps the existing behavior of `sandbox_workspace_write` and
extra writable roots after #19841 replaced `:cwd` with `:project_roots`.
Legacy workspace-write defaults are represented as symbolic
`:project_roots` write access plus symbolic project-root metadata
carveouts. Extra absolute writable roots are still added directly and
continue to get concrete metadata protections for paths that exist under
those roots.

The platform sandboxes differ when a symbolic project-root subpath does
not exist yet.

* **Seatbelt** can encode literal/subpath exclusions directly, so macOS
emits project-root metadata subpath policies even if `.git`, `.agents`,
or `.codex` do not exist.
* **bwrap** has to materialize bind-mount targets. Binding `/dev/null`
to a missing `.git` can create a host-visible placeholder that changes
Git repo discovery. Binding missing `.agents` would not affect Git
discovery, but it would still create a host-visible project metadata
placeholder from an automatic compatibility carveout. Linux therefore
skips only missing automatic `.git` and `.agents` read-only metadata
masks; missing `.codex` remains protected so first-time project config
creation goes through the protected-path approval flow. User-authored
`read` and `none` subpath rules keep normal bwrap behavior, and `none`
can still mask the first missing component to prevent creation under
writable roots.

## What Changed

- Adds profile-native helpers for legacy workspace-write semantics,
including `PermissionProfile::workspace_write_with()`,
`FileSystemSandboxPolicy::workspace_write()`, and
`FileSystemSandboxPolicy::with_additional_legacy_workspace_writable_roots()`.
- Makes `FileSystemSandboxPolicy::workspace_write()` the single legacy
workspace-write constructor so both `from_legacy_sandbox_policy()` and
`From<&SandboxPolicy>` include the project-root metadata carveouts.
- Removes the no-carveout `legacy_workspace_write_base_policy()` path
and the `prune_read_entries_under_writable_roots()` cleanup that was
only needed by that split construction.
- Adds `ConfigToml::derive_permission_profile()` for legacy sandbox-mode
fallback resolution; named `default_permissions` profiles continue
through the permissions profile pipeline instead of being reconstructed
from `sandbox_mode`.
- Updates `Config::load()` to start from the derived profile, validate
that it still has a legacy compatibility projection, and apply
additional writable roots directly to managed workspace-write filesystem
policies.
- Updates Linux bwrap argument construction so missing automatic
`.git`/`.agents` symbolic project-root read-only carveouts are skipped
before emitting bind args; missing `.codex`, user-authored `read`/`none`
subpath rules, and existing missing writable-root behavior are
preserved.
- Adds coverage that legacy workspace-write config produces symbolic
project-root metadata carveouts, extra legacy workspace writable roots
still protect existing metadata paths such as `.git`, and bwrap skips
missing `.git`/`.agents` project-root carveouts while preserving missing
`.codex` and user-authored missing subpath rules.

---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/openai/codex/pull/19772).
* #19776
* #19775
* #19774
* #19773
* __->__ #19772
2026-04-27 16:50:10 -07:00
pakrym-oai c5a495c2cd Streamline review and feedback handlers (#19498)
## Why

The remaining review, interrupt, fuzzy search, feedback, and git-diff
handlers still had local send-error branches that obscured otherwise
simple request handling. This final slice flattens those handlers
without changing the public protocol behavior.

## What Changed

- Streamlined review start, turn interrupt, fuzzy search session,
feedback upload, and git diff handlers in
`codex-rs/app-server/src/codex_message_processor.rs`.
- Converted validation and upload failures into returned JSON-RPC errors
where that avoids nested `send_error`/`return` blocks.
- Left unrelated sandbox setup and notification code untouched.

## Verification

- `cargo check -p codex-app-server`
- `cargo test -p codex-app-server --test all v2::review --
--test-threads=1`
2026-04-27 16:36:04 -07:00
Matthew Zeng dcd139b7c4 Add MCP app feature flag (#19884)
## Summary
- Add the `enable_mcp_apps` feature flag to the `codex-features`
registry
- Keep it under development and disabled by default

## Testing
- Unit tests for `codex-features` passed
- Formatting passed
2026-04-27 16:28:49 -07:00
Michael Bolin 8100a5aa89 merge commit for archive created by Sapling 2026-04-27 16:12:26 -07:00
Michael Bolin d7ebb4cd37 permissions: derive config defaults as profiles 2026-04-27 16:12:15 -07:00
Michael Bolin 7e8dd67d07 permissions: store thread sessions as profiles 2026-04-27 16:12:15 -07:00
Michael Bolin 41d0199a7a permissions: derive snapshot sandbox projections 2026-04-27 16:12:15 -07:00
Michael Bolin 1ec30342a1 permissions: make SessionConfigured profile-only 2026-04-27 16:12:15 -07:00
Michael Bolin 80686c3dfe permissions: require profiles in TUI thread state 2026-04-27 16:12:15 -07:00
Michael Bolin aa43c1b782 merge commit for archive created by Sapling 2026-04-27 16:02:44 -07:00
Michael Bolin 156f972811 permissions: store thread sessions as profiles 2026-04-27 16:02:22 -07:00
Michael Bolin 09d5507840 permissions: derive snapshot sandbox projections 2026-04-27 16:02:22 -07:00
Michael Bolin 4b9080c737 permissions: make SessionConfigured profile-only 2026-04-27 16:02:22 -07:00
Michael Bolin 7c94f87a1e permissions: require profiles in TUI thread state 2026-04-27 16:02:22 -07:00
Michael Bolin e103c1c45b permissions: derive config defaults as profiles 2026-04-27 16:02:22 -07:00
Michael Bolin 653711a7f1 merge commit for archive created by Sapling 2026-04-27 15:49:57 -07:00
Michael Bolin 5bda4853bc permissions: store thread sessions as profiles 2026-04-27 15:49:32 -07:00
Michael Bolin 06794dfbd9 permissions: derive snapshot sandbox projections 2026-04-27 15:49:32 -07:00
Michael Bolin 53baea0d89 permissions: make SessionConfigured profile-only 2026-04-27 15:49:32 -07:00
Michael Bolin 5b19acc5a3 permissions: require profiles in TUI thread state 2026-04-27 15:49:32 -07:00
Michael Bolin 4b888579c2 permissions: derive config defaults as profiles 2026-04-27 15:49:24 -07:00
Michael Bolin 2fe1e091d2 Merge 231240aead into sapling-pr-archive-bolinfest 2026-04-27 15:30:00 -07:00
Michael Bolin 231240aead permissions: store thread sessions as profiles 2026-04-27 15:29:48 -07:00
Michael Bolin 195ef2bcbf permissions: derive snapshot sandbox projections 2026-04-27 15:29:48 -07:00
Michael Bolin ea8ca7d98f permissions: make SessionConfigured profile-only 2026-04-27 15:29:48 -07:00
Michael Bolin 030cb2874d permissions: require profiles in TUI thread state 2026-04-27 15:29:48 -07:00
Michael Bolin d95b63717f permissions: derive config defaults as profiles 2026-04-27 15:29:48 -07:00
canvrno-oai e64c765673 Show action required in terminal title (#18372)
Implements #18162

This updates the TUI terminal title to show an explicit action-required
state when Codex is blocked on user approval or input. The terminal
title now uses the activity title item to cover both active work and
blocked-on-user states, while still accepting the legacy spinner config
value.

Changes
- Rename the terminal title item from `spinner` to `activity` while
preserving legacy config compatibility
- Show `[ ! ] Action Required `while approval or input overlays are
active, with a blinking `[ . ]` alternate state
- Suppress the normal working spinner while Codex is blocked on user
action
- Add targeted coverage for action-required title behavior and legacy
title-item parsing

Testing
- Trigger an approval or input modal and confirm the tab title
alternates between `[ ! ] Action Required` and `[ . ] Action Required`
- Disable the activity title item and confirm the action-required title
does not appear
- Resolve the prompt and confirm the title returns to the normal
spinning/idel state


https://github.com/user-attachments/assets/e9ecc530-a6be-4fd7-b9a6-d550a790eb2c
2026-04-27 15:27:11 -07:00