{"record":{"id":"de09182aa7c59f1b","repo":"usestrix/strix","slug":"strix-image-is-not-configured-set-it-in-strix","errorCode":null,"errorMessage":"strix_image is not configured. Set it in ~/.strix/cli-config.json.","messagePattern":"strix_image is not configured\\. Set it in ~/\\.strix/cli-config\\.json\\.","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"strix/interface/cli.py","lineNumber":35,"sourceCode":"from strix.core.runner import run_strix_scan\nfrom strix.report.state import ReportState, set_global_report_state\nfrom strix.runtime import session_manager\n\nfrom .utils import (\n    build_live_stats_text,\n    format_vulnerability_report,\n    has_model_response,\n    read_workspace_files,\n)\n\n\nlogger = logging.getLogger(__name__)\n\n\ndef _resolve_sandbox_image() -> str:\n    image = load_settings().runtime.image\n    if not image:\n        raise RuntimeError(\n            \"strix_image is not configured. Set it in ~/.strix/cli-config.json.\",\n        )\n    return image\n\n\nasync def run_cli(args: Any) -> None:  # noqa: PLR0915\n    console = Console()\n\n    start_text = Text()\n    start_text.append(\"Penetration test initiated\", style=\"bold #22c55e\")\n\n    target_text = Text()\n    target_text.append(\"Target\", style=\"dim\")\n    target_text.append(\"  \")\n    if len(args.targets_info) == 1:\n        target_text.append(args.targets_info[0][\"original\"], style=\"bold white\")\n    else:\n        target_text.append(f\"{len(args.targets_info)} targets\", style=\"bold white\")","sourceCodeStart":17,"sourceCodeEnd":53,"githubUrl":"https://github.com/usestrix/strix/blob/85513391305171ecc6faffe03da4a8bda5e3febb/strix/interface/cli.py#L17-L53","documentation":"Raised by _resolve_sandbox_image (strix/interface/cli.py:35) when the loaded settings' runtime.image (the strix_image sandbox container image) is empty. Strix executes all scan tooling inside a Docker sandbox, so the CLI refuses to start without an image reference; the message points at ~/.strix/cli-config.json as the persistent config location.","triggerScenarios":"Running the strix CLI on a fresh install where strix_image was never configured; a cli-config.json missing the runtime.image key or set to \"\"; config file replaced/reset.","commonSituations":"Skipping the post-install configuration step; JSON typos (image under the wrong section so it never loads); CI containers that mount a minimal HOME without ~/.strix.","solutions":["Set the image in ~/.strix/cli-config.json, e.g. {\"runtime\": {\"image\": \"ghcr.io/usestrix/strix-sandbox:latest\"}}.","Or set it via whatever settings source your version supports (STRIX_IMAGE env / `strix config` command) before launching the CLI.","Verify by loading settings and printing runtime.image non-empty; also ensure Docker is running since the sandbox needs it."],"exampleFix":"# before\n# ~/.strix/cli-config.json -> {}\n$ strix -t ./   # RuntimeError: strix_image is not configured\n\n# after\n$ cat ~/.strix/cli-config.json\n{\"runtime\": {\"image\": \"ghcr.io/usestrix/strix-sandbox:latest\"}}\n$ strix -t ./","handlingStrategy":"validation","validationCode":"from strix.config import load_settings\nimage = load_settings().runtime.image\nif not image:\n    raise SystemExit('configure runtime.image in ~/.strix/cli-config.json first')","typeGuard":"def sandbox_image_configured() -> bool:\n    from strix.config import load_settings\n    return bool(load_settings().runtime.image)","tryCatchPattern":"try:\n    run_cli(args)\nexcept RuntimeError as exc:\n    if 'strix_image is not configured' in str(exc):\n        write_cli_config(image='ghcr.io/usestrix/strix-sandbox:latest')\n        run_cli(args)\n    else:\n        raise","preventionTips":["Run strix's post-install config step once and commit ~/.strix/cli-config.json to your workstation setup.","In CI, template the config file with the image before invoking strix."],"tags":["configuration","docker","sandbox","cli"],"backgroundTag":null,"analyzedSha":"85513391305171ecc6faffe03da4a8bda5e3febb","analyzedAt":"2026-08-15T05:03:57.275Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}