Hmbown/CodeWhale · error · ValueError

disabled_tools must use Codewhale catalog identifiers

Error message

disabled_tools must use Codewhale catalog identifiers: {invalid_tools}

What it means

_validate_config checks every entry of config.disabled_tools against the catalog-identifier regex ^[a-z0-9][a-z0-9_-]*$ and raises listing the offending names. The harness forwards these verbatim as --disallowed-tools to the Codewhale CLI, so names must match the Codewhale tool catalog format.

Solutions

  1. Rewrite each disabled_tools entry to match ^[a-z0-9][a-z0-9_-]*$ (lowercase letters/digits start, then lowercase, digits, underscore, hyphen)
  2. Check the Codewhale tool catalog for the exact identifier of each tool you want to disable
  3. If the names came from a comma-joined string, split it into a proper list first

Example fix

// before
CodewhaleHarnessConfig(disabled_tools=["Bash", "Web Search"])
// after
CodewhaleHarnessConfig(disabled_tools=["bash", "web_search"])
Defensive patterns

Strategy: validation

Validate before calling

import re
_TOOL = re.compile(r"^[a-z0-9][a-z0-9_-]*$")
bad = [t for t in cfg.disabled_tools or [] if not _TOOL.fullmatch(t)]
assert not bad, f"invalid tool ids: {bad}"

Prevention

When it happens

Trigger: Passing CodewhaleHarnessConfig(disabled_tools=['Bash', 'web-search!', '']) — any tool name starting with an uppercase letter or symbol, containing spaces/dots/slashes, or empty — then calling setup() or launch(). The message includes the repr of each invalid name.

Common situations: Using tool names from a different agent's catalog (e.g. capitalized Claude-style names); typo'd identifiers; accidentally including whitespace or commas from a comma-separated string instead of a list.

Understand the failure class

Background: "invalid id" errors: invalid identifier format — why libraries reject IDs before lookup, and how to fix them — this error's family across 37 libraries.

Related errors


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

Appendix: source

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

    APPENDS_SYSTEM_PROMPT = True
    SUPPORTS_MCP = True
    SUPPORTS_USER_SIM = False

    def _validate_config(self) -> None:
        if not _VERSION.fullmatch(self.config.version):
            raise ValueError("version must be a semantic release identifier")
        if (
            self.config.max_turns is not None
            and not 1 <= self.config.max_turns <= 10_000
        ):
            raise ValueError("max_turns must be between 1 and 10000")
        invalid = [
            tool
            for tool in self.config.disabled_tools or []
            if not _TOOL.fullmatch(tool)
        ]
        if invalid:
            raise ValueError(
                "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
            ):

View on GitHub (pinned to 433685b202)