Skip to content

Commit 9415ffa

Browse files
Merge upstream Codex 0.131.0 into Open Codex
Bring the fork onto the upstream 0.131.0 codebase while preserving Open Codex behavior and release identity. This also bumps the fork release to 0.131.1, restores @leonw24/open-codex update/install diagnostics, and records concrete release notes in FEATURES.md. Verified with focused memory, subagent, CLI update, app-server resume, and release-fast build checks before publishing. Co-authored-by: Open Codex <hff582580@gmail.com>
1 parent 7ccae71 commit 9415ffa

948 files changed

Lines changed: 68870 additions & 33468 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Core crate ownership.
22
/codex-rs/core/ @openai/codex-core-agent-team
3+
/codex-rs/ext/extension-api/ @openai/codex-core-agent-team
34

45
# Keep ownership changes reviewed by the same team.
56
/.github/CODEOWNERS @openai/codex-core-agent-team

.github/ISSUE_TEMPLATE/3-cli.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ body:
1111
1212
Make sure you are running the [latest](https://npmjs.com/package/@openai/codex) version of Codex CLI. The bug you are experiencing may already have been fixed.
1313
14+
If your version supports it, please run `codex doctor --json` and paste the output in the "Codex doctor report" field below. This helps us diagnose install, config, auth, terminal, MCP, network, and local state issues.
15+
1416
- type: input
1517
id: version
1618
attributes:
@@ -43,6 +45,16 @@ body:
4345
description: |
4446
Also note any multiplexer in use (screen / tmux / zellij).
4547
E.g., VS Code, Terminal.app, iTerm2, Ghostty, Windows Terminal (WSL / PowerShell)
48+
- type: textarea
49+
id: doctor
50+
attributes:
51+
label: Codex doctor report
52+
description: |
53+
If available, run `codex doctor --json` and paste the full output here.
54+
55+
The report is designed to redact secrets, but please review it before submitting.
56+
If your Codex version does not support `doctor`, write `not available`.
57+
render: json
4658
- type: textarea
4759
id: actual
4860
attributes:

.github/workflows/bazel.yml

Lines changed: 116 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ concurrency:
1717
cancel-in-progress: ${{ github.ref_name != 'main' }}
1818
jobs:
1919
test:
20-
# PRs use a fast Windows cross-compiled test leg for pre-merge signal.
21-
# Post-merge pushes to main also run the native Windows test job below for
22-
# broader Windows signal without putting PR latency back on the critical
23-
# path. Cargo CI owns V8/code-mode test coverage for now.
20+
# PRs use the sharded Windows cross-compiled test jobs below. Post-merge
21+
# pushes to main also run the native Windows test job for broader Windows
22+
# signal without putting PR latency back on the critical path. Cargo CI
23+
# owns V8/code-mode test coverage for now.
2424
timeout-minutes: 30
2525
strategy:
2626
fail-fast: false
@@ -44,12 +44,6 @@ jobs:
4444
# - os: ubuntu-24.04-arm
4545
# target: aarch64-unknown-linux-gnu
4646

47-
# Windows fast path: build the windows-gnullvm binaries with Linux
48-
# RBE, then run the resulting Windows tests on the Windows runner.
49-
# Cargo CI preserves V8/code-mode coverage while Bazel CI keeps broad
50-
# non-code-mode signal.
51-
- os: windows-latest
52-
target: x86_64-pc-windows-gnullvm
5347
runs-on: ${{ matrix.os }}
5448

5549
# Configure a human readable name for each job
@@ -108,13 +102,6 @@ jobs:
108102
--test_verbose_timeout_warnings
109103
--build_metadata=COMMIT_SHA=${GITHUB_SHA}
110104
)
111-
if [[ "${RUNNER_OS}" == "Windows" ]]; then
112-
bazel_wrapper_args+=(
113-
--windows-cross-compile
114-
--remote-download-toplevel
115-
)
116-
fi
117-
118105
./.github/scripts/run-bazel-ci.sh \
119106
"${bazel_wrapper_args[@]}" \
120107
-- \
@@ -141,6 +128,118 @@ jobs:
141128
path: ${{ steps.prepare_bazel.outputs.repository-cache-path }}
142129
key: ${{ steps.prepare_bazel.outputs.repository-cache-key }}
143130

131+
test-windows-shard:
132+
# Split the Windows Bazel test leg across separate Windows
133+
# hosts. Each shard still uses Linux RBE for build actions, but the test
134+
# execution itself happens on its own Windows runner.
135+
timeout-minutes: 30
136+
strategy:
137+
fail-fast: false
138+
matrix:
139+
shard:
140+
- 1
141+
- 2
142+
- 3
143+
- 4
144+
runs-on: windows-latest
145+
name: Bazel test on windows-latest for x86_64-pc-windows-gnullvm shard ${{ matrix.shard }}/4
146+
147+
steps:
148+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
149+
with:
150+
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
151+
persist-credentials: false
152+
153+
- name: Prepare Bazel CI
154+
id: prepare_bazel
155+
uses: ./.github/actions/prepare-bazel-ci
156+
with:
157+
target: x86_64-pc-windows-gnullvm
158+
# Reuse the former monolithic Windows test cache for restores. Do
159+
# not save it from every shard below; duplicate uploads would sit on
160+
# the PR-blocking critical path after the useful test work is done.
161+
cache-scope: bazel-test
162+
install-test-prereqs: "true"
163+
164+
- name: bazel test shard
165+
env:
166+
BAZEL_TEST_SHARD: ${{ matrix.shard }}
167+
BAZEL_TEST_SHARD_COUNT: 4
168+
BUILDBUDDY_API_KEY: ${{ secrets.BUILDBUDDY_API_KEY }}
169+
shell: bash
170+
run: |
171+
set -euo pipefail
172+
173+
bazel_test_query='tests(//...) except tests(//third_party/v8:all) except //codex-rs/code-mode:code-mode-unit-tests except //codex-rs/v8-poc:v8-poc-unit-tests except attr(tags, "manual", tests(//...))'
174+
mapfile -t bazel_targets < <(
175+
MSYS2_ARG_CONV_EXCL='*' bazel query --output=label "${bazel_test_query}" \
176+
| LC_ALL=C sort
177+
)
178+
179+
selected_targets=()
180+
for bazel_target in "${bazel_targets[@]}"; do
181+
target_bucket="$(
182+
printf '%s\n' "${bazel_target}" \
183+
| cksum \
184+
| awk -v shard_count="${BAZEL_TEST_SHARD_COUNT}" '{ print ($1 % shard_count) + 1 }'
185+
)"
186+
if [[ "${target_bucket}" == "${BAZEL_TEST_SHARD}" ]]; then
187+
selected_targets+=("${bazel_target}")
188+
fi
189+
done
190+
191+
if [[ ${#selected_targets[@]} -eq 0 ]]; then
192+
echo "No Bazel test targets selected for Windows shard ${BAZEL_TEST_SHARD}/${BAZEL_TEST_SHARD_COUNT}." >&2
193+
exit 1
194+
fi
195+
196+
echo "Selected ${#selected_targets[@]} of ${#bazel_targets[@]} Bazel test targets for Windows shard ${BAZEL_TEST_SHARD}/${BAZEL_TEST_SHARD_COUNT}."
197+
198+
bazel_test_args=(
199+
test
200+
--skip_incompatible_explicit_targets
201+
--test_tag_filters=-argument-comment-lint
202+
--test_verbose_timeout_warnings
203+
--build_metadata=COMMIT_SHA=${GITHUB_SHA}
204+
--build_metadata=TAG_windows_test_shard=${BAZEL_TEST_SHARD}
205+
)
206+
207+
./.github/scripts/run-bazel-ci.sh \
208+
--print-failed-action-summary \
209+
--print-failed-test-logs \
210+
--windows-cross-compile \
211+
--remote-download-toplevel \
212+
-- \
213+
"${bazel_test_args[@]}" \
214+
-- \
215+
"${selected_targets[@]}"
216+
217+
- name: Upload Bazel execution logs
218+
if: always() && !cancelled()
219+
continue-on-error: true
220+
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
221+
with:
222+
name: bazel-execution-logs-test-x86_64-pc-windows-gnullvm-shard-${{ matrix.shard }}
223+
path: ${{ runner.temp }}/bazel-execution-logs
224+
if-no-files-found: ignore
225+
226+
test-windows:
227+
# Preserve the existing required-check surface while the real work happens
228+
# in the sharded Windows jobs above.
229+
if: always()
230+
needs: test-windows-shard
231+
runs-on: ubuntu-24.04
232+
name: Bazel test on windows-latest for x86_64-pc-windows-gnullvm
233+
234+
steps:
235+
- name: Confirm Windows Bazel test shards passed
236+
shell: bash
237+
run: |
238+
if [[ "${{ needs.test-windows-shard.result }}" != "success" ]]; then
239+
echo "Windows Bazel test shards finished with result: ${{ needs.test-windows-shard.result }}" >&2
240+
exit 1
241+
fi
242+
144243
test-windows-native-main:
145244
# Native Windows Bazel tests are slower and frequently approach the
146245
# 30-minute PR budget. Run this only for post-merge commits to main and give

.github/workflows/issue-deduplicator.yml

Lines changed: 42 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,8 @@ jobs:
1515
permissions:
1616
contents: read
1717
outputs:
18-
issues_json: ${{ steps.normalize-all.outputs.issues_json }}
19-
reason: ${{ steps.normalize-all.outputs.reason }}
20-
has_matches: ${{ steps.normalize-all.outputs.has_matches }}
18+
codex_output: ${{ steps.codex-all.outputs.final-message }}
2119
steps:
22-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
23-
with:
24-
persist-credentials: false
25-
2620
- name: Prepare Codex inputs
2721
env:
2822
GH_TOKEN: ${{ github.token }}
@@ -67,6 +61,8 @@ jobs:
6761
with:
6862
openai-api-key: ${{ secrets.CODEX_OPENAI_API_KEY }}
6963
allow-users: "*"
64+
safety-strategy: drop-sudo
65+
sandbox: read-only
7066
prompt: |
7167
You are an assistant that triages new GitHub issues by identifying potential duplicates.
7268
@@ -100,10 +96,21 @@ jobs:
10096
"additionalProperties": false
10197
}
10298
99+
normalize-duplicates-all:
100+
name: Normalize pass 1 output
101+
needs: gather-duplicates-all
102+
if: ${{ needs.gather-duplicates-all.result == 'success' }}
103+
runs-on: ubuntu-latest
104+
permissions: {}
105+
outputs:
106+
issues_json: ${{ steps.normalize-all.outputs.issues_json }}
107+
reason: ${{ steps.normalize-all.outputs.reason }}
108+
has_matches: ${{ steps.normalize-all.outputs.has_matches }}
109+
steps:
103110
- id: normalize-all
104111
name: Normalize pass 1 output
105112
env:
106-
CODEX_OUTPUT: ${{ steps.codex-all.outputs.final-message }}
113+
CODEX_OUTPUT: ${{ needs.gather-duplicates-all.outputs.codex_output }}
107114
CURRENT_ISSUE_NUMBER: ${{ github.event.issue.number }}
108115
run: |
109116
set -eo pipefail
@@ -146,21 +153,15 @@ jobs:
146153
147154
gather-duplicates-open:
148155
name: Identify potential duplicates (open issues fallback)
149-
# Pass 1 may drop sudo on the runner, so run the fallback in a fresh job.
150-
needs: gather-duplicates-all
151-
if: ${{ needs.gather-duplicates-all.result == 'success' && needs.gather-duplicates-all.outputs.has_matches != 'true' }}
156+
# Pass 1 Codex execution drops sudo on its runner, so run the fallback in a fresh job.
157+
needs: normalize-duplicates-all
158+
if: ${{ needs.normalize-duplicates-all.result == 'success' && needs.normalize-duplicates-all.outputs.has_matches != 'true' }}
152159
runs-on: ubuntu-latest
153160
permissions:
154161
contents: read
155162
outputs:
156-
issues_json: ${{ steps.normalize-open.outputs.issues_json }}
157-
reason: ${{ steps.normalize-open.outputs.reason }}
158-
has_matches: ${{ steps.normalize-open.outputs.has_matches }}
163+
codex_output: ${{ steps.codex-open.outputs.final-message }}
159164
steps:
160-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
161-
with:
162-
persist-credentials: false
163-
164165
- name: Prepare Codex inputs
165166
env:
166167
GH_TOKEN: ${{ github.token }}
@@ -203,6 +204,8 @@ jobs:
203204
with:
204205
openai-api-key: ${{ secrets.CODEX_OPENAI_API_KEY }}
205206
allow-users: "*"
207+
safety-strategy: drop-sudo
208+
sandbox: read-only
206209
prompt: |
207210
You are an assistant that triages new GitHub issues by identifying potential duplicates.
208211
@@ -236,10 +239,21 @@ jobs:
236239
"additionalProperties": false
237240
}
238241
242+
normalize-duplicates-open:
243+
name: Normalize pass 2 output
244+
needs: gather-duplicates-open
245+
if: ${{ needs.gather-duplicates-open.result == 'success' }}
246+
runs-on: ubuntu-latest
247+
permissions: {}
248+
outputs:
249+
issues_json: ${{ steps.normalize-open.outputs.issues_json }}
250+
reason: ${{ steps.normalize-open.outputs.reason }}
251+
has_matches: ${{ steps.normalize-open.outputs.has_matches }}
252+
steps:
239253
- id: normalize-open
240254
name: Normalize pass 2 output
241255
env:
242-
CODEX_OUTPUT: ${{ steps.codex-open.outputs.final-message }}
256+
CODEX_OUTPUT: ${{ needs.gather-duplicates-open.outputs.codex_output }}
243257
CURRENT_ISSUE_NUMBER: ${{ github.event.issue.number }}
244258
run: |
245259
set -eo pipefail
@@ -283,9 +297,9 @@ jobs:
283297
select-final:
284298
name: Select final duplicate set
285299
needs:
286-
- gather-duplicates-all
287-
- gather-duplicates-open
288-
if: ${{ always() && needs.gather-duplicates-all.result == 'success' && (needs.gather-duplicates-open.result == 'success' || needs.gather-duplicates-open.result == 'skipped') }}
300+
- normalize-duplicates-all
301+
- normalize-duplicates-open
302+
if: ${{ always() && needs.normalize-duplicates-all.result == 'success' && (needs.normalize-duplicates-open.result == 'success' || needs.normalize-duplicates-open.result == 'skipped') }}
289303
runs-on: ubuntu-latest
290304
permissions:
291305
contents: read
@@ -295,12 +309,12 @@ jobs:
295309
- id: select-final
296310
name: Select final duplicate set
297311
env:
298-
PASS1_ISSUES: ${{ needs.gather-duplicates-all.outputs.issues_json }}
299-
PASS1_REASON: ${{ needs.gather-duplicates-all.outputs.reason }}
300-
PASS2_ISSUES: ${{ needs.gather-duplicates-open.outputs.issues_json }}
301-
PASS2_REASON: ${{ needs.gather-duplicates-open.outputs.reason }}
302-
PASS1_HAS_MATCHES: ${{ needs.gather-duplicates-all.outputs.has_matches }}
303-
PASS2_HAS_MATCHES: ${{ needs.gather-duplicates-open.outputs.has_matches }}
312+
PASS1_ISSUES: ${{ needs.normalize-duplicates-all.outputs.issues_json }}
313+
PASS1_REASON: ${{ needs.normalize-duplicates-all.outputs.reason }}
314+
PASS2_ISSUES: ${{ needs.normalize-duplicates-open.outputs.issues_json }}
315+
PASS2_REASON: ${{ needs.normalize-duplicates-open.outputs.reason }}
316+
PASS1_HAS_MATCHES: ${{ needs.normalize-duplicates-all.outputs.has_matches }}
317+
PASS2_HAS_MATCHES: ${{ needs.normalize-duplicates-open.outputs.has_matches }}
304318
run: |
305319
set -eo pipefail
306320

.github/workflows/issue-labeler.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,13 @@ jobs:
1717
outputs:
1818
codex_output: ${{ steps.codex.outputs.final-message }}
1919
steps:
20-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
21-
with:
22-
persist-credentials: false
23-
2420
- id: codex
2521
uses: openai/codex-action@5c3f4ccdb2b8790f73d6b21751ac00e602aa0c02 # v1.7
2622
with:
2723
openai-api-key: ${{ secrets.CODEX_OPENAI_API_KEY }}
2824
allow-users: "*"
25+
safety-strategy: drop-sudo
26+
sandbox: read-only
2927
prompt: |
3028
You are an assistant that reviews GitHub issues for the repository.
3129

.github/workflows/rust-release-prepare.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ jobs:
1616
prepare:
1717
# Prevent scheduled runs on forks (no secrets, wastes Actions minutes)
1818
if: github.repository == 'openai/codex'
19+
environment:
20+
name: rust-release-prepare
21+
deployment: false
1922
runs-on: ubuntu-latest
2023
steps:
2124
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

0 commit comments

Comments
 (0)