Commit Graph

7956 Commits

Author SHA1 Message Date
Chris Bookholt
5632dfd765 git-utils: support older Git boolean ranges 2026-07-02 01:01:44 -07:00
Chris Bookholt
e8b30bd7d3 git-utils: integrate filter guards with repository authority 2026-07-02 00:46:29 -07:00
Chris Bookholt
801018897f Merge repository authority into apply filter guard 2026-07-02 00:16:26 -07:00
Chris Bookholt
7a4648aff4 git-utils: normalize junction fixture paths 2026-07-01 23:42:37 -07:00
Chris Bookholt
5a95b65f57 git-utils: gate Unix-only authority fixtures 2026-07-01 23:19:38 -07:00
Chris Bookholt
4430c51039 git-utils: fix Windows repository authority tests 2026-07-01 23:07:18 -07:00
Chris Bookholt
9c0e48eba6 git-utils: fix Windows repository authority checks 2026-07-01 22:27:54 -07:00
Chris Bookholt
bf70395505 git-utils: make registry retarget test deterministic 2026-07-01 21:42:21 -07:00
Chris Bookholt
daca14580c git-utils: fix Windows authority build 2026-07-01 21:30:49 -07:00
Chris Bookholt
bcf026cbca git-utils: centralize repository authority and trusted Git launch 2026-07-01 21:19:17 -07:00
Chris Bookholt
9a21b607e3 Merge branch 'codex/psec-4394-git-02-effective-patch-paths' into codex/psec-4394-git-03-path-containment 2026-07-01 16:50:50 -07:00
Chris Bookholt
f303ab00da Merge commit '300bbcbf5c' into codex/psec-4394-git-02-effective-patch-paths 2026-07-01 16:50:46 -07:00
Chris Bookholt
300bbcbf5c git-utils: clarify raw PATH rejection 2026-07-01 16:50:40 -07:00
Chris Bookholt
efbd215b81 Merge branch 'codex/psec-4394-git-02-effective-patch-paths' into codex/psec-4394-git-03-path-containment 2026-07-01 16:49:45 -07:00
Chris Bookholt
1ea2e7fcc4 Merge commit 'edda59a703' into codex/psec-4394-git-02-effective-patch-paths 2026-07-01 16:49:32 -07:00
Chris Bookholt
edda59a703 git-utils: fix Windows traversal regression test 2026-07-01 16:49:19 -07:00
Chris Bookholt
68da17b9d8 Merge branch 'codex/psec-4394-git-03-path-containment' into codex/psec-4394-git-05a-apply-filters 2026-07-01 16:21:13 -07:00
Chris Bookholt
21bcee35e4 Merge branch 'codex/psec-4394-git-02-effective-patch-paths' into codex/psec-4394-git-03-path-containment 2026-07-01 16:21:00 -07:00
Chris Bookholt
e76a347987 Merge branch 'codex/psec-4394-trusted-git-runner' into codex/psec-4394-git-02-effective-patch-paths 2026-07-01 16:20:46 -07:00
Chris Bookholt
f062f6916e git-utils: reject raw Windows PATH traversal 2026-07-01 16:20:33 -07:00
Chris Bookholt
98635fbb42 Merge branch 'codex/psec-4394-git-03-path-containment' into codex/psec-4394-git-05a-apply-filters 2026-07-01 15:59:00 -07:00
Chris Bookholt
bed78fad06 git-utils: neutralize off-path filter helpers 2026-07-01 15:58:52 -07:00
Chris Bookholt
48fde8c368 Merge branch 'codex/psec-4394-git-02-effective-patch-paths' into codex/psec-4394-git-03-path-containment 2026-07-01 15:51:09 -07:00
Chris Bookholt
5045e45bf8 Merge branch 'codex/psec-4394-trusted-git-runner' into codex/psec-4394-git-02-effective-patch-paths 2026-07-01 15:51:00 -07:00
Chris Bookholt
b262c52803 git-utils: mirror resolver roots in traversal test 2026-07-01 15:50:37 -07:00
Chris Bookholt
4bf391509e Merge branch 'codex/psec-4394-git-03-path-containment' into codex/psec-4394-git-05a-apply-filters
# Conflicts:
#	codex-rs/git-utils/src/apply.rs
2026-07-01 15:25:38 -07:00
Chris Bookholt
17920f9a57 Merge branch 'codex/psec-4394-git-02-effective-patch-paths' into codex/psec-4394-git-03-path-containment 2026-07-01 15:24:02 -07:00
Chris Bookholt
6a7530f161 Merge branch 'codex/psec-4394-trusted-git-runner' into codex/psec-4394-git-02-effective-patch-paths 2026-07-01 15:23:52 -07:00
Chris Bookholt
9ec1720f7c git-utils: reject Git from enclosing repositories 2026-07-01 15:22:59 -07:00
Chris Bookholt
5b1fe8c0f2 git-utils: fix selected filter edge cases 2026-07-01 15:17:42 -07:00
Chris Bookholt
0b84913ea8 git-utils: block selected patch filters 2026-07-01 10:21:29 -07:00
Chris Bookholt
c21e78bbd6 git-utils: normalize Windows junction test paths 2026-07-01 10:20:33 -07:00
Chris Bookholt
4c0a1feded git-utils: consume confined staging candidates 2026-07-01 09:57:14 -07:00
Chris Bookholt
7cdf6b09bc git-utils: confine staged paths to the worktree 2026-07-01 09:34:06 -07:00
Chris Bookholt
843f07e265 Derive effective patch paths through Git 2026-07-01 08:37:37 -07:00
Chris Bookholt
2ca4f55c0d Bind Git worktree helpers to a trusted executable 2026-07-01 07:45:11 -07:00
Chris Bookholt
ec69e784c2 Handle Windows environment overrides safely 2026-06-30 11:54:44 -07:00
Chris Bookholt
f6122dbf59 Deny transport for local-only Git operations 2026-06-29 15:46:01 -07:00
Eric Traut
4808c162ee [codex] auto-label AWS Bedrock issues (#30607)
## Summary

AWS Bedrock issues currently fall under broader labels, which makes
provider-specific reports harder to find. The issue tracker now has an
`aws-bedrock` label, but the automated labeler does not know to apply
it.

Teach the issue labeler to select `aws-bedrock` for Amazon Bedrock
provider or Bedrock Mantle issues while excluding generic AWS
references.
2026-06-29 11:10:38 -07:00
Eric Traut
9d13291955 Update safety check links (#30491)
## Summary

Bio/Cyber safety surfaces in the TUI could send users to stale Trusted
Access pages, and safety buffering did not always expose the Help
Center.

This follow-up to #30317 adds the missing Learn more action, refreshes
the Bio access URL and block copy, and updates the affected snapshots
while preserving the existing retry and wait behavior.
2026-06-29 11:10:11 -07:00
Shijie Rao
80f54d1266 [codex] Treat max as a first-class reasoning effort (#30467)
## Why

The Bedrock GPT-5.6 catalog advertises `max`, but Codex treated it as an
opaque custom effort. That made the reasoning picker render it as
lowercase `max` while known efforts use productized labels.

Making `max` a known effort aligns catalog data, parsing, and UI
presentation without changing the `max` wire value or persisted
representation.

## What changed

- Add first-class `ReasoningEffort::Max` parsing and serialization.
- Use the typed effort in the Bedrock catalog and render it as `Max` in
the TUI.
- Preserve forward-compatible custom-effort coverage with a genuinely
unknown `future` value.

### Before
<img width="559" height="124" alt="Screenshot 2026-06-28 at 12 08 47 PM"
src="https://github.com/user-attachments/assets/7c43cf4f-020b-4605-9239-0a9c97eb7364"
/>

### After
<img width="558" height="107" alt="Screenshot 2026-06-28 at 12 09 10 PM"
src="https://github.com/user-attachments/assets/b9cc5ded-c940-43b4-b024-bba25abe0a17"
/>
2026-06-29 09:38:49 -07:00
Dylan Hurd
ccdfb4f342 Revert "Make auto-review on-request prompt more proactive" (#30508)
Reverts openai/codex#26496
2026-06-28 20:40:55 -07:00
Ahmed Ibrahim
8dac605901 [codex] Restore v1 delegation guidance (#30511)
## Summary

- restore the v1 clarification that requests for depth, research, or
investigation do not authorize subagent spawning
- restore guidance for keeping critical-path, urgent, tightly coupled,
or difficult work local
- update the focused v1 tool-search and spawn-description coverage

## Why

PR #27919 simplified the v1 `spawn_agent` prompt by removing its
delegation decision guidance. That left the authorization rule intact,
but removed the instructions that constrained what should be delegated
after spawning was authorized.

Restore those guardrails while preserving later support for explicit
delegation authorization from applicable AGENTS.md and skill
instructions. Multi-agent v2 prompts are unchanged.

## User impact

Models using the v1 multi-agent tool surface receive clearer guidance to
delegate independent side work while keeping blocking work on the main
rollout.

## Validation

- `just fmt`
- `git diff --check`
- tests not run locally per repository guidance; CI will validate the
focused coverage
2026-06-28 20:34:47 -07:00
ani-oai
6b5f5743b3 [codex] Use model metadata for skills usage instructions (#29740)
## Summary

- add a false-by-default `include_skills_usage_instructions` model
metadata field
- enable the field for the bundled `gpt-5.5` model metadata
- consume the metadata in both core and extension skill rendering
- remove hardcoded legacy-model matching and its marker plumbing
2026-06-29 09:44:36 +09:00
Felipe Coury
850da19dc4 fix(tui): clear completed safety buffering prompt (#30490)
## Why

The safety-buffering prompt is a modal TUI view, but the normal
successful-turn path only hid the running status indicator. If the turn
completed while the prompt was open, the stale modal remained over the
composer until the user dismissed it or another turn started.

This aligns the TUI with the app behavior: keep the safety notice
visible while the turn is active, then remove it when the turn becomes
terminal. It also prevents the stale retry action from changing the
model and reasoning effort for a future turn after the buffered turn has
already completed.

| New copy |
|---|
| <img width="1014" height="313" alt="CleanShot 2026-06-28 at 20 27 18"
src="https://github.com/user-attachments/assets/f0f37359-5d77-442f-add2-9d1874bdc422"
/> |

## What changed

- Clear the active safety-buffering view and retry state when a turn
completes successfully.
- Update the retry-capable message to say “Hang tight or retry with a
faster model”.
- Extend the safety-buffering regression coverage to verify that the
prompt remains visible after assistant output starts and disappears when
the turn completes.
- Update the TUI snapshot for the revised copy.

This is a follow-up to #29919.

## How to Test

1. Start a TUI turn that receives `model/safetyBuffering/updated` with
`showBufferingUi: true` and a `fasterModel`.
2. Confirm the prompt says “Hang tight or retry with a faster model”.
3. Let the turn continue and confirm the prompt remains visible while
the turn is active.
4. Let the turn finish successfully and confirm the prompt disappears
and the composer is restored without requiring an extra keypress.
5. Confirm a buffering update without a faster model still shows the
shorter non-retry message.

Targeted automated coverage:

- `just test -p codex-tui safety_buffering` — 4 passed.
- `just test -p codex-tui` — 2,951 passed; two unrelated Guardian
feature-flag tests failed identically on `main` in this environment.

The argument-comment lint was also audited manually. The workspace Bazel
invocation was blocked by a missing external LLVM `compiler-rt` BUILD
file, and the packaged per-crate fallback uses a nightly older than the
current `sqlx` minimum Rust version.
2026-06-28 20:55:53 -03:00
xl-openai
e428a12d22 [codex] Enable remote plugins by default (#30297)
## Summary

- enable the remote plugin feature by default
- promote the remote plugin feature from under development to stable
- preserve the existing `features.remote_plugin` override for explicitly
disabling it
- keep legacy disabled-path coverage explicit in TUI and app-server
tests

## Impact

Remote plugin functionality is enabled by default for configurations
that do not set the feature flag. The existing Codex backend
authentication gate still applies.

## Validation

- `just fmt`
- `just test -p codex-features`
- `just test -p codex-tui
plugins_popup_remote_section_fallback_states_snapshot`
- targeted `codex-app-server` plugin-list and skills-list tests
- `git diff --check`

The full TUI and app-server suites were also exercised locally. All
remote-plugin-related coverage passed; unrelated local
sandbox/test-binary failures remain outside this change.
2026-06-28 11:46:25 -07:00
rka-oai
bdd282f3bb [app-server] increase currentTime/read timeout (#30384)
## Summary

Increase the external currentTime/read request timeout from 5 seconds to
10 seconds.

## Validation

- just fmt
- Focused app-server test build was stopped to defer validation to CI.
2026-06-27 16:42:03 -07:00
xl-openai
9dbdb4e2c0 [plugins] Enforce marketplace source policy at runtime (#29691)
## Summary

- project effective marketplace/plugin config through the enterprise
source policy so blocked installed plugins become inactive
- filter plugin list/read/discovery and CLI marketplace source/snapshot
reporting using the same policy
- enforce source admission for background marketplace cache refreshes
- continue refreshing/upgrading independent marketplaces and plugins
when one entry fails, returning per-entry errors
- include policy-projected plugin state in cache and refresh keys so
requirement changes invalidate stale results

## Stack

This is PR 2 of 2 and is based on #29690. Review the admission model and
source matcher in #29690 first; this PR contains only runtime
enforcement.

## Test plan

- `just test -p codex-core-plugins` (287 tests)
- `just test -p codex-cli
plugin_list_ignores_implicit_system_marketplace_roots_without_manifests`
- `cargo check -p codex-cli -p codex-app-server --tests`
2026-06-27 15:22:05 -07:00
Max Johnson
e2398d0b16 [app-server] expose environment info RPC (#30291)
## Why

App-server clients that configure named execution environments need to
discover an environment's shell and working directory before selecting
it for a thread or turn. Because the environment can run on a different
operating system than app-server, its working directory is represented
as a canonical `file:` URI rather than a host-local path string. The
probe also needs a bounded response time: an exec-server that completes
initialization but never answers `environment/info` must not hold the
environment serialization queue indefinitely.

## What changed

- Add an experimental `environment/info` app-server RPC for named
environments.
- Route the probe through the managed environment connection and return
target-native shell metadata plus the default working directory as a
`PathUri`.
- Return connection and protocol failures as JSON-RPC errors.
- Bound the exec-server probe response to 30 seconds and remove
timed-out calls from the pending-request table so later environment
mutations can proceed.
- Cover successful responses, omitted working directories, unknown
environments, connection failures, and pending-call cleanup.

## Protocol examples

Request:

```json
{
  "id": 42,
  "method": "environment/info",
  "params": {
    "environmentId": "remote-a"
  }
}
```

Successful response:

```json
{
  "id": 42,
  "result": {
    "shell": {
      "name": "zsh",
      "path": "/bin/zsh"
    },
    "cwd": "file:///workspace"
  }
}
```

If the exec-server initializes but does not answer the probe within 30
seconds:

```json
{
  "id": 42,
  "error": {
    "code": -32603,
    "message": "failed to get info for environment `remote-a`: exec-server protocol error: timed out waiting for exec-server `environment/info` response after 30s"
  }
}
```

## Testing

- App-server integration coverage for successful info (including omitted
`cwd`), unknown environments, and connection failures.
- Exec-server RPC coverage verifying a timed-out call is removed from
the pending-request table.

---------

Co-authored-by: Michael Bolin <mbolin@openai.com>
2026-06-27 19:34:10 +00:00
Michael Bolin
d2885dc3cd core: stabilize synthesized call output IDs (#30327)
## Why

Response item IDs represent stable conversation identity.
`ContextManager::for_prompt` repairs an unmatched call by synthesizing
an `"aborted"` output in the disposable prompt projection, but that
output previously had no ID. Assigning a fresh ID on every prompt build
would make retries and resumes change otherwise identical model context
and reduce prompt-cache reuse.

The concrete bug is that these normalization-created outputs bypass the
regular item-ID allocation path. Even with item IDs enabled, a prompt
could therefore contain an identified call paired with a synthetic
output whose `id` was missing. This change closes that gap by deriving
the output ID from the source call's item ID. For legacy calls that have
no item ID, the output remains ID-less because there is no stable source
identity to derive from.

The originating call already has a stable item ID under the item-ID
model introduced in #28814. A prompt-only output can therefore derive
stable identity from that call without mutating canonical history or
persisted rollouts. This addresses the failure exposed by #30311 while
keeping normalization read-only outside its detached prompt snapshot.

UUIDv5 is intentional here because it is the standard namespaced,
deterministic UUID construction. Using the output kind and source call
ID as the name produces the same UUID on every projection while keeping
output kinds in separate name domains. UUIDv7 would introduce randomness
and time, so keeping it stable would require persisting the synthetic
repair. UUIDv5 uses SHA-1 internally, but this is only an identity
mapping—not an authenticity or security boundary.

## What changed

- Derive a deterministic UUIDv5 ID for each synthesized call output from
the source call item ID.
- Use the Responses API prefix appropriate for function, custom-tool,
tool-search, and local-shell outputs.
- Preserve the existing insertion position immediately after the
unmatched call.
- Keep synthesized outputs prompt-only; no rollout, task-lifecycle,
compaction, or raw-response behavior changes.

## Testing

- `just test -p codex-core
for_prompt_assigns_stable_id_to_synthetic_output_without_reordering_history`
- `just test -p codex-core
synthetic_call_output_id_is_stable_across_resumes`
- `just test -p codex-core normalize_adds_missing_output`
- `just test -p codex-core response_item_ids`
2026-06-27 10:47:54 -07:00