Managed Codex Windows install exceeds extraction budget and hides the failure reason
Description
Managed Codex installation and update on Windows x64 reject the official rust-v0.163.0 package because Happier 0.2.16 applies an obsolete 384 MiB total extraction ceiling. The desktop update row then replaces the specific extraction error with "The update didn't finish. Try again."
Reported by @RogueKostas in https://github.com/happier-dev/happier/issues/626#issuecomment-6321705407 and https://github.com/happier-dev/happier/issues/626#issuecomment-6327524169. This is separate from #626's Claude npm-wrapper launch correction.
Verified evidence
The official codex-package-x86_64-pc-windows-msvc.tar.gz from rust-v0.163.0 was downloaded and inspected without executing its contents. SHA-256 901028b285614a9974f431f9d9f6534b3e5ed8d62eba4ba64f4762c00f040522 matched GitHub's published digest.
- Compressed bytes: 162,230,206.
- Expanded regular-file bytes: 465,689,987.
- Current 0.2 total ceiling: 402,653,184 bytes (384 MiB).
- Largest file: 341,270,320 bytes, below the existing per-file ceiling.
- All four declared Windows runtime members are present; no missing-member failure was established.
The immutable cli-v0.2.16 source and current 0.2 source retain that budget in packages/agents/src/providers/providerCliRuntime.ts. The installer extracts the complete archive before publishing its declared runtime members, and promotes a candidate only after successful validation. Both install and managed update share this path, so extraction failure leaves the previous runtime active.
apps/ui/sources/updates/machineUpdateRuns.ts accepts short runtime messages only when they end in punctuation. [release-runtime] archive exceeds expanded-byte limit does not, so the useful reason falls back to generic retry wording. The CLI also maps this error to the generic install-failed code.
Reproduction
- On Windows x64 with Happier stable 0.2.16, request a managed Codex installation, or update an existing managed installation, while the official release resolver selects rust-v0.163.0.
- Observe extraction fail at the total expanded-byte limit before promotion.
- In the desktop update UI, observe the generic retry message while the provider-install log contains the specific extraction failure.
The reporter observed the Windows flow. The independent check here verified the official archive, digest, release source and error-propagation code; a full Windows desktop replay has not been performed.
Expected behavior and correction scope
- Admit supported official Codex packages through the existing canonical installer and archive extractor.
- Retain digest verification, path/link protections, bounded extraction, explicit runtime-member validation and candidate promotion semantics.
- Reuse the existing owner-level budget rather than adding another provider-specific cutoff or bypass. The 0.3 Codex manifest already uses a 512 MiB total budget and retains 384 MiB per-file.
- Preserve a safe structured expanded-size failure reason through the existing CLI capability result and update-row mapping; do not expose arbitrary installer output or rely on punctuation.
- Cover archive-size admission and refusal, old-runtime preservation, and the UI's specific failure while keeping raw log details behind View log.
0.3 applicability: its existing total budget already admits the measured archive size, although its managed runtime is pinned to 0.162.1; that is not a claim of full 0.163.0 runtime support. The update-message filtering gap remains applicable.
AI-assisted diagnosis with OpenAI Codex. Public reporter evidence and official release bytes were used; no private diagnostics or session data are included.
Confirmed: Codex 0.163.0's Windows archive expands to 465,689,987 bytes, exceeding Happier's previous allowance. The source correction accepts it and displays actionable extraction errors. Please retry on the next stable release and report whether installation completes.
Posted on behalf of @leeroybrun.
Recurrence on stable CLI/daemon 0.2.20 with official Codex 0.166.0
The managed Codex Windows update is blocked again after the earlier extraction-budget correction. The UI now shows a specific extraction-size error followed by advice to update Happier before retrying, but the installed CLI and running daemon are already both 0.2.20, the current stable CLI release checked for this report. The update advice does not provide a usable resolution in this state.
Machine-scope clarification: the user reports this failure on another Windows machine. A separate read-only check on that affected machine also confirmed installed CLI 0.2.20, a live daemon recorded as 0.2.20, and the same 384 MiB per-file / 512 MiB total limits in its installed provider manifest. The downloaded archive inspection and generic installer-log excerpt below came from the investigating machine, which had the same installer limit and a matching local failure log. An installer-log excerpt from the user's affected machine was not captured. No machine identities are published here.
This is a new measured archive-size recurrence of #660, rather than evidence that the original 0.163.0 correction was absent. The installed provider manifest does contain the corrected 512 MiB total ceiling and 384 MiB per-file ceiling.
Verified archive and budget
- Official release:
openai/codextagrust-v0.166.0. - Official asset:
codex-package-x86_64-pc-windows-msvc.tar.gz. - Compressed bytes: 202,589,789.
- SHA-256:
d559bb88e74d471265857b93b7f19bc250dae527673b9191b33534478093f6bc, matching the digest published by GitHub for that asset. - Expanded regular-file bytes: 586,895,585 (about 559.7 MiB).
- Happier 0.2.20
maxExpandedBytes: 536,870,912 (512 MiB). - Largest file,
bin/codex.exe: 371,735,856 bytes, belowmaxFileBytes402,653,184 (384 MiB). - All four currently declared Windows runtime members are present. No missing-member failure was established by this inspection.
The recent provider-install log reports:
# providerId: codex
# platform: win32
# installMode: github_release_binary
# requiresAdmin: 0
[release-runtime] archive exceeds expanded-byte limit
The installed definition is in @happier-dev/agents/dist/providers/providerCliRuntime.js, corresponding to packages/agents/src/providers/providerCliRuntime.ts at cli-v0.2.20. Its limits remain:
maxFileBytes: 384 * 1024 * 1024
maxExpandedBytes: 512 * 1024 * 1024
The official archive also contains additional runtime material beyond the four currently declared managed members, including bin/codex-exec-server.exe (84,244,784 bytes) and a voice runtime with supporting libraries. Those files contribute to the expanded archive size. This report does not establish which of those additional members Codex now requires, and is not a recommendation to discard them without dependency validation.
Method and scope
The official asset was downloaded, its SHA-256 checked against GitHub's release metadata, and every tar header inspected through a read-only streaming reader. Expanded size is the sum of regular-file sizes. No executable was extracted or run, and no successful replacement installation is claimed. The actual local failure is independently supported by the managed installer log. The installed CLI selector and live daemon state both identify version 0.2.20; this is not merely a desktop showing a newer UI while an older daemon remains active.
Expected correction and regression checks
Please recalibrate the existing bounded installer path for currently supported official Codex archives, while retaining digest verification, traversal/link protection, file-count limits, per-file limits, validation and atomic promotion. If extraction is narrowed to a declared member set, audit the new package layout and runtime dependencies first.
Please also make the error actionable when the invoking CLI/daemon already matches the latest stable release: identify the affected runtime and effective limit, preserve View log, and distinguish an unsupported/new package from a stale Happier installation. Repeatedly advising an already-current user to update Happier leads to an unproductive retry loop.
Add the digest-verified 0.166.0 archive sizes and layout to regression coverage, alongside the earlier 0.163.0 case, and verify that failure preserves the previously active runtime. This report does not claim the latest development branch has or lacks a further fix; please identify the release containing the correction when available.
No private paths, account details, project information, hostnames, session/process identifiers, credentials, raw logs beyond the generic installer error above, screenshots or attachments are included. Archive paths and the digest above belong to the public official release.
Still failing on stable CLI 0.2.21 with Codex 0.171/0.172 — the per-file limit, not the total
Managed Codex install on Windows x64 (Windows 11 build 26220), Happier CLI 0.2.21 (stable, 2026-11-17), happier install provider codex:
# installMode: github_release_binary
# progress: fetching-release
# progress: downloading bytes=218274372/218274372
[release-runtime] archive file exceeds its byte limit
The download is the official codex-package-x86_64-pc-windows-msvc.tar.gz (218,274,372 bytes, the same size as the rust-v0.172.0 asset).
The message is the per-file check, not the expanded-total one that d38e7104 raised. On main, packages/release-runtime/src/archiveExtraction.ts throws archive file exceeds its byte limit when an entry exceeds limits.maxFileBytes. That is 256 * 1024 * 1024 in DEFAULT_ARCHIVE_EXTRACTION_LIMITS, and FIRST_PARTY_RELEASE_ARCHIVE_EXTRACTION_LIMITS does not raise it. The original report above measured the largest member of the 0.163.0 Windows package at 341,270,320 bytes, which is already over 256 MiB, and later releases are larger.
The archive size (218 MB) and the 1 GiB expanded total are within their limits, so raising only maxFileBytes for the Codex provider archive (or deriving it from the release's declared sizes) looks like the minimal fix. The same install succeeds on Linux x64 with 0.2.21.