derive-uses-subprocess-not-sdk
IN premise
The derive command invokes LLMs by shelling out to `claude` or `gemini` CLI binaries via `asyncio.create_subprocess_exec`, not through any Python SDK.
Summary
The system generates new beliefs by calling external command-line tools (like the claude or gemini binaries) as subprocesses rather than using their Python libraries directly. This means LLM availability depends on having those CLI tools installed and on the PATH, and the system has less programmatic control over error handling, retries, and response parsing than it would with a native SDK integration.
Dependents
These beliefs depend on this one:
- all-external-execution-is-subprocess-isolated — All LLM-facing operations execute through subprocess isolation with environment scrubbing: derive shells out to CLI binaries rather than importing SDKs (achieving provider agnosticism), and both derive and ask independently strip the CLAUDECODE environment variable (preventing recursive invocation) — two independent safety goals achieved through the same architectural choice.
Details
| Source | entries/2026/04/24/reasons_lib-cli.md |