{"record":{"id":"6b3f429ceafc8724","repo":"coleam00/Archon","slug":"container-isolation-was-requested-but-is-not-wired","errorCode":null,"errorMessage":"Container isolation was requested but is not wired up: the container backend needs an isolation store and container config. This is a caller bug — pass `store` and `containerConfig`, or run without `--container`.","messagePattern":"Container isolation was requested but is not wired up: the container backend needs an isolation store and container config\\. This is a caller bug — pass `store` and `containerConfig`, or run without `--container`\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/isolation/src/backend-router.ts","lineNumber":72,"sourceCode":"export function resolveFolderBackend(\n  codebase: BackendPrepareRequest['codebase'],\n  opts?: ResolveFolderBackendOptions\n): IIsolationBackend;\nexport function resolveFolderBackend(\n  codebase: BackendPrepareRequest['codebase'],\n  opts: ResolveFolderBackendOptions = {}\n): IIsolationBackend {\n  if (codebase.kind !== 'folder') {\n    throw new Error(\n      `resolveFolderBackend called for non-folder codebase '${codebase.name}' ` +\n        `(kind: ${codebase.kind}). The backend seam is folder-only; repo projects ` +\n        'use worktree isolation.'\n    );\n  }\n\n  if (opts.container) {\n    if (!opts.store || !opts.containerConfig) {\n      throw new Error(\n        'Container isolation was requested but is not wired up: the container ' +\n          'backend needs an isolation store and container config. This is a caller ' +\n          'bug — pass `store` and `containerConfig`, or run without `--container`.'\n      );\n    }\n    return new ContainerBackend({\n      store: opts.store,\n      config: opts.containerConfig,\n      ...(opts.dockerRunner ? { dockerRunner: opts.dockerRunner } : {}),\n    });\n  }\n\n  return new InPlaceBackend();\n}\n","sourceCodeStart":54,"sourceCodeEnd":87,"githubUrl":"https://github.com/coleam00/Archon/blob/0773b9745896ef0612e709c80845a0f7db315b19/packages/isolation/src/backend-router.ts#L54-L87","documentation":"When container isolation is requested via opts.container, resolveFolderBackend requires an isolation store and container configuration to construct the ContainerBackend. If either is missing, container isolation is not wired up and the caller is buggy, so it throws with explicit instructions: pass store and containerConfig, or run without --container.","triggerScenarios":"Calling the backend router with { container: true } but omitting opts.store or opts.containerConfig — e.g. a CLI path that forwards --container without loading container config, or programmatic use of resolveFolderBackend that supplies only the flag.","commonSituations":"Running with --container before container isolation was configured (no container runtime config in the Archon setup); a new call site added after the store/config wiring was skipped; tests or scripts invoking the router directly with container: true.","solutions":["Pass the isolation store and container config: resolveFolderBackend(codebase, { container: true, store, containerConfig }).","Run without --container to use the default folder backend while container support is unconfigured.","Complete container isolation setup so store and containerConfig are available at the call site.","Fix the CLI/dispatch layer to load container config whenever the --container flag is set."],"exampleFix":"// before\nresolveFolderBackend(codebase, { container: true });\n// after\nresolveFolderBackend(codebase, { container: true, store: isolationStore, containerConfig: cfg });","handlingStrategy":"validation","validationCode":"if (opts.container && (!opts.store || !opts.containerConfig)) {\n  throw new Error('container isolation requires store and containerConfig; configure it or drop --container');\n}","typeGuard":"type ContainerOpts = { container: true; store: IsolationStore; containerConfig: ContainerConfig };\nfunction containerWired(o: { container?: boolean; store?: IsolationStore; containerConfig?: ContainerConfig }): o is ContainerOpts {\n  return o.container === true && o.store != null && o.containerConfig != null;\n}","tryCatchPattern":"try {\n  const backend = resolveFolderBackend(codebase, opts);\n} catch (e) {\n  if (e.message.includes('Container isolation was requested but is not wired up')) {\n    console.error('Pass store/containerConfig or run without --container');\n  } else throw e;\n}","preventionTips":["Complete container isolation setup before advertising the --container flag.","Wire store and containerConfig in a single place and pass them together.","Fail fast at CLI argument parsing when --container is set without configuration."],"tags":["isolation","container","missing-config","caller-bug"],"backgroundTag":"missing-configuration","analyzedSha":"0773b9745896ef0612e709c80845a0f7db315b19","analyzedAt":"2026-09-01T02:28:07.064Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}