{"record":{"id":"21ecc7520f849917","repo":"paperclipai/paperclip","slug":"in-place-workspace-realization-requires-the-codex","errorCode":null,"errorMessage":"In-place workspace realization requires the Codex CLI engine; ACP archive staging is not supported.","messagePattern":"In-place workspace realization requires the Codex CLI engine; ACP archive staging is not supported\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/adapters/codex-local/src/server/acp.ts","lineNumber":93,"sourceCode":"  const raw = typeof value === \"string\" ? value.trim().toLowerCase() : \"\";\n  if (raw === \"acp\") return { engine: \"acp\", explicit: true };\n  if (raw === \"cli\") return { engine: \"cli\", explicit: true };\n  return { engine: \"acp\", explicit: false };\n}\n\nexport function resolveCodexExecutionEngine(config: Record<string, unknown>): CodexEngineSelection {\n  return normalizeEngine(config.engine);\n}\n\nexport async function resolveCodexExecutionEngineForRun(\n  input: CodexEngineResolutionInput,\n): Promise<CodexEngineSelection> {\n  const selection = normalizeEngine(input.config.engine);\n  // Engine availability must never change the agent's execution or permission contract.\n  if (selection.engine === \"cli\") return selection;\n  const unavailable = (reason: string): CodexEngineSelection => ({\n    ...selection,\n    unavailableReason: `${reason} Repair the ACP setup, or explicitly set engine=cli to use the CLI engine.`,\n  });\n  const target = readAdapterExecutionTarget({\n    executionTarget: input.executionTarget,\n    legacyRemoteExecution: input.executionTransport?.remoteExecution,\n  });\n  if (target?.workspaceRealization?.mode === \"in_place\") {\n    return unavailable(\"In-place workspace realization requires the Codex CLI engine; ACP archive staging is not supported.\");\n  }\n  const filesystemScope = parseLocalProcessFilesystemScope(input.config.filesystemScope);\n  const networkScope = parseLocalProcessNetworkScope(input.config.networkScope);\n  if (filesystemScope || networkScope) {\n    return unavailable(\"Local filesystem/network confinement requires the Codex CLI engine; ACP confinement is not supported.\");\n  }\n\n  const reason = await codexAcpUnavailableReason(input);\n  return reason ? unavailable(reason) : selection;\n}\n","sourceCodeStart":75,"sourceCodeEnd":111,"githubUrl":"https://github.com/paperclipai/paperclip/blob/3f1d897a7c018d76563a21c6e39c3c9b03933622/packages/adapters/codex-local/src/server/acp.ts#L75-L111","documentation":"Engine-capability guard for the Codex local adapter: in-place workspace realization (running directly in the source checkout) requires the Codex CLI engine; the caller explicitly pinned engine=acp, whose archive-staging model cannot support it, so the configuration is rejected rather than silently staging an archive.","triggerScenarios":"Thrown at packages/adapters/codex-local/src/server/acp.ts:93 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use the Codex CLI engine for in-place workspace realization.","Use archive staging without in-place realization for ACP."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3f1d897a7c018d76563a21c6e39c3c9b03933622","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}