{"record":{"id":"d248d2598709f7e8","repo":"nexu-io/open-design","slug":"local-cli-memory-extraction-is-not-supported-for","errorCode":null,"errorMessage":"Local CLI memory extraction is not supported for ${provider.agentId}","messagePattern":"Local CLI memory extraction is not supported for (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"apps/daemon/src/memory-llm.ts","lineNumber":1031,"sourceCode":"    );\n    parseStdout = (raw) => extractJsonEventText(def.eventParser || def.id, raw, def.name);\n  } else if (provider.agentId === 'opencode') {\n    // Deliver the prompt on stdin, matching the chat-run path\n    // (def.promptViaStdin). `opencode run`'s `-f, --file` is a yargs array\n    // option that greedily consumes every trailing non-flag token, so\n    // `--file <prompt-file> \"<message>\"` made OpenCode treat the message\n    // text as a second attachment and exit with \"File not found\". Bare\n    // `opencode run --format json` reads the message from stdin instead.\n    args = def.buildArgs(\n      '',\n      [],\n      [],\n      { model: provider.model },\n      { cwd },\n    );\n    parseStdout = (raw) => extractJsonEventText(def.eventParser || def.id, raw, def.name);\n  } else {\n    throw new Error(`Local CLI memory extraction is not supported for ${provider.agentId}`);\n  }\n\n  const env = applyAgentLaunchEnv(\n    spawnEnvForAgent(\n      def.id,\n      { ...process.env, ...(def.env || {}) },\n      configuredAgentEnv,\n      undefined,\n      { resolvedBin: launch.selectedPath },\n    ),\n    launch,\n  );\n  const invocation = createCommandInvocation({\n    command: launch.launchPath,\n    args,\n    env,\n  });\n","sourceCodeStart":1013,"sourceCodeEnd":1049,"githubUrl":"https://github.com/nexu-io/open-design/blob/5be4028344c2eb4c667c5a97bda8f750c5597ef7/apps/daemon/src/memory-llm.ts#L1013-L1049","documentation":"The callLocalCli function only supports memory extraction for three agents: 'claude', 'codex', and 'opencode'. Each has a specific argument-building branch. Any other agentId that passes the registry check (512) and binary discovery (513) but isn't one of these three hits this final guard.","triggerScenarios":"Provider configuration sets agentId to a registered agent that isn't supported for memory extraction — e.g. 'gemini', 'qwen', 'cursor-agent', 'deepseek', 'grok'.","commonSituations":"User selects a non-supported agent as the memory extraction provider; agent registry expanded with new agents but the memory extractor wasn't updated to handle them.","solutions":["Set the memory extraction provider's agentId to 'claude', 'codex', or 'opencode'","Alternatively, use an HTTP-based LLM provider (anthropic/openai/azure/google) for memory extraction instead of a local CLI agent"],"exampleFix":"// before — gemini is registered but not supported for memory extraction\nprovider = { agentId: 'gemini', model: '...' };\n\n// after — use a supported agent\nprovider = { agentId: 'claude', model: '...' };","handlingStrategy":"validation","validationCode":"const MEMORY_EXTRACTION_AGENTS = new Set(['claude', 'codex', 'opencode']);\n\nfunction assertAgentSupportsMemoryExtraction(agentId) {\n  if (!MEMORY_EXTRACTION_AGENTS.has(agentId)) {\n    throw new Error(`Memory extraction via local CLI is only supported for: claude, codex, opencode. Received: ${agentId}`);\n  }\n}","typeGuard":"function supportsMemoryExtraction(agentId: string): agentId is 'claude' | 'codex' | 'opencode' {\n  return agentId === 'claude' || agentId === 'codex' || agentId === 'opencode';\n}","tryCatchPattern":null,"preventionTips":["When configuring a local CLI memory provider, restrict agentId to claude, codex, or opencode","For other agents, use HTTP-based LLM providers (anthropic/openai/azure/google) instead","Document the supported agent set in the provider configuration UI"],"tags":["agent-cli","memory-extraction","configuration"],"backgroundTag":null,"analyzedSha":"5be4028344c2eb4c667c5a97bda8f750c5597ef7","analyzedAt":"2026-08-12T12:03:58.812Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}