Uh oh!
There was an error while loading. Please reload this page.
fix(server): use Codex native updater - #8354
Conversation
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
| versionedUpdate: { | ||
| minimumVersion: versionedNativeUpdate.minimumVersion, | ||
| update: { | ||
| command: [commandExecutable, ...versionedNativeUpdate.args].join(" "), |
There was a problem hiding this comment.
🟡 Mediumprovider/providerMaintenance.ts:312
The versioned advisory displays codex update when binaryPath is the bare codex, even though the one-click runner executes the resolved path such as /opt/.../codex. Users copying the advisory command therefore resolve it in their shell and may update a different Codex installation; build the displayed command from resolvedCommandPath ?? commandExecutable as well.
| command: [commandExecutable, ...versionedNativeUpdate.args].join(" "), | |
| command: [resolvedCommandPath??commandExecutable, ...versionedNativeUpdate.args].join(" "), |
🤖 Copy this AI Prompt to have your agent fix this:
In file @apps/server/src/provider/providerMaintenance.ts around line 312:
The versioned advisory displays `codex update` when `binaryPath` is the bare `codex`, even though the one-click runner executes the resolved path such as `/opt/.../codex`. Users copying the advisory command therefore resolve it in their shell and may update a different Codex installation; build the displayed `command` from `resolvedCommandPath ?? commandExecutable` as well.
ikifar2012
commented
Aug 27, 2026
ApprovabilityVerdict: Would Approve Macroscope's review found this PR approvable — This is a focused Codex provider-maintenance fix that selects the native updater only for supported versions while preserving existing fallback behavior, with targeted tests for the affected paths. A separate unresolved Medium-severity finding concerns the displayed advisory command versus the executable actually run and should be considered by the correctness review. Not approved because:
Adjust the Minimum Blocking Severity for this repo — including turning it Off — in Settings. You can add or adjust custom eligibility rules. Learn more. |
Codex now owns installation-method detection through its native
updatecommand, but T3 Code still selected npm, Bun, pnpm, Vite+, or Homebrew itself. That prevented one-click updates for standalone installations and could target a different installation than the configured Codex binary.This adds a version-aware maintenance action that uses
codex updatefor Codex 0.128.0 and newer, invoking the exact resolved provider executable. Older Codex versions keep the existing package-manager fallback because they predate the native command. The advisory and execution paths share the same selector so the command shown to users is the command T3 Code runs.Verification:
vp test run apps/server/src/provider/providerMaintenance.test.ts apps/server/src/provider/providerMaintenanceRunner.test.tsvp lint --report-unused-disable-directiveson the five changed filesvp run --filter t3 typecheckvp stagedgit diff --checkImplemented with gpt-5.6-sol through the Codex harness in T3 Code.
Note
Medium Risk
Changes how provider update commands are chosen and executed for Codex and package-managed providers; wrong version gating could run the wrong updater or block valid updates.
Overview
Provider maintenance now supports a version-gated native update alongside the existing npm/Bun/pnpm/Homebrew fallbacks. Drivers can declare
versionedNativeUpdatewith a minimum semver; once the installed provider meets that floor, T3 Code prefers the provider-owned command (resolved executable + args) instead of inferring a package manager from the binary path.Codex is wired to run
codex updatefor 0.128.0+, using the configured/resolved Codex binary. Older Codex versions keep the previous package-manager update path because the native command did not exist yet.The version advisory (
updateCommand/canUpdate) and one-click update runner both go throughresolveProviderMaintenanceUpdate, so the UI shows the same command the server executes. For standalone installs where the fallback is manual-only, one-click updates stay disabled until the installed version is high enough to use the native updater.Reviewed by Cursor Bugbot for commit e228530. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Use Codex native updater for versions >= 0.128.0
versionedNativeUpdatetoPackageManagedProviderMaintenanceDefinition, allowing providers to declare a native updater that activates at or above a minimum versioncodex updateas its native updater, gated at version 0.128.0; older versions fall back to the existing package-manager update pathresolveProviderMaintenanceUpdateselects the effective update command based on the installed version, andProviderMaintenanceRunner.updateProvidernow uses it instead ofcapabilities.updatedirectlycreateProviderVersionAdvisoryreports the native update command only when the installed version meets the minimumversionedNativeUpdateand have an installed version below the minimum will report no available update viaresolveProviderMaintenanceUpdatein providerMaintenance.ts; verify no existing provider relies solely on versioned updates without a fallbackupdatefield📊 Macroscope summarized e228530. 3 files reviewed, 2 issues evaluated, 1 issue filtered, 1 comment posted
🗂️ Filtered Issues
apps/server/src/provider/providerMaintenance.ts — 1 comment posted, 2 evaluated, 1 filtered
commandconcatenates an arbitrary configured executable path without shell quoting. A supported direct binary path such asC:\Program Files\Codex\codex.exetherefore produces the copyable manual instructionC:\Program Files\Codex\codex.exe update, which a shell parses as commandC:\Programand fails, even though the one-click runner can execute the path correctly. [ Out of scope (post-validation triage) ]