Commit Graph
12249 Commits
Author SHA1 Message Date
Michael Bolin 1047754a95 protocol: report session permission profiles 2026-04-20 11:28:21 -07:00
Michael Bolin 3d392a85f7 rollout: persist turn permission profiles 2026-04-20 11:28:20 -07:00
Michael Bolin 555ef16353 clients: send permission profiles to app-server 2026-04-20 11:28:20 -07:00
Michael Bolin c100e8e52f app-server: accept permission profile overrides 2026-04-20 11:28:20 -07:00
Michael Bolin 5cc2e1597e app-server: expose thread permission profiles 2026-04-20 11:27:49 -07:00
Michael Bolin ac2c7a9c94 core: derive active permission profiles 2026-04-20 11:25:53 -07:00
Michael Bolin 7d5612c56e exec-server: carry filesystem sandbox profiles 2026-04-20 11:25:53 -07:00
Michael Bolin 319f3ef2ad sandboxing: intersect permission profiles semantically 2026-04-20 11:25:53 -07:00
Michael Bolin 4ba4370b70 protocol: canonicalize file system permissions 2026-04-20 11:25:53 -07:00
Adrian 6b17adc231 [codex] Fix agent identity auth test fixture (#18697)
## Summary
- Add the missing `background_task_id: None` field to the
`AgentIdentityAuthRecord` fixture introduced in `auth_tests.rs`.

## Why
- Current `main` fails Bazel/rust-ci compile paths after the
background-task auth field landed and a later auth test fixture
constructed `AgentIdentityAuthRecord` without that new field.
- I intentionally removed the earlier broader CI-stability edits from
this PR. The code-mode timeout, external-agent migration snapshot, and
MCP resource timeout failures appear to be general/flaky or unrelated to
the agent identity merge stack rather than cleanly caused by it.

## Validation
- `cargo test -p codex-login
dummy_chatgpt_auth_does_not_create_cwd_auth_json_when_identity_is_set --
--nocapture`
- `just fmt`
2026-04-20 11:05:58 -07:00
Michael Bolin 1c4a81a549 merge commit for archive created by Sapling 2026-04-20 11:03:55 -07:00
Michael Bolin 8109fc88d9 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 11:03:37 -07:00
Michael Bolin 0e2580d285 chore: document intentional await-holding cases 2026-04-20 11:03:37 -07:00
Michael Bolin f487ca96d4 refactor: drop data locks before async work 2026-04-20 11:03:35 -07:00
Eric Traut 164b6a0c78 Remove simple TUI legacy_core reexports (#18631)
## Problem
The TUI still imported path utilities and config-loader symbols through
app-server-client's legacy_core facade even though those APIs already
exist in utility/config crates. This is part of our ongoing effort to
whittle away at these old dependencies.

## Solution
Rewire imports to avoid the TUI directly importing from the core crate
and instead import from common lower-level crates. This PR doesn't
include any functional changes; it's just a simple rewiring.
2026-04-20 10:48:27 -07:00
Akshay Nathan 34a3e85fcd Wire the PatchUpdated events through app_server (#18289)
Wires patch_updated events through app_server. These events are parsed
and streamed while apply_patch is being written by the model. Also adds 500ms of buffering to the patch_updated events in the diff_consumer.

The eventual goal is to use this to display better progress indicators in
the codex app.
2026-04-20 10:44:03 -07:00
Ahmed Ibrahim 316cf0e90b Update models.json (#18586)
- Replace the active models-manager catalog with the deleted core
catalog contents.
- Replace stale hardcoded test model slugs with current bundled model
slugs.
- Keep this as a stacked change on top of the cleanup PR.
2026-04-20 10:27:01 -07:00
Michael Bolin 5d5d610740 refactor: use semaphores for async serialization gates (#18403)
This is the second cleanup in the await-holding lint stack. The
higher-level goal, following https://github.com/openai/codex/pull/18178
and https://github.com/openai/codex/pull/18398, is to enable Clippy
coverage for guards held across `.await` points without carrying broad
suppressions.

The stack is working toward enabling Clippy's
[`await_holding_lock`](https://rust-lang.github.io/rust-clippy/master/index.html#await_holding_lock)
lint and the configurable
[`await_holding_invalid_type`](https://rust-lang.github.io/rust-clippy/master/index.html#await_holding_invalid_type)
lint for Tokio guard types.

Several existing fields used `tokio::sync::Mutex<()>` only as
one-at-a-time async gates. Those guards intentionally lived across
`.await` while an operation was serialized. A mutex over `()` suggests
protected data and trips the await-holding lint shape; a single-permit
`tokio::sync::Semaphore` expresses the intended serialization directly.

## What changed

- Replace `Mutex<()>` serialization gates with `Semaphore::new(1)` for
agent identity ensure, exec policy updates, guardian review session
reuse, plugin remote sync, managed network proxy refresh, auth token
refresh, and RMCP session recovery.
- Update call sites from `lock().await` / `try_lock()` to
`acquire().await` / `try_acquire()`.
- Map closed-semaphore errors into the existing local error types, even
though these semaphores are owned for the lifetime of their managers.
- Update session test builders for the new
`managed_network_proxy_refresh_lock` type.

## Verification

- The split stack was verified at the final lint-enabling head with
`just clippy`.





---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/openai/codex/pull/18403).
* #18698
* #18423
* #18418
* __->__ #18403
2026-04-20 17:21:29 +00:00
Michael Bolin 5e9e915886 merge commit for archive created by Sapling 2026-04-20 10:10:06 -07:00
Michael Bolin 685b32b3a1 tests: isolate approval fixtures from host rules 2026-04-20 10:09:13 -07:00
Michael Bolin c5b086b055 shell-escalation: carry resolved permission profiles 2026-04-20 10:09:12 -07:00
Michael Bolin 7a018038e5 mcp: include permission profiles in sandbox state 2026-04-20 10:09:11 -07:00
Michael Bolin b197f5904b tui: carry permission profiles on user turns 2026-04-20 10:09:10 -07:00
Michael Bolin 82043d3aff tui: sync session permission profiles 2026-04-20 10:09:09 -07:00
Michael Bolin a9a5407059 app-server: accept command permission profiles 2026-04-20 10:08:05 -07:00
Michael Bolin 51dd74b8b6 protocol: report session permission profiles 2026-04-20 10:08:04 -07:00
Michael Bolin 010d66d202 rollout: persist turn permission profiles 2026-04-20 10:08:03 -07:00
Michael Bolin 881681c5ea clients: send permission profiles to app-server 2026-04-20 10:08:02 -07:00
Michael Bolin 536d5c4bb0 app-server: accept permission profile overrides 2026-04-20 10:07:22 -07:00
Michael Bolin 5a8cad0d06 app-server: expose thread permission profiles 2026-04-20 10:07:21 -07:00
Michael Bolin f02bf74af4 core: derive active permission profiles 2026-04-20 10:07:20 -07:00
Michael Bolin e206a3976e exec-server: carry filesystem sandbox profiles 2026-04-20 10:07:20 -07:00
Michael Bolin 69145c1618 sandboxing: intersect permission profiles semantically 2026-04-20 10:07:17 -07:00
Michael Bolin f015e0872b protocol: canonicalize file system permissions 2026-04-20 10:07:16 -07:00
Michael Bolin dcec516313 protocol: canonicalize file system permissions (#18274)
## Why

`PermissionProfile` needs stable, canonical file-system semantics before
it can become the primary runtime permissions abstraction. Without a
canonical form, callers have to keep re-deriving legacy sandbox maps and
profile comparisons remain lossy or order-dependent.

## What changed

This adds canonicalization helpers for `FileSystemPermissions` and
`PermissionProfile`, expands special paths into explicit sandbox
entries, and updates permission request/conversion paths to consume
those canonical entries. It also tightens the legacy bridge so root-wide
write profiles with narrower carveouts are not silently projected as
full-disk legacy access.

## Verification

- `cargo test -p codex-protocol
root_write_with_read_only_child_is_not_full_disk_write -- --nocapture`
- `cargo test -p codex-sandboxing permission -- --nocapture`
- `cargo test -p codex-tui permissions -- --nocapture`
2026-04-20 09:57:03 -07:00
Michael Bolin 1a3cdce470 Merge cadb03641f into sapling-pr-archive-bolinfest 2026-04-20 09:55:50 -07:00
Michael Bolin cadb03641f 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 09:55:41 -07:00
Michael Bolin fa6ec5548d merge commit for archive created by Sapling 2026-04-20 09:54:42 -07:00
Tom ac7c9a685f codex: move unloaded thread writes into store (#18361)
- Migrates unloaded `thread/name/set` and `thread/memoryModeSet`
app-server writes behind the generic
`ThreadStore::update_thread_metadata` API rather than adding one-off
store methods for setting thread name or memory mode.
- Implements the local ThreadStore metadata patch path for thread name
and memory mode, including rollout append, legacy name index updates,
SessionMeta validation/update, SQLite reconciliation, and re-reading the
stored thread.
- Adds focused local thread-store unit coverage plus app-server
integration coverage for the migrated unloaded write paths.
2026-04-20 09:50:01 -07:00
Michael Bolin bdb9cbc2b8 chore: document intentional await-holding cases 2026-04-20 09:41:29 -07:00
Michael Bolin ecc7eb08f7 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 09:41:29 -07:00
Michael Bolin 6f9ba0f3e1 refactor: drop data locks before async work 2026-04-20 09:41:29 -07:00
Michael Bolin 052e8f12f4 refactor: use semaphores for async serialization gates 2026-04-20 09:41:29 -07:00
Eric Traut 0dc503ba6e Surface parent thread status in side conversations (#18591)
## Summary

Side conversations can hide important state changes from the parent
conversation while the user is focused on the side thread. In
particular, the parent may finish, fail, need user input, or require an
approval while the side conversation remains visible. Users need a
lightweight signal for those states, but parent approval overlays should
not interrupt the side conversation itself.

This change adds parent-conversation status to the side conversation
context label and defers parent interactive overlays while side mode is
active. When the user exits side mode, pending parent approvals and
input requests are restored in the main thread. The pending approval
footer avoids duplicating the same parent approval status, and replayed
notice cells are filtered when restoring a pending interactive request
so tips or warnings do not crowd out the approval prompt.

The change is contained to the TUI side-conversation and thread replay
paths.

Example 1: Approval pending
<img width="752" height="35" alt="Screenshot 2026-04-19 at 12 56 07 PM"
src="https://github.com/user-attachments/assets/1cc0f1a3-9cab-4d60-aed2-96523ccafc20"
/>

Example 2: Turn complete
<img width="754" height="35" alt="Screenshot 2026-04-19 at 12 56 27 PM"
src="https://github.com/user-attachments/assets/653521a5-e298-4366-ae1c-72b56eb88eeb"
/>
2026-04-20 09:00:44 -07:00
Michael Bolin e793eb13a7 merge commit for archive created by Sapling 2026-04-20 08:52:00 -07:00
Michael Bolin 10e15c3156 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 08:51:20 -07:00
Michael Bolin ec93cbf238 chore: document intentional await-holding cases 2026-04-20 08:50:02 -07:00
Michael Bolin 2a8f305311 refactor: drop data locks before async work 2026-04-20 08:50:02 -07:00
Michael Bolin b3f6f7cdf2 refactor: use semaphores for async serialization gates 2026-04-20 08:50:02 -07:00
Eric Traut 43a69c50eb Use app server thread names in TUI picker (#18633)
## Problem

The TUI resume/fork picker was backfilling thread names from local
rollout indexes. This was left over from before the TUI was moved to the
app server. It should be using app-server APIs because the TUI might be
connected to a remote connection.

This bug wasn't (yet) reported by a user. I found it by asking Codex to
review places in the TUI code where it was still directly accessing the
CODEX_HOME directory rather than going through app-server APIs.

## Solution

The resume picker and session lookups should use app-server thread APIs
only. Remove legacy rollout name/list backfills, and avoid local name
reads in fork history.

## Testing

I manually tested `codex resume` and `codex resume --all` to look for
functional or performance regressions in the resume picker.
2026-04-20 08:16:24 -07:00