{"record":{"id":"5dba792fe34a5a9f","repo":"headroomlabs-ai/headroom","slug":"error-goose-not-found-in-path","errorCode":null,"errorMessage":"Error: 'goose' not found in PATH.","messagePattern":"Error: 'goose' not found in PATH\\.","errorType":"console","errorClass":"SystemExit","httpStatus":null,"severity":"error","filePath":"headroom/cli/wrap.py","lineNumber":6821,"sourceCode":"\n    \\b\n    Uninstall: there is no ``headroom unwrap goose`` subcommand — nothing is\n    written to the project.\n\n    \\b\n    Examples:\n        headroom wrap goose                          # Start proxy + goose\n        headroom wrap goose -- session               # Start a Goose session\n        headroom wrap goose -- --provider anthropic  # Pass args to goose\n    \"\"\"\n    if prepare_only:\n        return\n\n    goose_bin = shutil.which(\"goose\")\n    if not goose_bin:\n        click.echo(\"Error: 'goose' not found in PATH.\")\n        click.echo(\"Install Goose: https://block.github.io/goose/\")\n        raise SystemExit(1)\n\n    # Goose accepts OpenAI- and Anthropic-compatible providers; route both.\n    env = os.environ.copy()\n    openai_base = f\"http://127.0.0.1:{port}/v1\"\n    anthropic_base = _claude_proxy_base_url(port)\n    env[\"OPENAI_BASE_URL\"] = openai_base\n    env[\"OPENAI_API_BASE\"] = openai_base\n    env[\"ANTHROPIC_BASE_URL\"] = anthropic_base\n    env_vars_display = [\n        f\"OPENAI_BASE_URL={openai_base}\",\n        f\"ANTHROPIC_BASE_URL={anthropic_base}\",\n    ]\n\n    _launch_tool(\n        binary=goose_bin,\n        args=goose_args,\n        env=env,\n        port=port,","sourceCodeStart":6803,"sourceCodeEnd":6839,"githubUrl":"https://github.com/headroomlabs-ai/headroom/blob/322425c43bffde1ed0b64fecf3cf5951565dd82b/headroom/cli/wrap.py#L6803-L6839","documentation":"Before wrapping Block's Goose, Headroom resolves the `goose` binary with shutil.which('goose'). If missing, it prints this error with the goose docs URL and raises SystemExit(1) before configuring the OpenAI/Anthropic base URLs (http://127.0.0.1:<port>/v1) or starting the proxy. Guarded by the prepare_only early return.","triggerScenarios":"Running `headroom wrap goose` (without --prepare-only) on a machine where Goose is not installed or its binary location (typically a cargo bin dir like ~/.cargo/bin, since Goose is a Rust tool) is not on the current shell's PATH.","commonSituations":"Goose not installed; installed with cargo but ~/.cargo/bin missing from PATH in IDE/launchd shells; installed via the desktop app whose CLI shim isn't linked; CI images without goose.","solutions":["Install Goose per https://block.github.io/goose/","For cargo installs, ensure PATH includes ~/.cargo/bin: export PATH=\"$HOME/.cargo/bin:$PATH\"","Verify with `which goose && goose --version` in the same shell before retrying","Use --prepare-only if you only want proxy/config preparation without launching Goose"],"exampleFix":"# before\nheadroom wrap goose\n# Error: 'goose' not found in PATH.\n\n# after\n# install per block.github.io/goose, then:\nexport PATH=\"$HOME/.cargo/bin:$PATH\"\nwhich goose && headroom wrap goose -- session","handlingStrategy":"type-guard","validationCode":"import shutil\n\nif not shutil.which(\"goose\"):\n    raise SystemExit(\"Install Goose first: https://block.github.io/goose/\")","typeGuard":"import shutil\n\ndef goose_available() -> bool:\n    \"\"\"True when the Goose binary is resolvable on PATH.\"\"\"\n    return shutil.which(\"goose\") is not None","tryCatchPattern":null,"preventionTips":["For cargo installs, export PATH=\"$HOME/.cargo/bin:$PATH\" in launch shells","Verify `which goose && goose --version` before wrapping","Desktop-app installs: ensure the CLI shim is linked onto PATH"],"tags":["path","installation","goose","rust","cli","headroom"],"backgroundTag":null,"analyzedSha":"322425c43bffde1ed0b64fecf3cf5951565dd82b","analyzedAt":"2026-08-15T01:03:05.481Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}