Hmbown/CodeWhale · critical · RuntimeError
Codewhale install failed: ${(result.stderr or result.stdout)
Error message
Codewhale install failed: ${(result.stderr or result.stdout).strip()[-500:]} What it means
Without binary_path, setup() runs a generated POSIX install script via sh -c: it enforces Linux on x86_64/arm64, bootstraps curl/sha256sum/flock through apt-get or apk, flocks the install dir, downloads three platform assets plus a sha256 manifest from https://github.com/Hmbown/CodeWhale/releases/download/v<version>, verifies every checksum, and installs into /tmp/vf-codewhale/bin. Any non-zero exit raises RuntimeError embedding the last 500 characters of stderr/stdout, which names the failing step.
Source
Thrown at integrations/verifiers-codewhale/codewhale_harness/harness.py:139
self._validate_config()
if self.config.binary_path:
logger.info("codewhale: verifying preinstalled %s", self.binary)
result = await runtime.run([self.binary, "--version"], {})
version_text = f"{result.stdout}\n{result.stderr}"
if result.exit_code != 0 or not _has_version(
version_text, self.config.version
):
raise RuntimeError(
"configured Codewhale binary is unavailable or does not report "
f"version {self.config.version}"
)
return
logger.info("codewhale: ensuring Codewhale %s is installed", self.config.version)
script = _install_script(self.config.version)
result = await runtime.run(["sh", "-c", script], {})
if result.exit_code != 0:
raise RuntimeError(
"Codewhale install failed: "
+ (result.stderr or result.stdout).strip()[-500:]
)
async def launch(
self,
ctx: ModelContext,
trace: Trace,
runtime: Runtime,
endpoint: str,
secret: str,
mcp_urls: dict[str, str],
) -> ProgramResult:
self._validate_config()
system, prompt = self.resolve_prompt(trace.task.data)
trace_key = hashlib.sha256(str(trace.id).encode()).hexdigest()[:32]
home = f".vf-codewhale/{trace_key}"
mcp_path = f"{home}/mcp.json"View on GitHub (pinned to 8880682c63)
Solutions
- Read the 500-char stderr tail embedded in the exception; it identifies the exact failing command
- Verify egress to https://github.com/Hmbown/CodeWhale/releases and retry; transient curl failures clear on a second rollout
- On non-Linux or unusual-arch hosts, preinstall the binary and set binary_path instead
- Confirm the pinned tag has all assets (codewhale-<platform>, codew-<platform>, codewhale-tui-<platform>) and the sha256 manifest
- Bake curl, ca-certificates, coreutils, and util-linux into the image, or preinstall the binaries and use binary_path
Example fix
# before config = CodewhaleHarnessConfig(version='0.9.1') # runtime blocks github.com egress # after config = CodewhaleHarnessConfig(version='0.9.1', binary_path='/opt/codewhale/bin/codewhale')
Defensive patterns
Strategy: retry
Validate before calling
import platform, shutil
installable = (
platform.system() == 'Linux'
and platform.machine() in ('x86_64', 'amd64', 'aarch64', 'arm64')
and shutil.which('curl') is not None
)
if not installable:
config = config.model_copy(update={'binary_path': '/opt/codewhale/bin/codewhale'}) Try / catch
last = None
for attempt in range(3):
try:
await harness.setup(runtime)
break
except RuntimeError as e:
last = e
if 'install failed' not in str(e):
raise
await asyncio.sleep(2 ** attempt)
else:
raise last Prevention
- Allow-list egress to github.com release downloads in training containers
- Pre-bake the pinned binaries and switch to binary_path on locked-down runtimes
- Pin only release tags whose assets and sha256 manifest are fully uploaded
- Bake curl, ca-certificates, coreutils, and util-linux into runtime images
When it happens
Trigger: Non-Linux or unsupported-architecture runtimes; blocked egress to github.com; a release tag missing an asset or its manifest; checksum mismatch from truncated downloads; minimal images lacking curl with neither apt-get nor apk available.
Common situations: Training containers with allow-listed network policies; freshly tagged releases whose assets are still uploading; TLS-intercepting proxies breaking curl -fsSL; distroless images without a package manager.
Related errors
- Could not inspect GitHub Release ${tag}: ${detail}
- configured Codewhale binary is unavailable or does not repor
- parallel(): max ${MAX_ITEMS} items per call
- pipeline(): expected an array of items
- pipeline(): max ${MAX_ITEMS} items per call
AI-assisted analysis of Hmbown/CodeWhale@8880682c63 (2026-08-16).
Data as JSON: /api/errors/563ee0adee778384.
Report an issue: GitHub.