Hmbown/CodeWhale · error · RuntimeError

configured Codewhale binary is unavailable or does not…

Error message

configured Codewhale binary is unavailable or does not report version {version}

What it means

When binary_path is configured, setup() skips installation and instead runs '<binary> --version', requiring exit code 0 and the configured version string to appear in stdout/stderr. If the binary is missing, not executable, or reports a different version, setup() raises this RuntimeError so rollouts never run against the wrong binary.

Solutions

  1. Run '<your binary_path> --version' yourself and confirm it exits 0 and prints the configured version
  2. Make the file executable (chmod +x) or fix the path if it does not exist
  3. Rebuild/reinstall the local binary at the configured version, or set config.version to the version the binary actually reports
  4. Remove binary_path and let setup() install the pinned release automatically

Example fix

// before
CodewhaleHarnessConfig(binary_path="/tmp/build/codewhale", version="0.9.1")  # binary reports 0.9.0
// after
CodewhaleHarnessConfig(binary_path="/tmp/build/codewhale", version="0.9.0")  # matches actual build
Defensive patterns

Strategy: validation

Validate before calling

import subprocess
out = subprocess.run([cfg.binary_path, "--version"], capture_output=True, text=True)
assert out.returncode == 0 and cfg.version in (out.stdout + out.stderr), "binary/version mismatch"

Try / catch

try:
    await harness.setup(runtime)
except RuntimeError as e:
    if "unavailable or does not report version" in str(e):
        cfg.binary_path = None  # fall back to managed install
    else:
        raise

Prevention

When it happens

Trigger: CodewhaleHarnessConfig(binary_path='/path/to/codewhale', version='0.9.1') where the path does not exist, lacks execute permission, is a different build, or its --version output lacks the exact '0.9.1' token, during setup().

Common situations: Pointing binary_path at a locally built candidate that is a different version than the pinned config.version; stale symlink; binary not yet built; forgot to rebuild after a version bump.

Related errors


AI-assisted analysis of Hmbown/CodeWhale@433685b202 (2026-09-15). Data as JSON: /api/errors/7f6e564bb7447bd1. Report an issue: GitHub.

Appendix: source

Thrown at integrations/verifiers-codewhale/codewhale_harness/harness.py:129

                "disabled_tools must use Codewhale catalog identifiers: "
                + ", ".join(repr(tool) for tool in invalid)
            )

    @property
    def binary(self) -> str:
        configured = (self.config.binary_path or "").strip()
        return configured or DEFAULT_BINARY

    async def setup(self, runtime: Runtime) -> None:
        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,

View on GitHub (pinned to 433685b202)