Commit Graph

15324 Commits

Author SHA1 Message Date
Michael Bolin
18a35b5192 Merge 4eed799314 into sapling-pr-archive-bolinfest 2026-05-12 08:09:39 -07:00
Michael Bolin
4eed799314 docs: clarify permissions thread lifecycle API 2026-05-12 08:09:26 -07:00
Michael Bolin
0c3bde9fea app-server: test empty workspace roots roundtrip 2026-05-12 08:09:26 -07:00
Michael Bolin
ba9d443843 app-server: test persisted active permission profile 2026-05-12 08:09:26 -07:00
Michael Bolin
d4060ad5a2 permissions: move workspace roots onto thread state 2026-05-12 08:09:26 -07:00
Michael Bolin
fcc338495a core: box multi-agent handler futures 2026-05-12 08:09:26 -07:00
Michael Bolin
be0c37d42b merge commit for archive created by Sapling 2026-05-12 07:59:24 -07:00
Michael Bolin
d86158a53b docs: clarify permissions thread lifecycle API 2026-05-12 07:59:00 -07:00
Michael Bolin
3dfd98bddd app-server: test empty workspace roots roundtrip 2026-05-12 07:59:00 -07:00
Michael Bolin
f4ffc1e89a app-server: test persisted active permission profile 2026-05-12 07:59:00 -07:00
Michael Bolin
ab1d2082e6 permissions: move workspace roots onto thread state 2026-05-12 07:59:00 -07:00
Michael Bolin
429366ef78 core: box multi-agent handler futures 2026-05-12 07:58:59 -07:00
Michael Bolin
4cc4fa08e5 merge commit for archive created by Sapling 2026-05-12 07:33:51 -07:00
Michael Bolin
ff56196ba2 docs: clarify permissions thread lifecycle API 2026-05-12 07:33:21 -07:00
Michael Bolin
6c923cb17d app-server: test empty workspace roots roundtrip 2026-05-12 07:33:21 -07:00
Michael Bolin
7a4660d55d app-server: test persisted active permission profile 2026-05-12 07:33:21 -07:00
Michael Bolin
2564da6d25 permissions: move workspace roots onto thread state 2026-05-12 07:33:21 -07:00
jif-oai
89c8e9a4db fix: uv lock (#22323)
Update the lock of UV
2026-05-12 16:24:54 +02:00
Michael Bolin
6d961371c4 Merge 61137fca2e into sapling-pr-archive-bolinfest 2026-05-12 07:08:26 -07:00
Michael Bolin
61137fca2e docs: clarify permissions thread lifecycle API 2026-05-12 07:03:03 -07:00
Michael Bolin
96561095c9 app-server: test empty workspace roots roundtrip 2026-05-12 07:03:03 -07:00
Michael Bolin
889e3adc27 app-server: test persisted active permission profile 2026-05-12 07:02:19 -07:00
Michael Bolin
f563597697 permissions: move workspace roots onto thread state 2026-05-12 07:01:59 -07:00
Michael Bolin
5461a95313 Merge 1915975876 into sapling-pr-archive-bolinfest 2026-05-12 06:51:31 -07:00
Michael Bolin
c4cb898172 core: box multi-agent handler futures 2026-05-12 06:51:09 -07:00
Michael Bolin
1915975876 permissions: move workspace roots onto thread state 2026-05-12 06:51:09 -07:00
Felipe Coury
95b332c820 feat(tui): add ambient terminal pets (#21206)
## Why

The Codex App has animated pets, but the TUI had no equivalent ambient
companion surface. This brings that experience into terminal Codex while
keeping the main chat flow usable: the pet should feel present, but it
cannot cover transcript text, composer input, approvals, or picker
content.

The feature also needs to be terminal-aware. Different terminals support
different image protocols, tmux can interfere with image rendering, and
some users will want pets disabled entirely or anchored differently
depending on their layout.

<table>
<tr><td>
<img width="4110" height="2584" alt="CleanShot 2026-05-05 at 12 41
45@2x"
src="https://github.com/user-attachments/assets/68a1fcbc-2104-48d6-b834-69c6aaa95cdf"
/>
<p align="center">macOS - Ghostty, iTerm2 and WezTerm with Custom
Pet</p>
</td></tr>
<tr><td>
![Uploading CleanShot 2026-05-10 at 20.28.30.png…]()
<p align="center">Windows Terminal</p>
</td></tr>
<tr><td>
<img width="3902" height="2752" alt="CleanShot 2026-05-05 at 12 39
02@2x"
src="https://github.com/user-attachments/assets/300e2931-6b00-467e-91cb-ab8e28470500"
/>
<p align="center">Linux - WezTerm and Ghostty</p>
</td></tr>
</table>

## What Changed

- Add a TUI ambient pet renderer in `codex-rs/tui/src/pets/`.
- Port the app-style pet animation states so the sprite changes with
task status, waiting-for-input states, review/ready states, and
failures.
- Add `/pets` selection UI with a preview pane, loading state, built-in
pet choices, and a first-row `Disable terminal pets` option.
- Download built-in pet spritesheets on demand from the same public CDN
path already used by Android, under
`https://persistent.oaistatic.com/codex/pets/v1/...`, and cache them
locally under `~/.codex/cache/tui-pets/`.
- Keep custom pets local.
- Add config support for pet selection, disabling pets, and choosing
whether the pet follows the composer bottom or anchors to the terminal
bottom.
- Reserve layout space around the pet so transcript wrapping, live
responses, and composer input do not render underneath the sprite.
- Gate image rendering by terminal capability, disable image pets under
tmux, and support both Kitty Graphics and SIXEL terminals.
- Add redraw cleanup for terminal image artifacts, including sixel cell
clearing.

## Current Scope

- This is an initial TUI version of ambient pets, not full App parity.
- It focuses on ambient sprite rendering, `/pets` selection, custom
pets, terminal capability gating, and on-demand CDN-backed built-in
assets.
- The ambient text overlay is currently disabled, so the TUI renders the
pet sprite without extra status text beside it.

## How to Test

1. Start Codex TUI in a terminal with image support.
2. Run `/pets`.
3. Confirm the picker shows built-in pets plus custom pets, and the
first item is `Disable terminal pets`.
4. On a fresh `~/.codex/cache/tui-pets/`, move onto a built-in pet and
confirm the first preview downloads the spritesheet from the shared
Codex pets CDN and renders successfully.
5. Move through the pet list and confirm subsequent built-in previews
use the local cache.
6. Select a pet, then send and receive messages. Confirm transcript and
composer text wrap before the pet instead of rendering underneath the
sprite.
7. Change the pet anchor setting and confirm the pet can either follow
the composer bottom or sit at the terminal bottom.
8. Return to `/pets`, choose `Disable terminal pets`, and confirm the
sprite disappears cleanly.

Targeted tests:
- `cargo test -p codex-tui ambient_pet_`
- `cargo test -p codex-tui
resize_reflow_wraps_transcript_early_when_pet_is_enabled`
- `cargo insta pending-snapshots`
2026-05-12 10:43:17 -03:00
cassirer-openai
cb55b769d1 [rollout-trace] Add x-codex-inference-call-id header to inference calls. (#22311)
This allows us to attach call logs to inference requests in traces.
2026-05-12 05:55:11 -07:00
jif-oai
d996f5366f feat: guardian as an extension (contributors part) (#22216)
Part 1 of guardian as extension. This bind all the logic to spawn
another agent from an extension and it adds `ThreadId` in the start
thread collaborator
2026-05-12 14:41:45 +02:00
Michael Bolin
c6975ba8f2 merge commit for archive created by Sapling 2026-05-12 01:26:15 -07:00
Michael Bolin
a35e4950a1 permissions: move workspace roots onto thread state 2026-05-12 01:25:56 -07:00
Michael Bolin
dda4a112b3 Merge 4d132d961b into sapling-pr-archive-bolinfest 2026-05-12 01:14:29 -07:00
Michael Bolin
4d132d961b permissions: move workspace roots onto thread state 2026-05-12 01:14:21 -07:00
Michael Bolin
3005eaa473 merge commit for archive created by Sapling 2026-05-12 01:01:37 -07:00
Michael Bolin
3de8c8050a permissions: move workspace roots onto thread state 2026-05-12 01:01:23 -07:00
xl-openai
5b1a4c2fa7 feat: Normalize remote plugin summary identities. (#22265)
Makes plugin summaries use config-style plugin@marketplace IDs while
exposing backend remote IDs separately as remotePluginId.

Also fix the consistency issue of REMOTE_SHARED_WITH_ME_MARKETPLACE_NAME
2026-05-12 00:58:37 -07:00
Michael Bolin
a65d01cc43 merge commit for archive created by Sapling 2026-05-12 00:44:58 -07:00
Michael Bolin
c09cd6bb80 permissions: move workspace roots onto thread state 2026-05-12 00:44:50 -07:00
Michael Bolin
cec71ec922 merge commit for archive created by Sapling 2026-05-12 00:27:24 -07:00
Michael Bolin
1c8ec84334 permissions: move workspace roots onto thread state 2026-05-12 00:27:01 -07:00
Michael Bolin
6c2578fcd4 core: box multi-agent handler futures 2026-05-12 00:26:54 -07:00
Michael Bolin
d3272bf2cc Merge 64831d864e into sapling-pr-archive-bolinfest 2026-05-11 23:49:51 -07:00
Michael Bolin
64831d864e permissions: move workspace roots onto thread state 2026-05-11 23:34:10 -07:00
Michael Bolin
44831f4b8a core: box multi-agent handler futures 2026-05-11 23:25:32 -07:00
Michael Bolin
17caa3806c merge commit for archive created by Sapling 2026-05-11 23:15:16 -07:00
Michael Bolin
1d595488ff Move workspace roots onto thread/session state and stop using active permission profile modifications as an overlay for writable roots. Existing app-server threads no longer accept arbitrary PermissionProfile or SandboxPolicy replacements; permissions requests select a server-known profile id and apply the resolved server-owned profile together with active profile metadata. Workspace roots can be updated independently, and SandboxPolicy::WorkspaceWrite no longer stores its own writable_roots. 2026-05-11 23:15:10 -07:00
viyatb-oai
46f30d0282 feat(sandbox): add Windows deny-read parity (#18202)
## Why

The split filesystem policy stack already supports exact and glob
`access = none` read restrictions on macOS and Linux. Windows still
needed subprocess handling for those deny-read policies without claiming
enforcement from a backend that cannot provide it.

## Key finding

The unelevated restricted-token backend cannot safely enforce deny-read
overlays. Its `WRITE_RESTRICTED` token model is authoritative for write
checks, not read denials, so this PR intentionally fails that backend
closed when deny-read overrides are present instead of claiming
unsupported enforcement.

## What changed

This PR adds the Windows deny-read enforcement layer and makes the
backend split explicit:

- Resolves Windows deny-read filesystem policy entries into concrete ACL
targets.
- Preserves exact missing paths so they can be materialized and denied
before an enforceable sandboxed process starts.
- Snapshot-expands existing glob matches into ACL targets for Windows
subprocess enforcement.
- Honors `glob_scan_max_depth` when expanding Windows deny-read globs.
- Plans both the configured lexical path and the canonical target for
existing paths so reparse-point aliases are covered.
- Threads deny-read overrides through the elevated/logon-user Windows
sandbox backend and unified exec.
- Applies elevated deny-read ACLs synchronously before command launch
rather than delegating them to the background read-grant helper.
- Reconciles persistent deny-read ACEs per sandbox principal so policy
changes do not leave stale deny-read ACLs behind.
- Fails closed on the unelevated restricted-token backend when deny-read
overrides are present, because its `WRITE_RESTRICTED` token model is not
authoritative for read denials.

## Landed prerequisites

These prerequisite PRs are already on `main`:

1. #15979 `feat(permissions): add glob deny-read policy support`
2. #18096 `feat(sandbox): add glob deny-read platform enforcement`
3. #17740 `feat(config): support managed deny-read requirements`

This PR targets `main` directly and contains only the Windows deny-read
enforcement layer.

## Implementation notes

- Exact deny-read paths remain enforceable on the elevated path even
when they do not exist yet: Windows materializes the missing path before
applying the deny ACE, so the sandboxed command cannot create and read
it during the same run.
- Existing exact deny paths are preserved lexically until the ACL
planner, which then adds the canonical target as a second ACL target
when needed. That keeps both the configured alias and the resolved
object covered.
- Windows ACLs do not consume Codex glob syntax directly, so glob
deny-read entries are expanded to the concrete matches that exist before
process launch.
- Glob traversal deduplicates directory visits within each pattern walk
to avoid cycles, without collapsing distinct lexical roots that happen
to resolve to the same target.
- Persistent deny-read ACL state is keyed by sandbox principal SID, so
cleanup only removes ACEs owned by the same backend principal.
- Deny-read ACEs are fail-closed on the elevated path: setup aborts if
mandatory deny-read ACL application fails.
- Unelevated restricted-token sessions reject deny-read overrides early
instead of running with a silently unenforceable read policy.

## Verification

- `cargo test -p codex-core
windows_restricted_token_rejects_unreadable_split_carveouts`
- `just fmt`
- `just fix -p codex-core`
- `just fix -p codex-windows-sandbox`
- GitHub Actions rerun is in progress on the pushed head.

---------

Co-authored-by: Codex <noreply@openai.com>
2026-05-11 23:04:28 -07:00
Michael Bolin
384be7c401 merge commit for archive created by Sapling 2026-05-11 23:00:17 -07:00
Michael Bolin
f6eacf7452 Move workspace roots onto thread/session state and stop using active permission profile modifications as an overlay for writable roots. Existing app-server threads no longer accept arbitrary PermissionProfile or SandboxPolicy replacements; permissions requests select a server-known profile id and apply the resolved server-owned profile together with active profile metadata. Workspace roots can be updated independently, and SandboxPolicy::WorkspaceWrite no longer stores its own writable_roots. 2026-05-11 23:00:07 -07:00
Michael Bolin
0e1c85378d merge commit for archive created by Sapling 2026-05-11 22:45:11 -07:00