Description
Local Coding Agent Providers let Dots drive an agent CLI already installed and authenticated on the user's machine. Active adapters cover Claude Code, Codex, Cursor, and Hermes. Each implementation translates Dots' provider-neutral completion input into the CLI's non-interactive arguments, working directory, environment, session-resume syntax, and native stream format, then normalizes the result into the shared LLM provider contract consumed by chat.
Local runs use the user's existing subscription, so the adapter reports zero per-request platform cost rather than inventing API spend. The provider keeps resumable session identity tied to the workspace, retries once without a stale native session when supported, tracks spawned process IDs, and reaps process trees on close. Provider-specific parsing remains isolated so one vendor's output shape never becomes another adapter's assumed contract.
Selling Points
- Users can bring the coding agents they already pay for into one Dots conversation experience.
- Four distinct CLI adapters preserve each tool's real session, model, argument, and stream semantics instead of flattening them prematurely.
- Workspace-aware resume continues prior agent context when safe and starts fresh when the working directory changes.
- Process registration and tree cleanup reduce abandoned background agents after cancellation, shutdown, or failed runs.
- Normalized messages, tool events, usage, and sessions let the rest of Dots remain provider-neutral.
User Story
A developer selects Codex for one repository conversation and Claude Code for another. Dots spawns each installed CLI in the chosen workspace, uses the developer's existing login, streams or buffers the native output, and stores a normalized conversation. On the next turn the matching native session resumes. If the developer switches the conversation to a different folder, Dots drops the unsafe resume and clearly begins a fresh provider session.
Extension Surface
This feature is pluggable. packages/local-agent-adapters/src/registry.ts ships a formal per-tenant provider registry with register, replace, remove, select, and list operations, while every adapter satisfies the shared LLMProvider-shaped LocalAgentProvider contract. A composition root can supply another implementation without modifying chat orchestration, although the public provider-name union still governs which names the product recognizes.
Capabilities & Limits
- It spawns four active local CLIs, normalizes their output, resumes sessions, and contains process failures.
- It supports provider-specific models, attachments, reasoning settings, tool policies, and live preview where the CLI exposes them.
- It estimates platform cost as zero because authentication and billing remain with the local subscription.
- Limit: the binary must be installed and authenticated on the host; capabilities differ by CLI, and Hermes quiet mode exposes neither tool events nor usage.
Implementation Map
packages/local-agent-adapters/src/registry.tspackages/local-agent-adapters/src/claude-code/llm-provider.tspackages/local-agent-adapters/src/codex/llm-provider.tspackages/local-agent-adapters/src/cursor/llm-provider.tspackages/local-agent-adapters/src/hermes/llm-provider.ts