Commit Graph
15586 Commits
Author SHA1 Message Date
Michael Bolin 9006cc3073 merge commit for archive created by Sapling 2026-05-14 11:06:44 -07:00
Michael Bolin 5cba401114 tui/exec: show effective workspace roots in summaries 2026-05-14 10:59:45 -07:00
Michael Bolin 247bbdaf05 app-server: use permission ids and runtime workspace roots 2026-05-14 10:59:10 -07:00
Michael Bolin 2fbcb8554e permissions: support workspace roots in profiles 2026-05-14 10:58:07 -07:00
Michael Bolin afbea8ab82 Merge 5a5197bc0e into sapling-pr-archive-bolinfest 2026-05-14 10:24:29 -07:00
Michael Bolin 5a5197bc0e tui/exec: show effective workspace roots in summaries 2026-05-14 10:24:07 -07:00
Michael Bolin 8429c8955a app-server: use permission ids and runtime workspace roots 2026-05-14 10:24:07 -07:00
Michael Bolin 9ccddb30a7 permissions: support workspace roots in profiles 2026-05-14 10:24:07 -07:00
Michael Bolin f623d41222 Merge 4c8c508620 into sapling-pr-archive-bolinfest 2026-05-14 10:11:20 -07:00
Michael Bolin 96d85dc984 merge commit for archive created by Sapling 2026-05-14 10:11:05 -07:00
Michael Bolin 4c8c508620 tui/exec: show effective workspace roots in summaries 2026-05-14 10:10:39 -07:00
Michael Bolin 572a5c3ff7 app-server: use permission ids and runtime workspace roots 2026-05-14 10:10:39 -07:00
Michael Bolin d9c6a91058 permissions: support workspace roots in profiles 2026-05-14 10:09:50 -07:00
Michael Bolin 9ea1c57baa Merge f298b2d285 into sapling-pr-archive-bolinfest 2026-05-14 09:46:07 -07:00
Michael Bolin ccf09df586 merge commit for archive created by Sapling 2026-05-14 09:45:54 -07:00
Michael Bolin f298b2d285 tui/exec: show effective workspace roots in summaries 2026-05-14 09:45:35 -07:00
Michael Bolin cd12cc2ab9 app-server: use permission ids and runtime workspace roots 2026-05-14 09:45:35 -07:00
Michael Bolin 1158c52e8b Merge f86711efa8 into sapling-pr-archive-bolinfest 2026-05-14 09:41:32 -07:00
Michael Bolin c301e69150 Merge 5b6acbb6b5 into sapling-pr-archive-bolinfest 2026-05-14 09:41:15 -07:00
Michael Bolin deac94bc66 merge commit for archive created by Sapling 2026-05-14 09:40:56 -07:00
Michael Bolin f86711efa8 tui/exec: show effective workspace roots in summaries 2026-05-14 09:40:33 -07:00
Michael Bolin 5b6acbb6b5 app-server: use permission ids and runtime workspace roots 2026-05-14 09:40:33 -07:00
Michael Bolin 6803c35f38 permissions: support workspace roots in profiles 2026-05-14 09:40:32 -07:00
Michael Bolin 3a2406cc24 Merge a204e78e03 into sapling-pr-archive-bolinfest 2026-05-14 09:36:42 -07:00
Michael Bolin c1cb6422e4 Merge 86bb110674 into sapling-pr-archive-bolinfest 2026-05-14 09:36:16 -07:00
Michael Bolin a204e78e03 tui/exec: show effective workspace roots in summaries 2026-05-14 09:35:22 -07:00
Michael Bolin 86bb110674 app-server: use permission ids and runtime workspace roots 2026-05-14 09:35:22 -07:00
Michael Bolin b1a17b6185 Merge 559afb6a59 into sapling-pr-archive-bolinfest 2026-05-14 09:34:42 -07:00
Michael Bolin 559afb6a59 permissions: support workspace roots in profiles 2026-05-14 09:34:27 -07:00
Michael Bolin dd6d5ba02e merge commit for archive created by Sapling 2026-05-14 09:09:50 -07:00
Michael Bolin 99a5efaa3c permissions: support workspace roots in profiles 2026-05-14 09:08:55 -07:00
Michael Bolin dd27a756bb merge commit for archive created by Sapling 2026-05-14 09:00:00 -07:00
Michael Bolin 04fffb495e tui/exec: show effective workspace roots in summaries 2026-05-14 08:59:08 -07:00
Michael Bolin f38a05be73 app-server: use permission ids and runtime workspace roots 2026-05-14 08:59:08 -07:00
Michael Bolin d8553d10d2 permissions: support workspace roots in profiles 2026-05-14 08:46:50 -07:00
Michael Bolin 01d93fd9fc permissions: canonicalize workspace_roots and danger-full-access names (#22624)
## Why

This is a small precursor to the larger permissions-migration work. Both
the comparison stack in
[#22401](https://github.com/openai/codex/pull/22401) /
[#22402](https://github.com/openai/codex/pull/22402) and the alternate
stack in [#22610](https://github.com/openai/codex/pull/22610) /
[#22611](https://github.com/openai/codex/pull/22611) /
[#22612](https://github.com/openai/codex/pull/22612) are easier to
review if the terminology is already settled underneath them.

Because `:project_roots` and `:danger-no-sandbox` have not shipped as
stable user-facing surface area, carrying them forward as aliases would
just add more migration logic to the later stacks. This PR removes that
ambiguity now so the follow-on work can rely on one spelling for each
built-in concept.

## What Changed

- renamed the config-facing special filesystem key from `:project_roots`
to `:workspace_roots`
- dropped unpublished `:project_roots` parsing support in
`core/src/config/permissions.rs`, so new config only recognizes
`:workspace_roots`
- renamed the built-in full-access permission profile id from
`:danger-no-sandbox` to `:danger-full-access`
- dropped unpublished `:danger-no-sandbox` support entirely, including
the old active-profile canonicalization path, and added explicit
rejection coverage for the legacy id
- introduced shared built-in permission-profile id constants in
`codex-rs/protocol/src/models.rs`
- updated `core`, `app-server`, and `tui` call sites that special-case
built-in profiles to use the shared constants and canonical ids
- updated tests and the Linux sandbox README to use `:workspace_roots` /
`:danger-full-access`

## Verification

I focused verification on the three places this rename can regress:
config parsing, active-profile identity surfaced back out of `core`, and
user/server call sites that special-case built-in profiles.

Targeted checks:

-
`config::tests::default_permissions_can_select_builtin_profile_without_permissions_table`
-
`config::tests::default_permissions_read_only_applies_additional_writable_roots_as_modifications`
-
`config::tests::default_permissions_can_select_builtin_full_access_profile`
- `config::tests::legacy_danger_no_sandbox_is_rejected`
- `workspace_root` filtered `codex-core` tests
-
`request_processors::thread_processor::thread_processor_tests::thread_processor_behavior_tests::requested_permissions_trust_project_uses_permission_profile_intent`
-
`suite::v2::turn_start::turn_start_rejects_invalid_permission_selection_before_starting_turn`
- `status::tests::status_snapshot_shows_auto_review_permissions`
-
`status::tests::status_permissions_full_disk_managed_with_network_is_danger_full_access`
-
`app_server_session::tests::embedded_turn_permissions_use_active_profile_selection`
2026-05-14 08:45:54 -07:00
jif-oai 12bfb57139 Fix turn extension data task plumbing (#22646)
## Summary
- carry the per-turn extension data through RunningTask so abort
handling can rebuild SessionTaskContext
- update stale test ExtensionData::new() callsites to pass the turn id

## Testing
- Not run after PR branch creation; CI will cover.
2026-05-14 16:00:06 +02:00
Chris Bookholt 9ea38136b0 [codex] treat PowerShell stop-parsing forms as unsupported (#22643)
## Summary
- Treat PowerShell stop-parsing token forms as unsupported in the
AST-backed command flattener.
- Add focused regressions at the parser layer and Windows command-safety
layer.

## Why
The command-safety parser lowers PowerShell AST elements into argv-like
words. Stop-parsing syntax preserves a native-command argument shape
that this lowering does not model, so these forms should stay on the
conservative unsupported path.

## Validation
- `cargo fmt --manifest-path codex-rs/Cargo.toml --all --check`
- `cargo test --manifest-path codex-rs/Cargo.toml -p
codex-shell-command`
2026-05-14 06:28:34 -07:00
jif-oaiandCodex deedf3b2c4 feat: add layered --profile-v2 config files (#17141)
## Why

`--profile-v2 <name>` gives launchers and runtime entry points a named
profile config without making each profile duplicate the base user
config. The base `$CODEX_HOME/config.toml` still loads first, then
`$CODEX_HOME/<name>.config.toml` layers above it and becomes the active
writable user config for that session.

That keeps shared defaults, plugin/MCP setup, and managed/user
constraints in one place while letting a named profile override only the
pieces that need to differ.

## What Changed

- Added the shared `--profile-v2 <name>` runtime option with validated
plain names, now represented by `ProfileV2Name`.
- Extended config layer state so the base user config and selected
profile config are both `User` layers; APIs expose the active user layer
and merged effective user config.
- Threaded profile selection through runtime entry points: `codex`,
`codex exec`, `codex review`, `codex resume`, `codex fork`, and `codex
debug prompt-input`.
- Made user-facing config writes go to the selected profile file when
active, including TUI/settings persistence, app-server config writes,
and MCP/app tool approval persistence.
- Made plugin, marketplace, MCP, hooks, and config reload paths read
from the merged user config so base and profile layers both participate.
- Updated app-server config layer schemas to mark profile-backed user
layers.

## Limits

`--profile-v2` is still rejected for config-management subcommands such
as feature, MCP, and marketplace edits. Those paths remain tied to the
base `config.toml` until they have explicit profile-selection semantics.

Some adjacent background writes may still update base or global state
rather than the selected profile:

- marketplace auto-upgrade metadata
- automatic MCP dependency installs from skills
- remote plugin sync or uninstall config edits
- personality migration marker/default writes

## Verification

Added targeted coverage for profile name validation, layer
ordering/merging, selected-profile writes, app-server config writes,
session hot reload, plugin config merging, hooks/config fixture updates,
and MCP/app approval persistence.

---------

Co-authored-by: Codex <noreply@openai.com>
2026-05-14 15:16:15 +02:00
jif-oai 17cd321c32 Wire turn item contributors into stream output (#22494)
## Summary
- run registered TurnItemContributor hooks for parsed stream output
items
- plumb the active turn extension store into stream item handling
- preserve existing memory citation parsing as fallback after
contributors run

## Tests
- cargo test -p codex-core stream_events_utils -- --nocapture
- just fmt
- just fix -p codex-core
- git diff --check
2026-05-14 14:48:17 +02:00
jif-oai 6d65686313 feat: make ToolExecutor an async trait (#22560)
## Why

`codex_tools::ToolExecutor` keeps a tool spec attached to its runtime
handler, but extension tools still carried a parallel
`ExtensionToolFuture` / `ExtensionToolExecutor` shape. That made
extension-owned tools look different from host tools even though
routing, registration, and execution need the same abstraction.

This PR makes the shared executor contract directly async and lets
extension tools implement it too, so host tools and extension tools can
move through the same registration path.

## What changed

- Changed `ToolExecutor::handle` to an `async fn` using `async-trait`,
and updated built-in tool handlers to implement the async trait
directly.
- Replaced the bespoke `ExtensionToolFuture` contract with a marker
`ExtensionToolExecutor` over `ToolExecutor<ToolCall, Output =
JsonToolOutput>`, re-exporting `ToolExecutor` from
`codex-extension-api`.
- Updated the memories extension tools to implement the shared executor
trait.
- Split tool-router construction into collected executors plus hosted
model specs, keeping hosted tools like web search and image generation
separate from executable handlers.
- Updated spec/router tests and extension-tool stubs for the new
executor shape.

## Verification

- Not run locally.
2026-05-14 11:23:57 +02:00
Michael Bolin a388a21f1a Merge 38c8c94d03 into sapling-pr-archive-bolinfest 2026-05-14 01:53:27 -07:00
Michael Bolin 38c8c94d03 permissions: canonicalize workspace_roots and danger-full-access names 2026-05-14 01:53:20 -07:00
Michael Bolin 6a6e17b8dd merge commit for archive created by Sapling 2026-05-14 00:17:32 -07:00
Michael Bolin 5d9489faec permissions: canonicalize workspace_roots and danger-full-access names 2026-05-14 00:17:23 -07:00
Michael Bolin 1f555c8191 merge commit for archive created by Sapling 2026-05-13 23:51:32 -07:00
Michael Bolin 250f3176e1 permissions: canonicalize workspace roots and full access names 2026-05-13 23:50:36 -07:00
Michael Bolin 7d8666325c merge commit for archive created by Sapling 2026-05-13 22:01:55 -07:00
Michael Bolin 5691ca3924 tui/exec: show effective workspace roots in summaries 2026-05-13 21:54:34 -07:00
Michael Bolin 4554fcc19e app-server: use permission ids and runtime workspace roots 2026-05-13 21:54:29 -07:00