Commit Graph
13756 Commits
Author SHA1 Message Date
Michael Bolin 7dc6345136 merge commit for archive created by Sapling 2026-04-27 21:40:17 -07:00
Michael Bolin e97f5f5117 permissions: add built-in default profiles 2026-04-27 21:38:52 -07:00
Michael Bolin 669323a45d app-server-protocol: mark permission profiles experimental 2026-04-27 21:38:52 -07:00
Michael Bolin 61fac4e8ee permissions: store thread sessions as profiles 2026-04-27 21:38:52 -07:00
Michael Bolin 2476604060 permissions: derive snapshot sandbox projections 2026-04-27 21:38:52 -07:00
Michael Bolin c942876181 permissions: make SessionConfigured profile-only 2026-04-27 21:38:26 -07:00
Michael Bolin 3f2fe7f7c1 Merge 4707af72db into sapling-pr-archive-bolinfest 2026-04-27 21:29:55 -07:00
Michael Bolin 4707af72db permissions: add built-in default profiles 2026-04-27 21:29:34 -07:00
Michael Bolin 28113b6730 app-server-protocol: mark permission profiles experimental 2026-04-27 21:29:34 -07:00
Michael Bolin 9133437439 permissions: store thread sessions as profiles 2026-04-27 21:29:34 -07:00
Michael Bolin fac5fcd480 permissions: derive snapshot sandbox projections 2026-04-27 21:29:34 -07:00
Michael Bolin 49e344abaf permissions: make SessionConfigured profile-only 2026-04-27 21:29:34 -07:00
Michael Bolin 4e124a8264 merge commit for archive created by Sapling 2026-04-27 21:17:21 -07:00
Michael Bolin ecf246281e permissions: add built-in default profiles 2026-04-27 21:17:08 -07:00
Michael Bolin 0fc75cc1e0 app-server-protocol: mark permission profiles experimental 2026-04-27 21:17:08 -07:00
Michael Bolin 46a856eb53 permissions: store thread sessions as profiles 2026-04-27 21:17:08 -07:00
Michael Bolin 5895cd814a permissions: derive snapshot sandbox projections 2026-04-27 21:17:08 -07:00
Michael Bolin c8c964b8c2 permissions: make SessionConfigured profile-only 2026-04-27 21:17:08 -07:00
Michael Bolin 977c91c930 merge commit for archive created by Sapling 2026-04-27 21:12:48 -07:00
Michael Bolin f435a6cd02 permissions: add built-in default profiles 2026-04-27 21:12:16 -07:00
Michael Bolin ba5cc6d918 app-server-protocol: mark permission profiles experimental 2026-04-27 21:12:16 -07:00
Michael Bolin 2d32dadbd0 permissions: store thread sessions as profiles 2026-04-27 21:12:16 -07:00
Michael Bolin ee35838141 permissions: derive snapshot sandbox projections 2026-04-27 21:12:16 -07:00
Michael Bolin 7633b6943a permissions: make SessionConfigured profile-only 2026-04-27 21:12:16 -07:00
efrazer-oai c08177f7d0 refactor: load agent identity runtime eagerly (#19763)
## Summary

AgentIdentity auth previously registered the process task lazily behind
a `OnceCell`. That meant the auth object could be constructed before its
runtime task binding was known.

This PR makes AgentIdentity auth load the runtime task at auth load time
and stores the resulting process task id directly on the auth object.
The model-provider call path can then read a concrete task id instead of
handling a missing lazy value.

## Stack

1. [refactor: make auth loading
async](https://github.com/openai/codex/pull/19762) (merged)
2. **This PR:** [refactor: load AgentIdentity runtime
eagerly](https://github.com/openai/codex/pull/19763)
3. [fix: configure AgentIdentity AuthAPI base
URL](https://github.com/openai/codex/pull/19904)
4. [feat: verify AgentIdentity JWTs with
JWKS](https://github.com/openai/codex/pull/19764)

## Important call sites

| Area | Change |
| --- | --- |
| `AgentIdentityAuth::load` | Registers the process task during auth
loading and stores `process_task_id`. |
| `CodexAuth::from_agent_identity_jwt` | Awaits AgentIdentity auth
loading. |
| model-provider auth | Reads a concrete `process_task_id` instead of an
optional lazy value. |
| AgentIdentity auth tests | Mock task registration now covers eager
runtime allocation. |

## Design decisions

AgentIdentity auth now treats task registration as part of constructing
a usable auth object. That matches how callers use the value: once auth
is present, the model-provider path expects the task-scoped assertion
data to be ready.

## Testing

Tests: targeted Rust auth test compilation, formatter, scoped Clippy
fix, and Bazel lock check.
2026-04-27 21:09:26 -07:00
canvrno-oai 2307aa8d98 Allow /statusline and /title slash commands during active turns (#19917)
- Marks `/title` and `/statusline` as available during active tasks.
- Extends the existing slash-command availability test coverage to
include these commands alongside `/goal`.
2026-04-27 20:57:20 -07:00
Michael Bolin ccf7320227 Merge b7dc64bf3d into sapling-pr-archive-bolinfest 2026-04-27 20:41:26 -07:00
Michael Bolin b7dc64bf3d permissions: add built-in default profiles 2026-04-27 20:41:10 -07:00
Michael Bolin 737f95d313 app-server-protocol: mark permission profiles experimental 2026-04-27 20:41:10 -07:00
Michael Bolin 7edd6bde2e permissions: store thread sessions as profiles 2026-04-27 20:41:10 -07:00
Michael Bolin 7497c0207a permissions: derive snapshot sandbox projections 2026-04-27 20:41:10 -07:00
Michael Bolin 86b7c3fef2 permissions: make SessionConfigured profile-only 2026-04-27 20:41:10 -07:00
Michael Bolin af95662a70 permissions: require profiles in TUI thread state (#19773)
## Why

`ThreadSessionState` is the TUI's cached view of an app-server session.
To make `PermissionProfile` the canonical runtime permissions model,
cached thread sessions need to always have a profile instead of treating
the profile as an optional supplement to a legacy `sandbox` response
field.

The main compatibility concern is older app-server v2 lifecycle
responses that only include `sandbox` and omit `permissionProfile`:

- `thread/start` -> `ThreadStartResponse.sandbox`
- `thread/resume` -> `ThreadResumeResponse.sandbox`
- `thread/fork` -> `ThreadForkResponse.sandbox`

Those responses must still hydrate correctly when the TUI is pointed at
an older app-server. This PR converts the legacy `sandbox` value into a
`PermissionProfile` immediately at response ingestion time, using the
response `cwd`, so cached sessions do not carry an optional profile that
can later reinterpret cwd-bound grants against a different thread cwd.

This fallback is intentionally boundary compatibility. The follow-up PRs
in this stack continue the cleanup by making `SessionConfiguredEvent`
profile-only, deriving sandbox projections from snapshots only when an
API still needs them, and then removing `sandbox_policy` from
`ThreadSessionState`.

## What Changed

- Makes `ThreadSessionState.permission_profile` required.
- Converts legacy app-server response `sandbox` values into a
`PermissionProfile` at ingestion time using the response cwd.
- Ensures `thread/read` hydration does not reuse a primary session
profile that may be anchored to a different cwd; it uses the active
widget permission settings for the read thread fallback instead of
reusing cached primary-session permissions.
- Keeps the app-server request path unchanged: embedded sessions send
profiles, while remote sessions continue using legacy sandbox overrides
for compatibility.

## Verification

- `cargo test -p codex-tui thread_read --lib`
- `cargo test -p codex-tui
permission_settings_sync_preserves_active_profile_only_rules --lib`
- `cargo test -p codex-tui
resume_response_restores_turns_from_thread_items --lib`
- `cargo test -p codex-tui thread_session_state::tests --lib`




























---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/openai/codex/pull/19773).
* #19900
* #19899
* #19776
* #19775
* #19774
* __->__ #19773
2026-04-27 20:39:06 -07:00
Michael Bolin 3f8be22845 Merge 7ca20b4669 into sapling-pr-archive-bolinfest 2026-04-27 20:18:03 -07:00
Michael Bolin 7ca20b4669 permissions: add built-in default profiles 2026-04-27 20:17:21 -07:00
Michael Bolin d1871b88e9 app-server-protocol: mark permission profiles experimental 2026-04-27 20:17:21 -07:00
Michael Bolin 08e200fd06 permissions: store thread sessions as profiles 2026-04-27 20:17:21 -07:00
Michael Bolin 2f9c725c72 permissions: derive snapshot sandbox projections 2026-04-27 20:17:21 -07:00
Michael Bolin 2d01c68aff permissions: make SessionConfigured profile-only 2026-04-27 20:17:21 -07:00
Michael Bolin bf530bf056 permissions: require profiles in TUI thread state 2026-04-27 20:17:21 -07:00
pakrym-oai 4e05f3053c Remove ghost snapshots (#19481)
## Summary
- Remove `ghost_snapshot` / `GhostCommit` from the Responses API surface
and generated SDK/schema artifacts.
- Keep legacy config loading compatible, but make undo a no-op that
reports the feature is unavailable.
- Clean up core history, compaction, telemetry, rollout, and tests to
stop carrying ghost snapshot items.

## Testing
- Unit tests passed for `codex-protocol`, `codex-core` targeted undo and
compaction flows, `codex-rollout`, and `codex-app-server-protocol`.
- Regenerated config and app-server schemas plus Python SDK artifacts
and verified they match the checked-in outputs.
2026-04-27 18:48:57 -07:00
Dylan Hurd 7e8594fc19 Stabilize plugin MCP fixture tests (#19452)
## Why

Recent `main` CI had repeated flakes in the plugin fixture tests:

- `codex-core::all
suite::plugins::explicit_plugin_mentions_inject_plugin_guidance` failed
in runs
[24909500958](https://github.com/openai/codex/actions/runs/24909500958),
[24908076251](https://github.com/openai/codex/actions/runs/24908076251),
[24906197645](https://github.com/openai/codex/actions/runs/24906197645),
and
[24898949647](https://github.com/openai/codex/actions/runs/24898949647).
- `codex-core::all suite::plugins::plugin_mcp_tools_are_listed` failed
in runs
[24909500958](https://github.com/openai/codex/actions/runs/24909500958),
[24908076251](https://github.com/openai/codex/actions/runs/24908076251),
and
[24898949647](https://github.com/openai/codex/actions/runs/24898949647).

The failures were in the same plugin/MCP fixture family: assertions
expected sample plugin guidance or tool inventory, but the test could
observe the session before the sample MCP server had finished startup.

## Root Cause

`explicit_plugin_mentions_inject_plugin_guidance` submitted the user
turn immediately after constructing the session. MCP startup is
asynchronous, so on a slower or busier CI runner the prompt could be
built before the sample plugin MCP server had reported its tools. That
made the test depend on scheduler timing rather than the fixture being
ready.

`plugin_mcp_tools_are_listed` already needed the same readiness
condition, but its wait logic was local to that test.

## What Changed

- Added a shared `wait_for_sample_mcp_ready` helper for the plugin
fixture tests.
- Wait for `McpStartupComplete` before submitting the explicit plugin
mention turn.
- Reuse the same readiness helper in the MCP tool-listing test.

## Why This Should Be Reliable

The tests now wait for the explicit readiness signal from the sample MCP
server before asserting guidance or tools derived from that server. This
removes the startup race while still exercising the real fixture path,
so the assertions should only run after the plugin inventory is
deterministic.

## Verification

- `cargo test -p codex-core --test all plugins::`
- GitHub CI for this PR is passing.
2026-04-28 01:14:44 +00:00
Michael Bolin ee327e0069 Merge 393a21dcd6 into sapling-pr-archive-bolinfest 2026-04-27 17:46:25 -07:00
Michael Bolin 393a21dcd6 permissions: add built-in default profiles 2026-04-27 17:44:45 -07:00
Michael Bolin 5fca8f2fa1 app-server-protocol: mark permission profiles experimental 2026-04-27 17:44:45 -07:00
Michael Zeng a3350de855 Refactor exec-server filesystem API into codex-file-system (#19892)
## Summary
- Extracted the shared filesystem types and `ExecutorFileSystem` trait
into a new `codex-file-system` crate
- Switched `codex-config` and `codex-git-utils` to depend on that crate
instead of `codex-exec-server`
- Kept `codex-exec-server` re-exporting the same API for existing
callers

## Testing
- Ran `cargo test -p codex-file-system`
- Ran `cargo test -p codex-git-utils`
- Ran `cargo test -p codex-config`
- Ran `cargo test -p codex-exec-server`
- Ran `just fix -p codex-file-system`, `just fix -p codex-git-utils`,
`just fix -p codex-config`, `just fix -p codex-exec-server`
- Ran `just fmt`
- Updated and verified the Bazel module lockfile
2026-04-27 17:43:15 -07:00
colby-oai 2f3b5ed81a disallow fileparams metadata for custom mcps (#19836)
## Summary
Disallow fileParams metadata for custom MCPs 

Restricts Codex openai/fileParams handling to the first-party codex_apps
MCP server. Custom MCP servers may still advertise the metadata, but
Codex now ignores it for upload rewriting, preventing non-Apps tools
from receiving signed OpenAI file refs for local paths. Added a
regression test for the allowed and denied cases.
2026-04-27 20:42:10 -04:00
Michael Bolin 12824baa72 Merge 88df7ef0b8 into sapling-pr-archive-bolinfest 2026-04-27 17:12:19 -07:00
Michael Bolin 88df7ef0b8 permissions: store thread sessions as profiles 2026-04-27 17:11:10 -07:00
Michael Bolin dd9545ccdf permissions: derive snapshot sandbox projections 2026-04-27 17:11:10 -07:00