Commit Graph
93 Commits
Author SHA1 Message Date
James Peter 10d8ff5c93 Merge upstream/main: refresh mirror and keep fork docs/workflows 2026-03-23 12:46:21 +10:00
pakrym-oaiandGitHub 606512066a Add remote env CI matrix and integration test (#14869)
`CODEX_TEST_REMOTE_ENV` will make `test_codex` start the executor
"remotely" (inside a docker container) turning any integration test into
remote test.
2026-03-20 08:02:50 -07:00
James Peter 8ad770d907 Merge upstream/main: keep local workflows and mirror refresh 2026-03-12 22:18:04 +10:00
Owen LinandGitHub dd63d79076 check for large binaries in CI (#14382)
Prevent binaries >500KB from being committed. And maintain an allowlist
if we need to bypass on a case-by-case basis.

I checked the currently tracked binary-like assets in the repo. There
are only 5 obvious committed binaries by extension/MIME type:
- `.github/codex-cli-splash.png`: `838,131` bytes, about `818 KiB`
- `codex-rs/vendor/bubblewrap/bubblewrap.jpg`: `40,239` bytes, about `39
KiB`
-
`codex-rs/skills/src/assets/samples/skill-creator/assets/skill-creator.png`:
`1,563` bytes
- `codex-rs/skills/src/assets/samples/openai-docs/assets/openai.png`:
`1,429` bytes
-
`codex-rs/skills/src/assets/samples/skill-installer/assets/skill-installer.png`:
`1,086` bytes

So `500 KB` looks like a good default for this repo. It would only trip
on one existing intentional asset, which keeps the allowlist small and
the policy easy to understand.

Here's a smoke-test from a throwaway branch that tries to commit a large
binary:
https://github.com/openai/codex/actions/runs/22971558828/job/66689330435?pr=14383
2026-03-11 22:39:08 +00:00
James Peter 0392b6e179 feat(core): queue post-turn review input and add memory guard 2026-03-07 19:18:41 +10:00
James Peter 6c5f5b492b Merge upstream/main: sync Bazel deps and installer docs 2026-03-06 06:22:59 +10:00
EFRAZER-oaiandGitHub 0442f8fb7d Add Windows direct install script (#12741)
## Summary
- add a direct install script for Windows at
`scripts/install/install.ps1`
- extend release staging so `install.ps1` is published alongside
`install.sh`
- install the Windows runtime payload (`codex.exe`, `rg.exe`, and helper
binaries) from the existing platform npm package

## Dependencies
- Depends on https://github.com/openai/codex/pull/12740

## Testing
- Smoke-tested with powershell
2026-03-03 09:25:50 -08:00
James Peter 6c578a2931 Merge upstream/main: keep local policy docs/workflows 2026-02-27 02:50:01 +10:00
EFRAZER-oaiandGitHub e428cfec65 Add macOS and Linux direct install script (#12740)
## Summary
- add a direct install script for macOS and Linux at
`scripts/install/install.sh`
- stage `install.sh` into `dist/` during release so it is published as a
GitHub release asset
- reuse the existing platform npm payload so the installer includes both
`codex` and `rg`

## Testing
- `bash -n scripts/install/install.sh`
- local macOS `curl | sh` smoke test against a locally served copy of
the script
2026-02-26 00:33:50 +00:00
James Peter 71cf862175 Merge upstream/main: keep local workflows/docs; take upstream core updates 2026-02-15 14:25:08 +10:00
Josh McKinneyandGitHub 9cb501c623 bazel: enforce MODULE.bazel.lock sync with Cargo.lock (#11790)
## Why this change

When Cargo dependencies change, it is easy to end up with an unexpected
local diff in
`MODULE.bazel.lock` after running Bazel. That creates noisy working
copies and pushes lockfile fixes
later in the cycle. This change addresses that pain point directly.

## What this change enforces

The expected invariant is: after dependency updates, `MODULE.bazel.lock`
is already in sync with
Cargo resolution. In practice, running `bazel mod deps` should not
mutate the lockfile in a clean
state. If it does, the dependency update is incomplete.

## How this is enforced

This change adds a single lockfile check script that snapshots
`MODULE.bazel.lock`, runs
`bazel mod deps`, and fails if the file changes. The same check is wired
into local workflow
commands (`just bazel-lock-update` and `just bazel-lock-check`) and into
Bazel CI (Linux x86_64 job)
so drift is caught early and consistently. The developer documentation
is updated in
`codex-rs/docs/bazel.md` and `AGENTS.md` to make the expected flow
explicit.

`MODULE.bazel.lock` is also refreshed in this PR to match the current
Cargo dependency resolution.

## Expected developer workflow

After changing `Cargo.toml` or `Cargo.lock`, run `just
bazel-lock-update`, then run
`just bazel-lock-check`, and include any resulting `MODULE.bazel.lock`
update in the same change.

## Testing

Ran `just bazel-lock-check` locally.
2026-02-14 02:11:19 +00:00
Michael BolinandGitHub e8efc0b715 # Use @openai/codex dist-tags for platform binaries instead of separate package names (#11339)
https://github.com/openai/codex/pull/11318 introduced logic to publish
platform artifacts as separate npm packages (for example,
`@openai/codex-darwin-arm64`, `@openai/codex-linux-x64`, etc.). That
requires provisioning and maintaining multiple package entries in npm,
which we want to avoid.

We still need to keep the package-size mitigation (platform-specific
payloads), but we want that layout to live under a single npm package
namespace (`@openai/codex`) using dist-tags.

We also need to preserve pre-release workflows where users install
`@openai/codex@alpha` and get platform-appropriate binaries.

Additionally, we want GitHub Release assets to group Codex npm tarballs
together, so platform tarballs should follow the same `codex-npm-*`
filename prefix as the main Codex tarball.

## Release Strategy (New Scheme)

We publish **one npm package name for Codex binaries** (`@openai/codex`)
and use **dist-tags** to select platform-specific payloads. This avoids
creating separate platform package names while keeping the package size
split by platform.

### What gets published

#### Mainline release (`x.y.z`)

- `@openai/codex@latest` (meta package)
- `@openai/codex@darwin-arm64`
- `@openai/codex@darwin-x64`
- `@openai/codex@linux-arm64`
- `@openai/codex@linux-x64`
- `@openai/codex@win32-arm64`
- `@openai/codex@win32-x64`
- `@openai/codex-responses-api-proxy@latest`
- `@openai/codex-sdk@latest`

#### Alpha release (`x.y.z-alpha.N`)

- `@openai/codex@alpha` (meta package)
- `@openai/codex@alpha-darwin-arm64`
- `@openai/codex@alpha-darwin-x64`
- `@openai/codex@alpha-linux-arm64`
- `@openai/codex@alpha-linux-x64`
- `@openai/codex@alpha-win32-arm64`
- `@openai/codex@alpha-win32-x64`
- `@openai/codex-responses-api-proxy@alpha`
- `@openai/codex-sdk@alpha`

As an example, the `package.json` for `@openai/codex@alpha` (using
`0.99.0-alpha.17` as the `version`) would be:

```
{
  "name": "@openai/codex",
  "version": "0.99.0-alpha.17",
  "license": "Apache-2.0",
  "bin": {
    "codex": "bin/codex.js"
  },
  "type": "module",
  "engines": {
    "node": ">=16"
  },
  "files": [
    "bin"
  ],
  "repository": {
    "type": "git",
    "url": "git+https://github.com/openai/codex.git",
    "directory": "codex-cli"
  },
  "packageManager": "[email protected].2+sha512.41872f037ad22f7348e3b1debbaf7e867cfd448f2726d9cf74c08f19507c31d2c8e7a11525b983febc2df640b5438dee6023ebb1f84ed43cc2d654d2bc326264",
  "optionalDependencies": {
    "@openai/codex-linux-x64": "npm:@openai/[email protected].0-alpha.17-linux-x64",
    "@openai/codex-linux-arm64": "npm:@openai/[email protected].0-alpha.17-linux-arm64",
    "@openai/codex-darwin-x64": "npm:@openai/[email protected].0-alpha.17-darwin-x64",
    "@openai/codex-darwin-arm64": "npm:@openai/[email protected].0-alpha.17-darwin-arm64",
    "@openai/codex-win32-x64": "npm:@openai/[email protected].0-alpha.17-win32-x64",
    "@openai/codex-win32-arm64": "npm:@openai/[email protected].0-alpha.17-win32-arm64"
  }
}
```

Note that the keys in `optionalDependencies` have "clean" names, but the
values have the tag embedded.

### Important note

**Note:** Because we never created the new platform package names on npm
(for example,
`@openai/codex-darwin-arm64`) since #11318 landed, there are no extra
npm packages to clean up.

## What changed

### 1. Stage platform tarballs as `@openai/codex` with platform-specific
versions

File: `codex-cli/scripts/build_npm_package.py`

- Added `CODEX_NPM_NAME = "@openai/codex"` and platform metadata
`npm_tag` values:
- `darwin-arm64`, `darwin-x64`, `linux-arm64`, `linux-x64`,
`win32-arm64`, `win32-x64`
- For platform package staging (`codex-<platform>` inputs), switched
generated `package.json` from:
  - `name = @openai/codex-<platform>`
  to:
  - `name = @openai/codex`
- Added `compute_platform_package_version(version, platform_tag)` so
platform tarballs have unique
versions (`<release-version>-<platform-tag>`), which is required because
npm forbids re-publishing
  the same `name@version`.

### 2. Point meta package optional dependencies at dist-tags on
`@openai/codex`

File: `codex-cli/scripts/build_npm_package.py`

- Updated `optionalDependencies` generation for the main `codex` package
to use npm alias syntax:
- key remains alias package name (for example,
`@openai/codex-darwin-arm64`) so runtime lookup behavior is unchanged
  - value now resolves to `@openai/codex` by dist-tag
- Stable releases emit tags like `npm:@openai/codex@darwin-arm64`.
- Alpha releases (`x.y.z-alpha.N`) emit tags like
`npm:@openai/codex@alpha-darwin-arm64`.

### 3. Publish with per-tarball dist-tags in release CI

File: `.github/workflows/rust-release.yml`

- Reworked npm publish logic to derive the publish tag per tarball
filename:
  - platform tarballs publish with `<platform>` tags for stable releases
- platform tarballs publish with `alpha-<platform>` tags for alpha
releases
- top-level tarballs (`codex`, `codex-responses-api-proxy`, `codex-sdk`)
continue using
the existing channel tag policy (`latest` implicit for stable, `alpha`
for alpha)
- Added fail-fast behavior for unexpected tarball names to avoid silent
mispublishes.

### 4. Normalize Codex platform tarball filenames for GitHub Release
grouping

Files: `scripts/stage_npm_packages.py`,
`.github/workflows/rust-release.yml`

- Renamed staged platform tarball filenames from:
  - `codex-linux-<arch>-npm-<version>.tgz`
  - `codex-darwin-<arch>-npm-<version>.tgz`
  - `codex-win32-<arch>-npm-<version>.tgz`
- To:
  - `codex-npm-linux-<arch>-<version>.tgz`
  - `codex-npm-darwin-<arch>-<version>.tgz`
  - `codex-npm-win32-<arch>-<version>.tgz`

This keeps all Codex npm artifacts grouped under a common `codex-npm-`
prefix in GitHub Releases.

### 5. Documentation update

File: `codex-cli/scripts/README.md`

- Updated staging docs to clarify that platform-native variants are
published as dist-tagged
  `@openai/codex` artifacts rather than separate npm package names.

## Resulting behavior

- Mainline release:
  - `@openai/codex@latest` resolves the meta package
- meta package optional dependencies resolve
`@openai/codex@<platform-tag>`
- Alpha release:
  - users can continue installing `@openai/codex@alpha`
- alpha meta package optional dependencies resolve
`@openai/codex@alpha-<platform-tag>`
- Release assets:
- Codex npm tarballs share `codex-npm-` prefix for cleaner grouping in
GitHub Releases

This preserves platform-specific payload distribution while avoiding
separate npm package names and
improves release-asset discoverability.

## Validation notes

- Verified staged `package.json` output for stable and alpha meta
packages includes expected alias targets.
- Verified staged platform package manifests are `name=@openai/codex`
with unique platform-suffixed versions.
- Verified publish tag derivation maps renamed platform tarballs to
expected stable and alpha dist-tags.
2026-02-10 10:33:47 -08:00
jif-oaiandGitHub 4c210ab702 chore: split NPM packages (#11318) 2026-02-10 14:49:53 +00:00
James Peter 11f99031b8 Merge upstream/main: keep local workflows/docs 2026-01-17 10:22:16 +10:00
pakrym-oaiandGitHub 6144d2efd7 WebSocket test server script (#9175)
Very simple test server to test Responses API WebSocket transport
integration.
2026-01-13 16:21:14 -08:00
James Peter a0d61f32cb feat(core/gh): auto-resolve gh_run_wait defaults 2026-01-02 10:39:58 +10:00
iceweasel-oaiandGitHub f534afc6b9 download new windows binaries when staging npm package (#8203) 2025-12-17 13:34:32 -08:00
James Peter edccb6a38d chore(ci): remove npm token helper and clarify instructions 2025-12-11 07:42:14 +10:00
James Peter d4859adaee chore(ci): add npm token refresh helper and failure hint 2025-12-11 06:33:24 +10:00
James Peter 6ff82d54ea feat(auto-drive): add macOS memwatch dumps and pid tracking 2025-12-09 11:57:27 +10:00
James Peter c95576710d chore(scripts): remove unused helpers 2025-11-27 11:53:56 +10:00
James Peter ea28a5bb40 docs: consolidate user docs and relocate release notes 2025-11-27 10:19:06 +10:00
James Peter e26ccef9a1 fix(build): make path guard git-optional (closes #419) 2025-11-21 10:19:45 +10:00
James Peter 2dbe2a36cd feat(models): add gpt-5.1-codex-max default and migration flow 2025-11-21 00:52:37 +10:00
James Peter 17fbf36575 chore(sync): refresh codex mirror and capture plan 2025-11-15 08:27:31 +10:00
James Peter 6e114418b8 feat(core/models): migrate defaults to gpt-5.1 2025-11-14 08:19:52 +10:00
3640fa2233 fix: ToC so it doesn’t include itself or duplicate the end marker (#4388)
turns out the ToC was including itself when generating, which messed up
comparisons and sometimes made the file rewrite endlessly.

also fixed the slice so `<!-- End ToC -->` doesn’t get duplicated when
we insert the new ToC.

should behave nicely now - no extra rewrites, no doubled markers.

Co-authored-by: Eric Traut <[email protected]>
2025-11-05 14:52:51 -08:00
James Peter 18070bf295 fix(core/responses): default to stable beta header 2025-10-29 11:00:06 +10:00
James Peter b30fbe7d93 fix(homebrew): require real release version 2025-10-28 18:14:12 +10:00
pakrym-oaiandGitHub d60420ad2b Enable plan tool by default (#5384)
## Summary
- make the plan tool available by default by removing the feature flag
and always registering the handler
- drop plan-tool CLI and API toggles across the exec, TUI, MCP server,
and app server code paths
- update tests and configs to reflect the always-on plan tool and guard
workspace restriction tests against env leakage

## Testing
Manually tested the extension. 
------
https://chatgpt.com/codex/tasks/task_i_68f67a3ff2d083209562a773f814c1f9
2025-10-21 16:25:05 +00:00
James Peter 4ab3ffda46 refactor(tools): unify browser tool and normalize agent actions 2025-10-08 16:24:36 +10:00
James Peter b7cb2e7f8b fix(release): ensure release notes header matches tag; add guard check. Fixes #326 2025-10-06 20:23:44 +10:00
James Peter 497ee19ed8 ci(release): reuse dev-fast build for tests and cleanup target 2025-10-06 18:14:50 +10:00
James Peter 517384bf90 test: run nextest in release and harden smokes 2025-10-06 16:26:26 +10:00
James Peter c6409ed66a fix(ci-tests): call --tests for migrated crates 2025-10-06 10:09:39 +10:00
James Peter eaa13aeae4 chore(upstream): strip code branding in docs during diff 2025-10-06 09:07:04 +10:00
James Peter f79a37d48d chore(upstream): drop .DS_Store noise in diff-crates 2025-10-06 09:05:14 +10:00
James Peter 60fd13edee chore(upstream): ignore code prefix in diff crate comparisons 2025-10-06 09:01:17 +10:00
James Peter 158f572c98 chore(upstream): normalize crate rename noise in diff-crates 2025-10-06 08:59:57 +10:00
James Peter 10072a6bb0 fix(workflows): restore release and point to code-rs 2025-10-06 08:54:53 +10:00
James Peter 100db6b093 docs: reset roadmap and add maintenance guides 2025-10-05 20:48:06 +10:00
Code Snapshot 6a26f04c48 code snapshot 2025-10-05 16:22:02 +10:00
James Peter 59f22502c2 chore(workspace): sync codex tree and finish reset plan 2025-10-05 09:04:09 +10:00
James Peter 8c2e22be95 merge(upstream): add automation prompts and exec docs 2025-10-03 14:26:48 +10:00
Michael BolinandGitHub dec4358fd6 chore: introduce publishing logic for @openai/codex-sdk (#4543)
There was a bit of copypasta I put up with when were publishing two
packages to npm, but now that it's three, I created some more scripts to
consolidate things.

With this change, I ran:

```shell
./scripts/stage_npm_packages.py --release-version 0.43.0-alpha.8 --package codex --package codex-responses-api-proxy --package codex-sdk
```

Indeed when it finished, I ended up with:

```shell
$ tree dist
dist
└── npm
    ├── codex-npm-0.43.0-alpha.8.tgz
    ├── codex-responses-api-proxy-npm-0.43.0-alpha.8.tgz
    └── codex-sdk-npm-0.43.0-alpha.8.tgz
$ tar tzvf dist/npm/codex-sdk-npm-0.43.0-alpha.8.tgz
-rwxr-xr-x  0 0      0    25476720 Oct 26  1985 package/vendor/aarch64-apple-darwin/codex/codex
-rwxr-xr-x  0 0      0    29871400 Oct 26  1985 package/vendor/aarch64-unknown-linux-musl/codex/codex
-rwxr-xr-x  0 0      0    28368096 Oct 26  1985 package/vendor/x86_64-apple-darwin/codex/codex
-rwxr-xr-x  0 0      0    36029472 Oct 26  1985 package/vendor/x86_64-unknown-linux-musl/codex/codex
-rw-r--r--  0 0      0       10926 Oct 26  1985 package/LICENSE
-rw-r--r--  0 0      0    30187520 Oct 26  1985 package/vendor/aarch64-pc-windows-msvc/codex/codex.exe
-rw-r--r--  0 0      0    35277824 Oct 26  1985 package/vendor/x86_64-pc-windows-msvc/codex/codex.exe
-rw-r--r--  0 0      0        4842 Oct 26  1985 package/dist/index.js
-rw-r--r--  0 0      0        1347 Oct 26  1985 package/package.json
-rw-r--r--  0 0      0        9867 Oct 26  1985 package/dist/index.js.map
-rw-r--r--  0 0      0          12 Oct 26  1985 package/README.md
-rw-r--r--  0 0      0        4287 Oct 26  1985 package/dist/index.d.ts
```
2025-10-01 08:29:59 -07:00
James Peter 5a471d9677 chore(ci): defer log fetch until run stops 2025-09-25 13:53:51 +10:00
James Peter 617b2e8a93 fix(ci): exit wait script on first failed job 2025-09-25 13:49:40 +10:00
just-every-code 079159abc7 merge(upstream): sync with openai/codex main; build + guards OK
- Resolve merge conflict in codex-rs/Cargo.lock by adopting upstream version (outside prefer-ours globs).
- Add RUSTUP_HOME export in scripts/upstream-merge/verify.sh to avoid CI HOME permission issues during cargo check.
- Verified via scripts/upstream-merge/verify.sh: build-fast OK, API check OK, static guards OK, branding clean.
2025-09-24 17:21:07 +00:00
James Peter 2c54538885 feat(scripts): add failure log dump option
Extend wait-for-gh-run.sh with --failure-logs and fold docs under a How to Git Push section.
2025-09-22 13:31:37 +10:00
James Peter b5b092c0ee feat(scripts): add gh run waiter utility
Introduce wait-for-gh-run.sh to poll workflows and document usage in AGENTS.md.
2025-09-22 12:53:17 +10:00