kova-worker (the same sidecar binary) can be launched by editors (Zed and
others) as a subprocess acting as an ACP agent: the desktop drives it with
the private NDJSON protocol, while --acp switches it to standard
ACP v1 (JSON-RPC 2.0 over stdio, @agentclientprotocol/sdk).
The protocol boundary is clean: stdout carries only JSON-RPC; logs and
diagnostics go to stderr.
Launch
Zed configuration example
command points at apps/electron/binaries/kova-worker (inside the app
resources for packaged builds); append --data-dir <path> for an isolated
data directory.
Data directory & credentials
ACP mode has no Electron host and enforces local SQLite. Data directory priority:--data-dir <path>KOVA_ACP_DATA_DIRKOVA_DATA_DIR- Default
~/.kova/acp(permissions 0700)
state.db (session index / credentials / models / kv), sessions/
(JSONL transcripts), task-workspace/ and library/.
Sharing models & credentials with the desktop
The desktop exports credentials / custom providers / model entries to a shared file:- The desktop is the single writer: any settings change atomically rebuilds the whole file, and deletions propagate too (providers/keys removed on the desktop disappear on the ACP side);
- Key values are encrypted with a machine-derived key (
kenc:v1:, AES-256-GCM) — any process of the same user can decrypt, which is the prerequisite for multi-client sharing; file permissions only protect against other users; - Priority: shared file > environment variables; on machines without the
desktop, use provider env vars (
ANTHROPIC_API_KEY,OPENAI_API_KEY,DEEPSEEK_API_KEY, …); - ⚠️ Never point
--data-dirat a running desktop’s data directory — desktop credentials are Electronaes:v1encrypted and undecryptable on the ACP side, and both processes would write the same database; - The secrets vault (for bash injection) is outside the shared scope.
Support matrix
ACP methods:initialize / session/new / session/load (history
replay) / session/prompt (text/image/resource) / session/cancel /
session/set_mode (agent / plan / ask) / session/set_model /
session/update / session/request_permission — all supported; fs/* and
terminal/* are unused — the sidecar ships its own read/write/edit/bash.
Internal tools: bash, read/write/edit, glob/grep, WebFetch/WebSearch, the
MCP gateway (reads ~/.kova/mcp.json and workspace .mcp.json), the four
subagent tools, todo (mapped to ACP plan), skills/memory/image generation
and vision all work; browser control, screenshots and the file panel are
desktop-UI-only and not registered; the automation scheduler does not
start in ACP processes.
Approvals: internal per-tool approvals translate to
session/request_permission — approve → allow_once, allow & remember →
allow_always, reject → settled as tool_confirm{approved:false}; cancel or
timeout settles as a rejection to avoid hangs.
Known limitations
mcpServerspassed tosession/new/loadare not wired yet — put servers in~/.kova/mcp.jsonor the workspace.mcp.json;- The
Questiontool degrades to a text prompt + cancel;plan_exitrejection reasons cannot travel through the ACP permission card; - Goal mode is not exposed over ACP; loading a goal-mode session degrades to agent;
- Don’t run multiple ACP processes on the same data directory working the same session (no cross-process lock).
Troubleshooting
- Logs go to stderr (visible in the editor’s log panel);
PI_LOG_LEVEL=deltafor token-level logging; - No models available: confirm the provider’s API key is in the launch
environment; try
ANTHROPIC_API_KEY=... kova-worker --acpmanually and watch stderr; - Tools not executing: make sure
--data-dirdoes not point at a running desktop’s data directory; - Built artifacts carry smoke checks:
bun run buildruns an NDJSON ping and an ACP initialize in sequence.
