Commit Graph
7679 Commits
Author SHA1 Message Date
Winston Howes 50a3a70b55 Merge branch 'dev/winston/mitm-command-ca-bundles-restack-20260618' into dev/winston/mitm-scope-startup-ca-baseline 2026-06-18 16:30:54 -07:00
Winston Howes ac4ea2c8d5 Gate managed CA test import on Unix 2026-06-18 16:30:22 -07:00
Winston Howes c279f0ae66 Merge branch 'dev/winston/mitm-command-ca-bundles-restack-20260618' into dev/winston/mitm-scope-startup-ca-baseline 2026-06-18 15:53:33 -07:00
Winston Howes c9aba3cd9f Fix Windows sandboxing test import 2026-06-18 15:52:37 -07:00
Winston Howes f9086f536e Merge branch 'dev/winston/mitm-command-ca-bundles-restack-20260618' into dev/winston/mitm-scope-startup-ca-baseline 2026-06-18 15:06:18 -07:00
Winston Howes 4b32b6bd11 Merge branch 'dev/winston/mitm-child-env-snapshots' into dev/winston/mitm-command-ca-bundles-restack-20260618 2026-06-18 15:05:37 -07:00
Winston Howes 9cf8420105 Merge branch 'dev/winston/mitm-sandbox-readable-carvebacks' into dev/winston/mitm-child-env-snapshots 2026-06-18 15:05:15 -07:00
Winston Howes ec9d5e729c Merge branch 'dev/winston/mitm-ca-bundle-helpers-refresh-20260618' into dev/winston/mitm-sandbox-readable-carvebacks 2026-06-18 15:04:50 -07:00
Winston Howes 23ba4ebbc3 Merge branch 'dev/winston/mitm-startup-ca-env' into dev/winston/mitm-ca-bundle-helpers-refresh-20260618 2026-06-18 15:04:30 -07:00
Winston Howes 06a19f2c9a Merge branch 'dev/winston/mitm-platform-ca-roots' into dev/winston/mitm-startup-ca-env 2026-06-18 15:04:10 -07:00
Winston Howes 0afb245941 Merge remote-tracking branch 'origin/main' into dev/winston/mitm-platform-ca-roots 2026-06-18 15:03:46 -07:00
xl-openai 406062c3af [codex] Preserve remote plugin download status errors (#28863)
## Summary

- preserve the original HTTP status when a remote plugin bundle download
returns a non-success response
- retain at most 8 KiB of the error response body and annotate
truncation or body-read failures
- add regression coverage for an oversized error response

## Root cause

The non-success response path reused the normal size-limited body
reader. When an error response exceeded 8 KiB, that reader returned
`DownloadTooLarge` before the code constructed `DownloadStatus`, masking
the upstream HTTP status and response context.

## Impact

Remote plugin installation failures now retain the actionable upstream
HTTP status without allowing unbounded error bodies into logs.

## Validation

- `just test -p codex-app-server
plugin_install_preserves_status_when_remote_bundle_error_body_is_too_large`
- `just fmt`
- `git diff --check`
2026-06-18 14:29:01 -07:00
Alex Daley 4af7762f01 [connectors] Ignore synthetic links for app accessibility (#28770)
Summary
- Stop treating Codex Apps MCP tools with
`_meta._codex_apps.synthetic_link: true` as evidence that a connector is
accessible in `app/list`.
- Preserve synthetic tools in the agent-facing MCP connector set so they
remain available for install/auth flows.
- Keep the app-list accessibility cache limited to connectors backed by
at least one non-synthetic tool.
- Add focused regression coverage for both sides of the boundary.

Validation
- `just fmt`
- `just test -p codex-core
synthetic_links_are_exposed_to_the_agent_but_not_accessible_in_app_list`
- `git diff --check`
- A crate-wide `just test -p codex-core` run completed with 2,699
passing and 51 unrelated local sandbox/state failures, primarily state
DB migration races (`UNIQUE constraint failed:
_sqlx_migrations.version`).
2026-06-18 17:19:24 -04:00
Adrian ec848dde0e feat: opt ChatGPT auth into agent identity (#19049)
## Stack

This is PR 2 of the simplified HAI single-run-task stack:

- [#19047](https://github.com/openai/codex/pull/19047) Agent Identity
assertion and task-registration primitives, including the shared
run-task helper used by existing Agent Identity JWT auth.
- [#19049](https://github.com/openai/codex/pull/19049)
Disabled-by-default ChatGPT auth opt-in that provisions/reuses persisted
Agent Identity runtime auth and its single run task.
- [#19051](https://github.com/openai/codex/pull/19051) Run-scoped
provider auth that uses one backend-owned task id for first-party
inference and compaction requests.

[#19054](https://github.com/openai/codex/pull/19054) collapsed out of
the active stack because the simplified design no longer needs a
separate background/control-plane task helper.

## Summary

This PR adds the disabled-by-default path for normal ChatGPT-login Codex
sessions to obtain Agent Identity runtime auth through the Codex
backend. Existing Agent Identity JWT startup mode remains a separate
path and does not require the feature flag.

What changed:

- adds the experimental `use_agent_identity` feature flag and config
schema entry
- adds an explicit `AgentIdentityAuthPolicy` so call sites choose
`JwtOnly` or `ChatGptAuth` instead of passing a bare boolean
- stores standalone Agent Identity JWT credentials separately from
backend-registered Agent Identity records
- persists the registered Agent Identity record, private key, and single
run task id in `auth.json` so process restarts reuse the same identity
- derives the agent/task registration base URL from ChatGPT/Codex auth
config while keeping JWT JWKS lookup separate
- provisions and caches ChatGPT-derived Agent Identity runtime auth when
`use_agent_identity` is enabled
- reuses the shared run-task registration helper from PR1 rather than
adding a second task-registration path

This PR intentionally does not switch model inference over to
`AgentAssertion` auth. The provider-auth integration lands in the next
PR.

## Testing

- `just test -p codex-login`
2026-06-18 14:05:27 -07:00
martinauyeung-oaiandmartinauyeung-oai 765309d5a6 Emit Trusted MCP App Identity on Tool-Call Items (#27132)
## Summary

- Add optional `appContext` to app-server MCP tool-call items with
trusted `connectorId`, `linkId`, and `mcpAppResourceUri` metadata.
- Preserve that context across tool-call events, persisted history,
reconnects, and thread resume.
- Keep the deprecated top-level `mcpAppResourceUri` temporarily for
client migration.

The consumer contract is `{ appContext: { connectorId, linkId,
mcpAppResourceUri }, tool }`.

## Validation

- Full GitHub Actions suite passes, including CLA, Bazel tests, clippy,
release builds, and argument-comment lint.

---------

Co-authored-by: martinauyeung-oai <280153141+martinauyeung-oai@users.noreply.github.com>
2026-06-18 14:02:54 -07:00
canvrno-oai 9bcc09f9f7 TUI: improve unified mention selection visibility (#28959)
## Summary

[@milanglacier reported in
#28653](https://github.com/openai/codex/issues/28653) that the active
mention candidate is hard to distinguish. I suspect [@binbjz’s #28500
report](https://github.com/openai/codex/issues/28500) _(where arrow-key
navigation appeared not to work)_ may describe the same presentation
problem: the selection may have been changing, but the UI was not
showing the active row clearly in their terminal. This PR makes two
small changes to the selection indication behavior:

- Reserve a two-character gutter and mark the active candidate with `> `
for color-agnostic indicator coverage.
- Apply the shared theme-aware accent to the entire selected row for
extra emphasis.
- Update the existing popup snapshot.

Reverse-video styling was considered, but avoided it because it is
overly dependent on the user’s terminal palette.

<img width="2046" height="482" alt="image"
src="https://github.com/user-attachments/assets/b5eb62c3-fd24-4c09-906e-7bd66913b5c6"
/>

## Testing

- `just test -p codex-tui default_unified_mention_popup_snapshot`
- `just clippy -p codex-tui`
- `just fmt`
- Compiled `codex-cli` and tested the unified mentions picker in the
terminal.
2026-06-18 13:37:04 -07:00
Eric Ning 29eb434bc5 [codex] Remove hardcoded app ID filters (#28947)
## Summary

- remove the duplicated originator-specific connector ID denylists
- stop filtering connector directory/accessibility results and
live/cached Codex Apps MCP tools by hardcoded connector ID
- remove the now-unused `codex-login` dependency from
`codex-utils-plugins`
- update regression coverage so formerly blocked connector IDs are
preserved

## Why

The client-side policy was duplicated across crates, used opaque IDs
without ownership or expiry information, and could drift between app
listing and MCP tool behavior. Server-provided visibility,
authorization, plugin discoverability, accessibility, enabled-state
handling, and consequential-tool approval templates remain unchanged.

## Validation

- `just fmt`
- `just bazel-lock-update`
- `just bazel-lock-check`
- `git diff --check`
- confirmed the final diff contains no hardcoded denylist symbols

A targeted `codex-mcp` test build spent an unusually long time in local
compilation/linking. Its first attempt exposed a test-only `PartialEq`
assertion issue, which was corrected. A follow-up non-linking `cargo
check -p codex-mcp --tests` was still running when this draft was
opened; CI should provide the complete Rust validation.
2026-06-18 20:29:01 +00:00
Winston Howes 4bf328742f Merge branch 'dev/winston/mitm-command-ca-bundles-restack-20260618' into dev/winston/mitm-scope-startup-ca-baseline 2026-06-18 13:22:59 -07:00
Winston Howes f4d853024d Merge branch 'dev/winston/mitm-child-env-snapshots' into dev/winston/mitm-command-ca-bundles-restack-20260618 2026-06-18 13:22:35 -07:00
Winston Howes 397d6231ba Merge branch 'dev/winston/mitm-sandbox-readable-carvebacks' into dev/winston/mitm-child-env-snapshots 2026-06-18 13:22:17 -07:00
Winston Howes a9d75b881b Merge branch 'dev/winston/mitm-ca-bundle-helpers-refresh-20260618' into dev/winston/mitm-sandbox-readable-carvebacks 2026-06-18 13:21:53 -07:00
Winston Howes 5470e0baa4 Merge branch 'dev/winston/mitm-startup-ca-env' into dev/winston/mitm-ca-bundle-helpers-refresh-20260618 2026-06-18 13:21:31 -07:00
Winston Howes 32737430a9 Merge branch 'dev/winston/mitm-platform-ca-roots' into dev/winston/mitm-startup-ca-env 2026-06-18 13:21:08 -07:00
Winston Howes dc43da1594 Merge remote-tracking branch 'origin/main' into dev/winston/mitm-platform-ca-roots 2026-06-18 13:20:46 -07:00
Winston Howes 21ca6875ac Merge branch 'dev/winston/mitm-command-ca-bundles-restack-20260618' into dev/winston/mitm-scope-startup-ca-baseline 2026-06-18 13:16:22 -07:00
maja-openai d9dace8a59 Make auto-review on-request prompt more proactive (#26496)
## Why

`on-request` approval policy text is currently tuned for user-reviewed
approvals. For auto-reviewed productivity runs, likely sandbox blocks
should be escalated earlier so commands that need remote services,
authentication, or other out-of-sandbox access do not first fail or hang
inside the sandbox.

## What changed

- Adds a separate `on_request_auto_review.md` permissions prompt
selected for `AskForApproval::OnRequest` with
`ApprovalsReviewer::AutoReview`.
- Keeps the normal user-reviewed `on-request` wording unchanged.
- Makes the `When to request escalation` bullets more explicit about
likely sandbox blocks, network access, remote
auth/cluster/cloud/database access, out-of-sandbox environment access,
git operations that may write lock files, and short-timeout reruns after
likely sandbox-blocked attempts.
- Omits approved command prefix and `prefix_rule` guidance for the
auto-review on-request prompt.
- Adds prompt tests covering the auto-review path, normal on-request
wording, and inline permission request behavior.
2026-06-18 13:16:14 -07:00
Winston Howes 4049435d4a Fix Windows MITM sandbox test state 2026-06-18 13:15:40 -07:00
rka-oai f4602b7516 Add app-server current-time impl (varlatency 3/n) (#28835)
## What

Server should request:

```
{
  "id": 42,
  "method": "currentTime/read",
  "params": {
    "threadId": "11111111-1111-1111-1111-aaaaafdc2c11"
  }
}
```

Client should respond with something like:

```rust
{
  "id": 42,
  "result": {
    "currentTimeAt": 1781717655
  }
}
```

## Why

Sessions configured with `clock_source = "external"` need a
thread-specific external time source before inference. The system clock
remains the default production provider.

## Validation

- `cargo test -p codex-app-server-protocol`
- `cargo test -p codex-app-server --test all
current_time_read_round_trip_adds_reminder_to_model_input`
- `cargo test -p codex-app-server
first_attestation_capable_connection_for_thread_only_uses_thread_subscribers`
- `cargo test -p codex-analytics`
- `just fix -p codex-app-server-protocol`
- `just fix -p codex-app-server`

Stacked on #28824.
2026-06-18 13:12:11 -07:00
Winston Howes b9add727e8 Scope startup CA roots to prepared children 2026-06-18 12:59:22 -07:00
Winston Howes 7f38e1bee4 Merge branch 'dev/winston/mitm-child-env-snapshots' into dev/winston/mitm-command-ca-bundles-restack-20260618 2026-06-18 12:57:34 -07:00
Winston Howes d5cee66b01 Keep startup CA roots until sandbox wiring 2026-06-18 12:57:04 -07:00
Winston Howes 306b66ceb5 Merge branch 'dev/winston/mitm-child-env-snapshots' into dev/winston/mitm-command-ca-bundles-restack-20260618 2026-06-18 12:45:23 -07:00
Winston Howes ea1d93b243 Merge branch 'dev/winston/mitm-sandbox-readable-carvebacks' into dev/winston/mitm-child-env-snapshots 2026-06-18 12:44:47 -07:00
Winston Howes f1320d1d08 Merge branch 'dev/winston/mitm-ca-bundle-helpers-refresh-20260618' into dev/winston/mitm-sandbox-readable-carvebacks 2026-06-18 12:44:10 -07:00
Winston Howes ef43ea7b11 Merge branch 'dev/winston/mitm-startup-ca-env' into dev/winston/mitm-ca-bundle-helpers-refresh-20260618 2026-06-18 12:43:38 -07:00
Winston Howes 67109bee23 Merge remote-tracking branch 'origin/dev/winston/mitm-ca-bundle-helpers' into dev/winston/mitm-ca-bundle-helpers-refresh-20260618 2026-06-18 12:43:19 -07:00
Winston Howes c4eb078788 Merge branch 'dev/winston/mitm-platform-ca-roots' into dev/winston/mitm-startup-ca-env 2026-06-18 12:42:53 -07:00
Winston Howes f9299cb0ee Merge remote-tracking branch 'origin/dev/winston/mitm-startup-ca-env' into dev/winston/mitm-startup-ca-env 2026-06-18 12:42:37 -07:00
Winston Howes 478d961685 Merge remote-tracking branch 'origin/dev/winston/mitm-platform-ca-roots' into dev/winston/mitm-platform-ca-roots 2026-06-18 12:42:19 -07:00
Adam Perry @ OpenAI 0f89dd768c apply-patch: carry paths as PathUri (#28854)
## Why

Allows the model to edit files that are hosted on a different OS than
where app-server is running.

## What

* Use `PathUri` for apply_patch-internal data structures
* Limit `PathUri` -> `AbsolutePathBuf` conversion to cases where the
inferred path convention matches the host OS, allows requiring valid
paths to pass to perms check
* Adds `PathConvention::path_segments()` for iterating over path
segments regardless of OS
* Handle cross-platform relative paths in path filename parsing for
sniffing a shell
* Ensure we can apply patches in the wine e2e test
2026-06-18 19:31:19 +00:00
Matthew Zeng a52a3b5197 [codex] Cache plugin metadata for tool suggestions (#27812)
## Why

`built_tools` runs for every sampling request, and local plugin
discovery was repeatedly rereading plugin manifests, skills, MCP
configuration, and app declarations to build the same tool-suggest
metadata.

That source-derived metadata is stable until the existing plugin manager
reloads its cache. Runtime eligibility still needs to reflect the
current install, disable, policy, app-overlap, and authentication state.

## What changed

- Add a bounded, in-memory tool-suggest metadata cache owned by
`PluginsManager`.
- Key cached metadata by plugin identity and source, while applying
authentication routing each time the metadata is projected.
- Invalidate the metadata alongside the existing loaded-plugin cache,
including its normal configuration, marketplace refresh, and
remote-installed-plugin invalidation paths.
- Guard against an in-flight load repopulating stale metadata after
invalidation.
- Keep marketplace membership and all runtime eligibility filtering live
rather than introducing a separate catalog or revision model.

## Impact

Repeated sampling requests reuse already-loaded plugin capability
metadata while retaining the existing plugin-manager lifecycle as the
single freshness boundary.

## Validation

- `just test -p codex-core-plugins` — 252 passed
- Added focused coverage for cache invalidation and authentication
reprojection.
2026-06-18 12:25:07 -07:00
Winston Howes 29fb57d13b Merge branch 'dev/winston/mitm-child-env-snapshots' into dev/winston/mitm-command-ca-bundles-restack-20260618 2026-06-18 12:24:42 -07:00
Winston Howes 41c01c0a65 Merge branch 'dev/winston/mitm-sandbox-readable-carvebacks' into dev/winston/mitm-child-env-snapshots 2026-06-18 12:24:28 -07:00
Winston Howes 5869a57b21 Merge branch 'dev/winston/mitm-ca-bundle-helpers-refresh-20260618' into dev/winston/mitm-sandbox-readable-carvebacks 2026-06-18 12:24:04 -07:00
Winston Howes dffd63a7bc Merge branch 'dev/winston/mitm-startup-ca-env' into dev/winston/mitm-ca-bundle-helpers-refresh-20260618 2026-06-18 12:23:48 -07:00
Winston Howes c9f5349e15 Merge branch 'dev/winston/mitm-platform-ca-roots' into dev/winston/mitm-startup-ca-env 2026-06-18 12:23:18 -07:00
Winston Howes 473280ca2b Merge remote-tracking branch 'origin/main' into dev/winston/mitm-platform-ca-roots 2026-06-18 12:22:38 -07:00
Winston Howes ac77ede42d Wire managed child MITM CA environments 2026-06-18 12:20:08 -07:00
rka-oai 752ed90d78 current time reminders impl for system clock (varlatency 2/n) (#28824)
Stacked on #28822.

## Summary

- add a host-injectable current-time provider with a built-in system
implementation
- record UTC developer reminders in history immediately before due model
requests
- keep cadence state per session and force a refresh after compaction

This does NOT include the app server client <-> server clock logic. This
PR is only for the reminder message & system clock that will be used in
prod.

## Testing

- `just test -p codex-core varlatency_`
- `just clippy -p codex-core -p codex-app-server -p codex-mcp-server -p
codex-thread-manager-sample`
- `just fmt`
2026-06-18 19:18:42 +00:00
Winston Howes c27c1f8faf Snapshot managed proxy child environments 2026-06-18 12:17:55 -07:00