Repository navigation
codex: install CLI from npm prebuilt instead of building from source - #522
Merged
Merged
Conversation
PR #21396 (the `codex plugin add` subcommand tend needs) is now available on npm via the `alpha` dist-tag — verified that `@openai/[email protected]` ships a prebuilt binary with `codex plugin add`, installing in ~3 s with no Rust toolchain. Replace the four build steps (Cache codex / Set up Rust / Build / Verify) and the cargo-from-source path (~22 min cold) with a single `npm install -g` of a pinned alpha. `codex_version` becomes an npm version string (default `0.131.0-alpha.22`); npm `latest` (0.130.0) still predates #21396, so the default pins an explicit alpha rather than tracking `latest`. Comment date-stamped since that state drifts. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
tend-agent
approved these changes
May 16, 2026
max-sixty
added a commit
that referenced
this pull request
May 16, 2026
## Summary Release 0.0.21 — makes the Codex harness functional on GitHub Actions runners. 3 commits since 0.0.20: - #519 — codex sandbox defaults to `danger-full-access` for CI (the runner VM is the isolation boundary; `bwrap` isn't on the runner image) - #521 — random heredoc delimiter for `final_message` output (static `TEND_EOF` broke on awkward agent output) - #522 — codex CLI installed from npm prebuilt instead of ~45min source build ## Test plan - [ ] CI green (test, test-worker, lint) - [ ] After merge: tag `0.0.21`, PyPI publish succeeds, `uvx [email protected] --help` works - [ ] Regenerate tend's own workflows to pin `@0.0.21` Co-authored-by: Claude <[email protected]>
1 task
max-sixty
added a commit
that referenced
this pull request
May 16, 2026
Routine post-release regen. Pins the eight `tend-*.yaml` workflows to `max-sixty/[email protected]`. Until this merges, tend's deployed workflows lag the just-released generator. 0.0.21 makes the Codex harness functional on GHA (#519/#521/#522); tend itself stays on the Claude harness — only the pinned action version changes here. ## Test plan - [ ] CI green (test, test-worker, lint) Co-authored-by: Claude <[email protected]>
max-sixty
added a commit
that referenced
this pull request
May 16, 2026
0.0.21 carries the three fixes that make the Codex harness work on GHA: sandbox defaults to danger-full-access (#519), npm prebuilt install (#522), random heredoc delimiter for output (#521). Co-Authored-By: Claude <[email protected]>
This was referenced May 16, 2026
max-sixty
added a commit
that referenced
this pull request
May 16, 2026
## Summary Flips tend's own CI from the Claude harness to the Codex harness by setting `harness: codex` in `.config/tend.yaml` and regenerating the eight `tend-*.yaml` workflows. Each now invokes `max-sixty/tend/[email protected]` with `CODEX_AUTH_JSON` instead of `max-sixty/tend@<v>` with `CLAUDE_CODE_OAUTH_TOKEN`. Motivation is cost: API billing scales per token; a flat-rate ChatGPT subscription funds unlimited runs. tend dogfoods its own setup, so it should run the harness we recommend for cost-sensitive adopters. The net diff is small — config (+ `harness: codex`, + `secrets.allowed: [CODEX_AUTH_JSON]`) and the regenerated workflow files (action ref, auth secret, model, skill-invocation syntax). Supporting infrastructure landed separately on main: - `codex-auth-refresh.yaml` + env-scoped `CODEX_REFRESH_PAT` rotation (#500, #510) - `CODEX_AUTH_JSON` as a repo secret, refresher writes it back at repo scope (#514) - Codex-on-GHA fixes, all in release 0.0.22: sandbox `danger-full-access` (#519), npm prebuilt install (#522), base64 `final_message` capture (#525) ## Validation The original "do not merge until…" prerequisite is **satisfied**: - `tend-review-runs` `workflow_dispatch` on this branch (pinned `[email protected]`) ran **green end-to-end** — codex authenticated, installed via npm, ran without the `bwrap` block, executed the full agent (real review-runs work: posted evidence to the tracking issue, commented on the outage issue), and the action exited 0. - Deterministic CI (`test`, `test-worker`, `lint`) green; `tend-review` (Claude harness via `pull_request_target`) approved. Each codex blocker found during stabilization was fixed and released: auth scoping → sandbox → install → output framing. The smoke test going green on 0.0.22 confirms convergence. ## Post-merge follow-up Watch the first unattended nightly `codex-auth-refresh` cron (`17 3 * * *`) succeed. Manual dispatches (incl. the post-#514 recovery) have all succeeded; this just confirms the scheduled path runs without a human. Failure degrades gracefully over the ~8-day refresh window, with manual rotation as fallback. --------- Co-authored-by: Claude <[email protected]>
max-sixty
added a commit
that referenced
this pull request
May 16, 2026
## Summary Flips tend's own CI from the Claude harness to the Codex harness by setting `harness: codex` in `.config/tend.yaml` and regenerating the eight `tend-*.yaml` workflows. Each now invokes `max-sixty/tend/[email protected]` with `CODEX_AUTH_JSON` instead of `max-sixty/tend@<v>` with `CLAUDE_CODE_OAUTH_TOKEN`. Motivation is cost: API billing scales per token; a flat-rate ChatGPT subscription funds unlimited runs. tend dogfoods its own setup, so it should run the harness we recommend for cost-sensitive adopters. The net diff is small — config (+ `harness: codex`, + `secrets.allowed: [CODEX_AUTH_JSON]`) and the regenerated workflow files (action ref, auth secret, model, skill-invocation syntax). Supporting infrastructure landed separately on main: - `codex-auth-refresh.yaml` + env-scoped `CODEX_REFRESH_PAT` rotation (#500, #510) - `CODEX_AUTH_JSON` as a repo secret, refresher writes it back at repo scope (#514) - Codex-on-GHA fixes, all in release 0.0.22: sandbox `danger-full-access` (#519), npm prebuilt install (#522), base64 `final_message` capture (#525) ## Validation The original "do not merge until…" prerequisite is **satisfied**: - `tend-review-runs` `workflow_dispatch` on this branch (pinned `[email protected]`) ran **green end-to-end** — codex authenticated, installed via npm, ran without the `bwrap` block, executed the full agent (real review-runs work: posted evidence to the tracking issue, commented on the outage issue), and the action exited 0. - Deterministic CI (`test`, `test-worker`, `lint`) green; `tend-review` (Claude harness via `pull_request_target`) approved. Each codex blocker found during stabilization was fixed and released: auth scoping → sandbox → install → output framing. The smoke test going green on 0.0.22 confirms convergence. ## Post-merge follow-up Watch the first unattended nightly `codex-auth-refresh` cron (`17 3 * * *`) succeed. Manual dispatches (incl. the post-#514 recovery) have all succeeded; this just confirms the scheduled path runs without a human. Failure degrades gracefully over the ~8-day refresh window, with manual rotation as fallback. --------- Co-authored-by: Claude <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tend's Codex action built the CLI from source via
cargo install --gitat a pinned tag — ~22 min on a cache miss, plus a Rust toolchain and a binary-cache layer to make hits fast. We did this because thecodex plugin addsubcommand tend needs (PR #21396, merged 2026-05-14) postdated every npm release.That PR is now on npm. PR #21396 first appears in release tag
rust-v0.131.0-alpha.17(verified via merge-commit ancestry:alpha.16diverged from it,alpha.17+ contain it). On npm it's published on thealphadist-tag —latest/stable is still0.130.0and lacks it. I installed@openai/[email protected]from npm into a scratch dir and confirmed directly: prebuilt per-platform binary, ~3 s install,codex plugin --helplistsadd/marketplace/list/remove.This performs the cut-over the old comment documented: the four build steps (Cache codex / Set up Rust / Build / Verify) and the commented swap-in block are gone, replaced by a single
npm install -g "@openai/codex@${codex_version}".codex_versionbecomes an npm version string (default0.131.0-alpha.22); since npmlatestpredates #21396, the default pins an explicit alpha rather than trackinglatest. The empty-string fallback from the old commented block is dropped — itselseresolved tolatest(0.130.0), which silently lacks the subcommand; one canonical pinned path is correct and lower-cardinality. The explanatory comment is rewritten and date-stamped (the npm version-state note drifts).Net: ~22 min cold build (and the toolchain + cache machinery) gone; install is ~3 s prebuilt, works without the GitHub release path.
Scope is the codex install region + the
codex_versioninput only. Not touched: thefinal_message/TEND_EOFheredoc (handled separately oncodex-final-message-delimiter), thesandboxdefault (#519), the generator.pre-commit run --all-files(incl. actionlint) andwt test(230 passed, 0 regtest changes — action-internal) both green.🤖 Generated with Claude Code