Commit Graph
4854 Commits
Author SHA1 Message Date
jif-oaiandCodex 1c8bd07c9c chore: remove grep_files handler (#15775)
# External (non-OpenAI) Pull Request Requirements

Before opening this Pull Request, please read the dedicated
"Contributing" markdown file or your PR may be closed:
https://github.com/openai/codex/blob/main/docs/contributing.md

If your PR conforms to our contribution guidelines, replace this text
with a detailed and high quality description of your changes.

Include a link to a bug report or enhancement request.

---------

Co-authored-by: Codex <noreply@openai.com>
2026-03-25 14:43:27 -07:00
Fouad Matinandcolby-oai 1dc26021c8 fix(core): default approval behavior for mcp missing annotations (#15519)
- Changed `requires_mcp_tool_approval` to apply MCP spec defaults when
annotations are missing.
- Unannotated tools now default to:
  - `readOnlyHint = false`
  - `destructiveHint = true`
  - `openWorldHint = true`
- This means unannotated MCP tools now go through approval/ARC
monitoring instead of silently bypassing it.
- Explicitly read-only tools still skip approval unless they are also
explicitly marked destructive.

**Previous behavior**
Failed open for missing annotations, which was unsafe for custom MCP
tools that omitted or forgot annotations.

---------

Co-authored-by: colby-oai <228809017+colby-oai@users.noreply.github.com>
2026-03-25 14:43:27 -07:00
jif-oai 041747bad1 chore: tty metric (#15766) 2026-03-25 14:43:27 -07:00
xl-openai ef66082718 Update plugin creator skill. (#15734)
Add support for home-local plugin + fix policy.
2026-03-25 14:43:27 -07:00
Matthew Zeng b78973026c [plugins] Add a flag for tool search. (#15722)
- [x] Add a flag for tool search.
2026-03-25 14:43:27 -07:00
Eric Traut 56f9f8a304 Fix stale turn steering fallback in tui_app_server (#15714)
This PR adds code to recover from a narrow app-server timing race where
a follow-up can be sent after the previous turn has already ended but
before the TUI has observed that completion.

Instead of surfacing turn/steer failed: no active turn to steer, the
client now treats that as a stale active-turn cache and falls back to
starting a fresh turn, matching the intended submit behavior more
closely. This is similar to the strategy employed by other app server
clients (notably, the IDE extension and desktop app).

This race exists because the current app-server API makes the client
choose between two separate RPCs, turn/steer and turn/start, based on
its local view of whether a turn is still active. That view is
replicated from asynchronous notifications, so it can be stale for a
brief window. The server may already have ended the turn while the
client still believes it is in progress. Since the choice is made
client-side rather than atomically on the server, tui_app_server can
occasionally send turn/steer for a turn that no longer exists.
2026-03-25 14:43:27 -07:00
viyatb-oai 3e8e9262b8 fix: support split carveouts in windows restricted-token sandbox (#14172)
## Summary
- keep legacy Windows restricted-token sandboxing as the supported
baseline
- support the split-policy subset that restricted-token can enforce
directly today
- support full-disk read, the same writable root set as legacy
`WorkspaceWrite`, and extra read-only carveouts under those writable
roots via additional deny-write ACLs
- continue to fail closed for unsupported split-only shapes, including
explicit unreadable (`none`) carveouts, reopened writable descendants
under read-only carveouts, and writable root sets that do not match the
legacy workspace roots

## Example
Given a filesystem policy like:

```toml
":root" = "read"
":cwd" = "write"
"./docs" = "read"
```

the restricted-token backend can keep the workspace writable while
denying writes under `docs` by layering an extra deny-write carveout on
top of the legacy workspace-write roots.

A policy like:

```toml
"/workspace" = "write"
"/workspace/docs" = "read"
"/workspace/docs/tmp" = "write"
```

still fails closed, because the unelevated backend cannot reopen the
nested writable descendant safely.

## Stack
-> fix: support split carveouts in windows restricted-token sandbox
#14172
fix: support split carveouts in windows elevated sandbox #14568
2026-03-25 14:43:27 -07:00
Matthew Zeng 9f0fc103c7 [plugins] Flip on additional flags. (#15719)
- [x] Flip on additional flags.
2026-03-25 14:43:27 -07:00
Matthew Zeng b160ef6b12 [plugins] Flip the flags. (#15713)
- [x] Flip the `plugins` and `apps` flags.
2026-03-25 14:43:27 -07:00
Shaqayeq f3052a56c3 Fix stale quickstart integration assertion (#15677)
TL;DR: update the quickstart integration assertion to match the current
example output.

- replace the stale `Status:` expectation for
`01_quickstart_constructor` with `Server:`, `Items:`, and `Text:`
- keep the existing guard against `Server: unknown`
2026-03-25 14:43:27 -07:00
canvrno-oai d65ce48e47 TUI plugin menu cleanup - hide app ID (#15708)
- Hide App ID from plugin details page.
2026-03-25 14:43:26 -07:00
Matthew Zeng 6b867594fd [app-server] Add a method to override feature flags. (#15601)
- [x] Add a method to override feature flags globally and not just
thread level.
2026-03-25 14:43:26 -07:00
Charley CunninghamandCodex d2e6c0f84b [codex] Defer fork context injection until first turn (#15699)
## Summary
- remove the fork-startup `build_initial_context` injection
- keep the reconstructed `reference_context_item` as the fork baseline
until the first real turn
- update fork-history tests and the request snapshot, and add a
`TODO(ccunningham)` for remaining nondiffable initial-context inputs

## Why
Fork startup was appending current-session initial context immediately
after reconstructing the parent rollout, then the first real turn could
emit context updates again. That duplicated model-visible context in the
child rollout.

## Impact
Forked sessions now behave like resume for context seeding: startup
reconstructs history and preserves the prior baseline, and the first
real turn handles any current-session context emission.

---------

Co-authored-by: Codex <noreply@openai.com>
2026-03-25 14:43:26 -07:00
Ahmed Ibrahim 0e90b07b71 Extract rollout into its own crate (#15548) 2026-03-25 14:43:26 -07:00
148f89e786 Expand ~ in MDM workspace write roots (#15351)
## Summary
- Reuse the existing config path resolver for the macOS MDM managed
preferences layer so `writable_roots = ["~/code"]` expands the same way
as file-backed config
- keep the change scoped to the MDM branch in `config_loader`; the
current net diff is only `config_loader/mod.rs` plus focused regression
tests in `config_loader/tests.rs` and `config/service_tests.rs`
- research note: `resolve_relative_paths_in_config_toml(...)` is already
used in several existing configuration paths, including [CLI
overrides](https://github.com/openai/codex/blob/74fda242d3651f0a43ec8657bdbc7bde426dce0e/codex-rs/core/src/config_loader/mod.rs#L152-L163),
[file-backed managed
config](https://github.com/openai/codex/blob/74fda242d3651f0a43ec8657bdbc7bde426dce0e/codex-rs/core/src/config_loader/mod.rs#L274-L285),
[normal config-file
loading](https://github.com/openai/codex/blob/74fda242d3651f0a43ec8657bdbc7bde426dce0e/codex-rs/core/src/config_loader/mod.rs#L311-L331),
[project `.codex/config.toml`
loading](https://github.com/openai/codex/blob/74fda242d3651f0a43ec8657bdbc7bde426dce0e/codex-rs/core/src/config_loader/mod.rs#L863-L865),
and [role config
loading](https://github.com/openai/codex/blob/74fda242d3651f0a43ec8657bdbc7bde426dce0e/codex-rs/core/src/agent/role.rs#L105-L109)

## Validation
- `cargo fmt --all --check`
- `cargo test -p codex-core
managed_preferences_expand_home_directory_in_workspace_write_roots --
--nocapture`
- `cargo test -p codex-core
write_value_succeeds_when_managed_preferences_expand_home_directory_paths
-- --nocapture`

---------

Co-authored-by: Michael Bolin <mbolin@openai.com>
Co-authored-by: Michael Bolin <bolinfest@gmail.com>
2026-03-25 14:43:26 -07:00
canvrno-oai 3e0b2fe7ef Add legal link to TUI /plugin details (#15692)
- Adds language and "[learn
more](https://help.openai.com/en/articles/11487775-apps-in-chatgpt)"
link to plugin details pages.
-  Message is hidden when plugin is installed

<img width="1970" height="498" alt="image"
src="https://github.com/user-attachments/assets/f14330f7-661e-4860-8538-6dc9e8bbd90a"
/>
2026-03-25 14:43:26 -07:00
canvrno-oai ed5cf2503e Remove provenance filtering in $mentions for apps and skills from plugins (#15700)
- Removes provenance filtering in the mentions feature for apps and
skills that were installed as part of a plugin.
- All skills and apps for a plugin are mentionable with this change.
2026-03-25 14:43:26 -07:00
Michael Bolin 0fd54eb9c2 fix: keep rmcp-client env vars as OsString (#15363)
## Why

This is a follow-up to #15360. That change fixed the `arg0` helper
setup, but `rmcp-client` still coerced stdio transport environment
values into UTF-8 `String`s before program resolution and process spawn.
If `PATH` or another inherited environment value contains non-UTF-8
bytes, that loses fidelity before it reaches `which` and `Command`.

## What changed

- change `create_env_for_mcp_server()` to return `HashMap<OsString,
OsString>` and read inherited values with `std::env::var_os()`
- change `TransportRecipe::Stdio.env`, `RmcpClient::new_stdio_client()`,
and `program_resolver::resolve()` to keep stdio transport env values in
`OsString` form within `rmcp-client`
- keep the `codex-core` config boundary stringly, but convert configured
stdio env values to `OsString` once when constructing the transport
- update the rmcp-client stdio test fixtures and callers to use
`OsString` env maps
- add a Unix regression test that verifies `create_env_for_mcp_server()`
preserves a non-UTF-8 `PATH`

## How to verify

- `cargo test -p codex-rmcp-client`
- `cargo test -p codex-core mcp_connection_manager`
- `just argument-comment-lint`

Targeted coverage in this change includes
`utils::tests::create_env_preserves_path_when_it_is_not_utf8`, while the
updated stdio transport path is exercised by the existing rmcp-client
tests that construct `RmcpClient::new_stdio_client()`.
2026-03-25 14:43:26 -07:00
Ruslan Nigmatullin 407dbbd1cc app-server: Return codex home in initialize response (#15689)
This allows clients to get enough information to interact with the codex
skills/configuration/etc.
2026-03-25 14:43:26 -07:00
canvrno-oai ba3b48b2da Use delayed shimmer for plugin loading headers in tui and tui_app_server (#15674)
- Add a small delayed loading header for plugin list/detail loading
messages in the TUI. Keep existing text for the first 1s, then show
shimmer on the loading line.
- Apply the same behavior in both tui and tui_app_server.


https://github.com/user-attachments/assets/71dd35e4-7e3b-4e7b-867a-3c13dc395d3a
2026-03-25 14:43:25 -07:00
Ruslan Nigmatullin a6b0207a39 app-server: add filesystem watch support (#14533)
### Summary
Add the v2 app-server filesystem watch RPCs and notifications, wire them
through the message processor, and implement connection-scoped watches
with notify-backed change delivery. This also updates the schema
fixtures, app-server documentation, and the v2 integration coverage for
watch and unwatch behavior.

This allows clients to efficiently watch for filesystem updates, e.g. to
react on branch changes.

### Testing
- exercise watch lifecycles for directory changes, atomic file
replacement, missing-file targets, and unwatch cleanup
2026-03-25 14:43:25 -07:00
Ahmed IbrahimandCodex dcc60acecd Move string truncation helpers into codex-utils-string (#15572)
- move the shared byte-based middle truncation logic from `core` into
`codex-utils-string`
- keep token-specific truncation in `codex-core` so rollout can reuse
the shared helper in the next stacked PR

---------

Co-authored-by: Codex <noreply@openai.com>
2026-03-25 14:43:25 -07:00
pakrym-oai 217fb389f6 Drop sandbox_permissions from sandbox exec requests (#15665)
## Summary
- drop `sandbox_permissions` from the sandboxing `ExecOptions` and
`ExecRequest` adapter types
- remove the now-unused plumbing from shell, unified exec, JS REPL, and
apply-patch runtime call sites
- default reconstructed `ExecParams` to `SandboxPermissions::UseDefault`
where the lower-level API still requires the field

## Testing
- `just fmt`
- `just argument-comment-lint`
- `cargo test -p codex-core` (still running locally; first failures
observed in `suite::cli_stream::responses_mode_stream_cli`,
`suite::cli_stream::responses_mode_stream_cli_supports_openai_base_url_config_override`,
and
`suite::cli_stream::responses_mode_stream_cli_supports_openai_base_url_env_fallback`)
2026-03-25 14:43:25 -07:00
Roy Han de1d5cc9ba test fix 2026-03-25 14:43:25 -07:00
Roy Han 08a8c84453 event rename and resume support 2026-03-25 14:43:13 -07:00
Roy Han 7eebd0281f rebase 2026-03-25 14:29:02 -07:00
Roy Han 0c4e73618a test bug 2026-03-25 14:28:53 -07:00
Roy Han 505e703c32 restructure history and source 2026-03-25 14:28:48 -07:00
Matthew Zeng cfc78edb6e [plugins] Additional gating for tool suggest and apps. (#15573)
- [x] Additional gating for tool suggest and apps.
2026-03-25 14:25:20 -07:00
canvrno-oai 76d62a34c8 Suppress plugin-install MCP OAuth URL console spam (#15666)
Switch plugin-install background MCP OAuth to a silent login path so the
raw authorization URL is no longer printed in normal success cases.
OAuth behavior is otherwise unchanged, with fallback URL output via
stderr still shown only if browser launch fails.

Before:

https://github.com/user-attachments/assets/4bf387af-afa8-4b83-bcd6-4ca6b55da8db
2026-03-25 14:25:20 -07:00
canvrno-oai 515f6e4f51 Tweak /plugin menu wording (#15676)
- Updated `/plugin` UI messaging for clearer wording.
- Synced the same copy changes across `tui` and `tui_app_server`.
2026-03-25 14:25:20 -07:00
Roy Han 3a2d6eac2f rebase 2026-03-25 14:22:21 -07:00
rhan-oai f10cf5c9fa Merge branch 'rhan/oob-turn-metadata' into rhan/oob-queue 2026-03-25 13:52:56 -07:00
Roy Han c36438ca59 is first turn 2026-03-25 12:06:07 -07:00
Roy Han ab7db1f2bf schema update 2026-03-24 19:08:45 -07:00
Roy Han 324d7c6871 lint 2026-03-24 18:33:48 -07:00
Roy Han 3766590bee stale test 2026-03-24 18:28:46 -07:00
Roy Han 1d5408dd40 fmt 2026-03-24 17:47:38 -07:00
Roy Han ade9c6fc5b logic cleanup 2026-03-24 17:35:46 -07:00
Roy Han 7f10658d93 steer cleanup 2026-03-24 17:31:59 -07:00
Roy Han ae06d729fa remove turn event type 2026-03-24 17:31:17 -07:00
Roy Han b8a6b03e31 protocol rename 2026-03-24 17:31:17 -07:00
Roy Han cad23c805a renaming 2026-03-24 17:31:17 -07:00
Roy Han 5fefa5e9dc update schema 2026-03-24 17:30:24 -07:00
Roy Han 694ff84ec1 event definitions 2026-03-24 17:28:06 -07:00
Roy Han 8a6be13ae6 define events and support queueing 2026-03-24 17:26:15 -07:00
Roy Han 07c0d34fa4 user message metadata 2026-03-24 17:24:50 -07:00
Roy Han 7141347e82 variant tightening 2026-03-24 15:58:09 -07:00
Roy Han 039a64053c Revert "rebase"
This reverts commit 9ad5c1386f, reversing
changes made to 4b9e6f4383.
2026-03-24 15:21:52 -07:00
Roy Han 9ad5c1386f rebase 2026-03-24 15:16:50 -07:00