fix(images): pin agent CLIs to work around Bun exec crash (#566) - #572
Open
jonwiggins wants to merge 1 commit into
Open
fix(images): pin agent CLIs to work around Bun exec crash (#566)#572jonwiggins wants to merge 1 commit into
jonwiggins wants to merge 1 commit into
Conversation
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.
Summary
Pins the two Bun-compiled agent CLIs in
images/base.Dockerfileto their last-known-good, pre-regression versions to work around an upstream Bun crash that Optio's execution model always triggers.Fixes #566.
Root cause
Recent releases of
@anthropic-ai/claude-codeandopencodeship as Bun-compiled single-file executables. Bun 1.3.12–1.3.14 have a regression (oven-sh/bun#31832) where the binary segfaults on startup withembedder failed to suspend thread ... for TLCwhen it is launched viadocker exec/kubectl exec— i.e. not as PID 1 — on Linux kernel ≥ 7.0. The bisect in the upstream issue confirms 1.3.11 is the last working version.Optio always execs the agent inside the long-lived pod-per-repo (
repo-pool-service.tsexecTaskInRepoPod), so this is exactly the failing configuration. We cannot make the agent PID 1 without abandoning pod-per-repo, so the fix is to pin the CLIs to versions that are not built with the broken Bun until upstream ships a fix.Versions chosen (and why)
@anthropic-ai/claude-code→2.1.1122.1.112(published 2026-04-16) is the last release shipped as a plain Node.js bundle (bin: cli.js) — it does not use Bun at all, so it cannot hit this crash.2.1.113(2026-04-17) is the first Bun-compiled build (bin: bin/claude.exe, adds@anthropic-ai/claude-code-<platform>native optionalDependencies). I extracted the linux-x64 binary and confirmed it embeds Bun1.3.13+743d2a40e— already in the broken range. There is therefore no Bun-compiled claude-code build on a safe Bun;2.1.112is the newest safe version.time/versionsmetadata for thebin+ optionalDependency transition, plusstringson the extracted Linux binary for the embeddedbun-vX.Y.Z/X.Y.Z+<githash>revision marker.opencode→1.14.201.14.20(2026-04-21) → Bun1.3.11+af24e281e(safe)1.14.21(2026-04-23) → Bun1.3.13+bf2e2cecf(broken)1.18.11, is on Bun 1.3.13/1.3.14 (broken) — the transition is monotonic, no later revert.1.14.20is the newest opencode built on a safe Bun.https://opencode.ai/install) pins via theVERSIONenv var. TheOPENCODE_VERSIONbuild-arg was previously declared but never passed through to the script, solatestwas always installed regardless of the arg — this PR wires it through (VERSION="${OPENCODE_VERSION}").Other agent CLIs in the image are unaffected:
@openai/codex(Rust),@github/copilot(already pinned),@google/gemini-cli(Node) are not Bun single-file executables.Verification
docker build -t optio-base-test:pr -f images/base.Dockerfile .— succeeds.claude --version→2.1.112 (Claude Code),opencode --version→1.14.20.pnpm format:check— passes.Note
This is a temporary pin. Both pins have
TODO(#566)comments referencing oven-sh/bun#31832; revert tolatest(or an unpinned install) once upstream Bun ships a fix and the CLIs adopt it.