Skip to content

Use codex update for standalone installs#4185

Open
BearHuddleston wants to merge 3 commits into
pingdotgg:mainfrom
BearHuddleston:agent/codex-standalone-update
Open

Use codex update for standalone installs#4185
BearHuddleston wants to merge 3 commits into
pingdotgg:mainfrom
BearHuddleston:agent/codex-standalone-update

Conversation

@BearHuddleston

@BearHuddleston BearHuddleston commented Jul 20, 2026

Copy link
Copy Markdown

What Changed

  • Recognize Codex binaries installed by the normal ~/.codex standalone installer.
  • Run the supported codex update command instead of treating those installs as npm-managed.
  • Execute the update through the Codex path resolved for that provider instance while preserving codex update as the displayed command.
  • Cover standalone detection and resolved-executable targeting in focused provider-maintenance tests.

Why

Standalone Codex installations are not managed by npm. Codex already owns its platform-specific self-update flow, so T3 Code only needs to delegate to codex update using the same executable it detected for the provider instance.

This supersedes #3626 with the minimal default-install behavior. Custom CODEX_HOME targeting and version-pinned release paths are intentionally outside this PR.

Validation

  • ./node_modules/.bin/vp test run apps/server/src/provider/providerMaintenance.test.ts apps/server/src/provider/Layers/ProviderInstanceRegistryLive.test.ts
  • ./node_modules/.bin/vp check apps/server/src/provider/Drivers/CodexDriver.ts apps/server/src/provider/Layers/ProviderInstanceRegistryLive.test.ts apps/server/src/provider/providerMaintenance.test.ts apps/server/src/provider/providerMaintenance.ts
  • ./node_modules/.bin/vp run --filter t3 typecheck

Checklist

  • This PR is small and focused.
  • I explained what changed and why.
  • I included before/after screenshots for any UI changes. (Not applicable; this PR has no UI changes.)
  • I included a video for animation/interaction changes. (Not applicable; this PR has no animation or interaction changes.)

Note

Enable codex update for standalone Codex installs

  • Adds isCodexStandaloneCommandPath helper in CodexDriver.ts that detects if the active binary path is a standalone Codex install (under /.codex/packages/standalone/).
  • Sets nativeUpdate in the maintenance resolver to run codex update (with lockKey codex-native) when the helper returns true.
  • Adds a test case in ProviderInstanceRegistryLive.test.ts verifying that a standalone binary path produces the expected maintenanceCapabilities update block.

Macroscope summarized d91cc75.


Note

Low Risk
Scoped to provider maintenance capability detection and update command wiring; no auth or session runtime changes.

Overview
Standalone Codex binaries under ~/.codex/packages/standalone/ are now recognized as native installs, so in-app provider updates run codex update instead of falling back to npm/Homebrew-style maintenance.

Codex driver adds isCodexStandaloneCommandPath and wires nativeUpdate with lock key codex-native, matching how other providers delegate to their own updater.

Provider maintenance gains optional useResolvedExecutable: when set, the update action runs the resolved binary path from capability detection while keeping a human-readable command string (e.g. codex update). Registry tests assert the work Codex instance exposes the expected maintenanceCapabilities for a standalone path.

Reviewed by Cursor Bugbot for commit 14bbd62. Bugbot is set up for automated code reviews on this repo. Configure here.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Jul 20, 2026
@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 5480e384-8709-466f-833f-38cb7648218d

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@BearHuddleston
BearHuddleston marked this pull request as ready for review July 20, 2026 13:43
@macroscopeapp

macroscopeapp Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Needs human review

Enables native update functionality for Codex standalone installs by populating nativeUpdate configuration that was previously null. This activates new runtime behavior (update commands) and warrants human review to verify the intended scope.

You can customize Macroscope's approvability policy. Learn more.

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want fixes drafted automatically? Bugbot Autofix can create code changes for findings. A team admin can enable Autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit d91cc75. Configure here.

Comment thread apps/server/src/provider/Drivers/CodexDriver.ts
@github-actions github-actions Bot added size:M 30-99 changed lines (additions + deletions). and removed size:S 10-29 changed lines (additions + deletions). labels Jul 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant