aaif-goose/goose · error · ValueError

--concurrency must be at least 1

Error message

--concurrency must be at least 1

What it means

Raised by build_harbor_config in the harbor benchmark runner when --concurrency is less than 1. Concurrency sets how many task instances the job runs in parallel (the default is 4); zero or negative would mean no workers and the job could never make progress, so the runner rejects it during argument validation.

Source

Thrown at evals/harbor/runner.py:132

def dataset_config(dataset_ref: str, tasks: list[str]) -> dict[str, Any]:
    name, sep, ref = dataset_ref.rpartition("@")
    dataset_name = name if sep else dataset_ref
    dataset: dict[str, Any] = {"name": dataset_name}
    if sep:
        dataset["ref" if "/" in name else "version"] = ref
    if tasks:
        dataset["task_names"] = tasks
    return dataset


def build_harbor_config(args: argparse.Namespace) -> dict[str, Any]:
    if "/" not in args.model:
        raise ValueError("--model must be in provider/model form, e.g. anthropic/claude-sonnet-4-6")
    if args.trials < 1:
        raise ValueError("--trials must be at least 1")
    if args.concurrency < 1:
        raise ValueError("--concurrency must be at least 1")
    if args.timeout_multiplier <= 0:
        raise ValueError("--timeout-multiplier must be positive")

    goose_binary = args.goose_binary.expanduser().resolve()
    if not goose_binary.is_file():
        raise ValueError(f"--goose-binary does not exist or is not a file: {args.goose_binary}")

    config_yaml, extension_entries = render_goose_config(args.extensions)

    provider = args.model.split("/", 1)[0]
    missing_secrets = [
        key for key in PROVIDER_SECRETS.get(provider, []) if not os.environ.get(key)
    ]
    if missing_secrets:
        raise ValueError(
            f"Missing env vars for provider '{provider}': {', '.join(missing_secrets)}. "
            f"Set them in a .env file (cwd or {HARBOR_DIR}) or your shell."
        )

View on GitHub (pinned to 3810898a74)

Solutions

  1. Use --concurrency 1 for serial execution
  2. Fix generating code to clamp: max(1, computed_concurrency)
  3. Leave the flag off to accept the default of 4
Defensive patterns

Strategy: validation

Validate before calling

assert args.concurrency >= 1, f'--concurrency must be at least 1, got {args.concurrency}'

Prevention

When it happens

Trigger: Running with --concurrency 0; a negative value like --concurrency -1; automation scaling concurrency off a machine-size formula that can round to 0.

Common situations: Trying to force fully serial execution with 0 instead of 1; CI scripts computing max(0, cpus - N) and passing the result straight through; typos in flag values.

Related errors


AI-assisted analysis of aaif-goose/goose@3810898a74 (2026-08-16). Data as JSON: /api/errors/a5aee0dfd0106017. Report an issue: GitHub.