Commit Graph

15342 Commits

Author SHA1 Message Date
Michael Bolin
3d9af7a5b5 Merge 1f12d07fd1 into sapling-pr-archive-bolinfest 2026-05-12 16:51:01 -07:00
Michael Bolin
1f12d07fd1 docs: clarify permissions thread lifecycle API 2026-05-12 16:50:48 -07:00
Michael Bolin
9d5c8bfd88 app-server: test empty workspace roots roundtrip 2026-05-12 16:50:48 -07:00
Michael Bolin
9f75b476b1 app-server: test persisted active permission profile 2026-05-12 16:50:48 -07:00
Michael Bolin
41199009ea permissions: move workspace roots onto thread state 2026-05-12 16:50:48 -07:00
Michael Bolin
1b233d3714 core: box multi-agent handler futures 2026-05-12 16:50:48 -07:00
Anton Panasenko
ac466c0dbd feat(exec-server): use protobuf relay frames (#22343)
## Why

Remote exec-server now needs one executor websocket to serve multiple
harness JSON-RPC sessions. Rendezvous routes by `stream_id`, and the
exec-server side needs to use the same stable relay frame contract
instead of a hand-rolled JSON shape.

The relay protocol also needs to make ownership boundaries clear:
harness and executor endpoints own sequencing, acks, retries, duplicate
suppression, segmentation, and reassembly; rendezvous only routes
frames.

## What Changed

- Add the checked-in `codex.exec_server.relay.v1.RelayMessageFrame`
proto plus generated prost bindings for `codex-exec-server`.
- Encode remote harness/executor relay traffic as binary protobuf
websocket frames while keeping local websocket JSON-RPC unchanged.
- Demux executor-side relay streams into independent
`ConnectionProcessor` sessions keyed by `stream_id`.
- Add a programmatic `RemoteExecutorConfig::with_bearer_token(...)`
constructor for non-CLI callers and integration tests.
- Add an integration test that starts the remote executor against a fake
registry/rendezvous websocket and verifies two virtual streams share one
executor websocket without cross-talk, including per-stream reset
behavior.
- Document the remote relay envelope, sequence ranges, `ack`/`ack_bits`,
and endpoint responsibilities in `exec-server/README.md`.

## Verification

- `cargo test -p codex-exec-server --test relay
multiplexed_remote_executor_routes_independent_virtual_streams --
--exact`
- `cargo test -p codex-exec-server --test relay`
- `cargo test -p codex-exec-server` passed outside the sandbox. The
sandboxed run hit macOS `sandbox-exec: sandbox_apply: Operation not
permitted` in filesystem sandbox tests.
2026-05-12 16:50:45 -07:00
Felipe Coury
6dc3b3d7c8 test(tui): relax configured pet load timeout (#22392)
## Why

Windows CI has been timing out in
`configured_pet_load_is_deferred_until_after_construction` while waiting
for the deferred configured-pet load event.

The test still needs to prove construction returns before the pet image
is available, but the background load slices the built-in pet
spritesheet into frame cache files. That work can exceed the old 2
second deadline on slower or more contended CI machines.

## What Changed

- Increased the test wait for `ConfiguredPetLoaded` from 2 seconds to 30
seconds.
- Kept the post-construction assertion intact so the test still verifies
that the pet is not loaded synchronously during `ChatWidget`
construction.

## How to Test

Targeted tests:
- `cargo test -p codex-tui
configured_pet_load_is_deferred_until_after_construction`
- `just argument-comment-lint`

Additional check:
- `cargo test -p codex-tui` was run, but the broader crate suite did not
complete successfully due to unrelated existing failures:
-
`status::tests::status_permissions_full_disk_managed_without_network_is_external_sandbox`
-
`status::tests::status_permissions_full_disk_managed_with_network_is_danger_full_access`
- later abort in
`tests::fork_last_filters_latest_session_by_cwd_unless_show_all` from
stack overflow
2026-05-12 16:50:35 -07:00
pakrym-oai
960d42ddae code-mode: carry nested tool kind through runtime (#22377)
## Why

Code mode only used nested spec lookup at execution time to rediscover
whether a nested tool should be invoked as a function tool or a freeform
tool.

That information is already present in the enabled tool metadata that
code mode builds to expose `tools.*` and `ALL_TOOLS`, so re-looking it
up from the router was redundant and kept execution coupled to a
separate spec lookup path.

## What Changed

- thread `CodeModeToolKind` through the code-mode runtime `ToolCall`
event and `CodeModeNestedToolCall`
- emit the nested tool kind directly from the V8 callback using the
already-enabled tool metadata
- build nested tool payloads from the propagated kind instead of calling
`find_spec`
- remove the now-unused `find_spec` plumbing from the router and
parallel runtime helpers
- add unit coverage for function vs freeform payload shaping and update
affected router tests

## Testing

- `cargo test -p codex-code-mode`
- `cargo test -p codex-core code_mode::tests`
- `cargo test -p codex-core
extension_tool_bundles_are_model_visible_and_dispatchable`
- `cargo test -p codex-core
model_visible_specs_filter_deferred_dynamic_tools`
2026-05-12 23:34:37 +00:00
Dylan Hurd
8123bddb16 chore(config) include_collaboration_mode_instructions (#22383)
## Summary
Adds include_collaboration_mode_instructions, which is a config
equivalent to include_permissions_instructions for collaboration modes.
Desired for situations where we want to disable this instruction from
entering the context

## Testing
- [x] Added unit test
2026-05-12 15:50:10 -07:00
Michael Bolin
c9a38fad25 merge commit for archive created by Sapling 2026-05-12 15:45:03 -07:00
pakrym-oai
862b2122ee tools: remove is_mutating dispatch gating (#22382)
## Why

Tool dispatch had two serialization mechanisms:

- `supports_parallel_tool_calls` decides whether a tool participates in
the shared parallel-execution lock.
- `is_mutating` separately gated some calls inside dispatch.

That second hook no longer carried its weight. The remaining
parallel-support flag is already the per-tool concurrency policy, so
keeping a second mutating gate made dispatch harder to follow and left
behind extra session plumbing that only existed for that path.

## What changed

- Removed `is_mutating` from tool handlers and deleted the
`tool_call_gate` path that existed only to support it.
- Simplified dispatch and routing to rely on the existing per-tool
`supports_parallel_tool_calls` boolean.
- Dropped the now-unused handler overrides and related session/test
scaffolding.
- Kept the router/parallel tests focused on the surviving per-tool
behavior.
- Removed the unused `codex-utils-readiness` dependency from
`codex-core` as a follow-up fix for `cargo shear`.

## Testing

- `cargo test -p codex-core
parallel_support_does_not_match_namespaced_local_tool_names`
- `cargo test -p codex-core mcp_parallel_support_uses_handler_data`
- `cargo test -p codex-core
tools_without_handlers_do_not_support_parallel`
2026-05-12 22:44:54 +00:00
Michael Bolin
01f7453617 docs: clarify permissions thread lifecycle API 2026-05-12 15:40:08 -07:00
Michael Bolin
c7e1e99166 app-server: test empty workspace roots roundtrip 2026-05-12 15:40:08 -07:00
Michael Bolin
ecf9d1b6ec app-server: test persisted active permission profile 2026-05-12 15:40:08 -07:00
Michael Bolin
0e434f4d02 permissions: move workspace roots onto thread state 2026-05-12 15:40:08 -07:00
Michael Bolin
522e00e341 core: box multi-agent handler futures 2026-05-12 15:40:08 -07:00
Chris Bookholt
5e3ee5eddf [codex] Tighten unified exec sandbox setup (#22207)
## Summary
- tighten unified exec sandbox initialization
- preserve the requested process workdir independently from sandbox
setup
- add regression coverage for the updated invariant

## Validation
- Ran `/tmp/cargo-tools/bin/just fmt`.
- Ran the targeted `codex-core` regression test successfully.
- Ran `cargo test -p codex-core`; it did not complete cleanly because
unrelated existing agent/config-loader tests failed and the run later
aborted on a stack overflow in
`tools::handlers::multi_agents::tests::tool_handlers_cascade_close_and_resume_and_keep_explicitly_closed_subtrees_closed`.

Co-authored-by: Codex <noreply@openai.com>
2026-05-12 08:41:00 -07:00
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