tinyhumansai/openhuman · error · anyhow::Error

[claude-code] `claude` CLI at {} is version {}; require >= {

Error message

[claude-code] `claude` CLI at {} is version {}; require >= {}

What it means

`version_check::probe()` found a `claude` executable but its reported version is older than `MIN_CLI_VERSION` required by this provider (the `CliStatus::Outdated` arm). The installed path and both version numbers are included. Old CLI builds lack flags/stream shapes the driver depends on, so construction refuses instead of failing obscurely mid-turn.

Source

Thrown at src/openhuman/inference/provider/claude_code/mod.rs:146

                    PathBuf::from(path),
                    workspace_dir,
                    project_dir,
                    key,
                ))
            }
            types::CliStatus::NotInstalled => {
                anyhow::bail!(
                    "[claude-code] `claude` CLI not installed. Install Claude Code CLI \
                     ({}) >= {} and retry.",
                    "https://docs.anthropic.com/en/docs/claude-code",
                    types::MIN_CLI_VERSION
                )
            }
            types::CliStatus::Outdated {
                version,
                min_required,
                path,
            } => anyhow::bail!(
                "[claude-code] `claude` CLI at {} is version {}; require >= {}",
                path,
                version,
                min_required
            ),
            types::CliStatus::Unusable { path, reason } => anyhow::bail!(
                "[claude-code] `claude` CLI at {} unusable: {}",
                path,
                reason
            ),
        }
    }

    async fn run_chat(
        &self,
        request: ChatRequest<'_>,
        model_override: Option<&str>,
    ) -> anyhow::Result<ChatResponse> {

View on GitHub (pinned to 7491200858)

Solutions

  1. Update the CLI at the path shown in the message: `npm update -g @anthropic-ai/claude-code` (or `claude update` if the native updater is available).
  2. Verify `claude --version` reports >= the `min_required` value from the message.
  3. If multiple CLIs exist, remove stale ones so PATH resolves the updated binary (check `which -a claude`).
  4. Retry the request after the update; no core restart is needed beyond provider reconstruction.

Example fix

# shell
npm update -g @anthropic-ai/claude-code
claude --version   # compare against min_required in the error
Defensive patterns

Strategy: validation

Validate before calling

if let types::CliStatus::Outdated { version, min_required, .. } = version_check::probe() {
    prompt_upgrade(&version, &min_required); // block provider selection until fixed
}

Prevention

When it happens

Trigger: Constructing the claude-code provider with a `claude` on PATH whose `--version` output parses below `types::MIN_CLI_VERSION` — e.g. a distro-pinned or long-unupdated npm install.

Common situations: npm global install updated rarely; a system-managed Node with an old cached CLI; CI images caching an outdated CLI layer; users who installed the CLI months ago and never updated.

Related errors


AI-assisted analysis of tinyhumansai/openhuman@7491200858 (2026-08-17). Data as JSON: /api/errors/abca6558b4638f80. Report an issue: GitHub.