Skip to main content
ByteRover CLI v2.0.0 introduces a daemon-first architecture. The core runtime is now a background daemon process that any client — TUI, CLI commands, MCP server, or the local web UI — can connect to independently. The interactive TUI is no longer required for agents to work; it’s just another client.
Daemon-first architecture requires ByteRover CLI v2.0.0 or later.

Architecture

The daemon (brv-server) runs as a standalone background process. All clients connect to it over Socket.IO:
The TUI, CLI commands, MCP server, and web UI are all equal clients. None of them own the runtime — the daemon does.

Before vs After

Auto-Start on Demand

Every CLI command auto-spawns the daemon if it’s not already running. No manual setup needed:
You never need to manage the daemon manually. It starts when you need it and shuts down when you don’t.

Daemon Lifecycle

Spawns on first use

Any brv command auto-starts the daemon if it’s not already running. The daemon spawns as a detached child process, selects a random port from the dynamic range (49152–65535), and writes its metadata to a platform-specific data directory so clients can find it.

Stays alive

The daemon persists across commands. Subsequent calls reuse the same process — no startup overhead after the first command.

Agent pool reuse

Each project gets a dedicated LLM worker process, forked on demand when the first task arrives. Once forked, the agent stays warm and is reused for subsequent tasks on the same project — eliminating cold starts on back-to-back commands. By default, the pool supports up to 10 project agents, each handling up to 5 tasks simultaneously. Both numbers are tunable via brv settings (agentPool.maxSize and agentPool.maxConcurrentTasksPerProject).

Hot-swap providers

Switching LLM providers via /providers or brv providers connect propagates instantly to all running agents through the daemon’s event system. No restart required.

Auto-shutdown

The daemon shuts down automatically after 30 minutes of inactivity. Individual agent processes are cleaned up after 15 minutes of being idle. This keeps your system clean without any manual intervention.

Singleton lock

A global instance lock prevents multiple daemons from running simultaneously. The lock uses an atomic temp-file-and-rename mechanism to avoid race conditions when multiple commands start at the same time.

Headless & CI/CD

All CLI commands support --format json for structured output, making ByteRover fully scriptable:
The daemon auto-starts in headless environments just as it does interactively — no extra configuration needed. For full details on headless execution, JSON output format, authentication for automation, and CI/CD integration, see the Headless Mode documentation.

Technical Details

Key constants from the daemon runtime:

Next Steps

Local Web UI

Browser-based client served by the daemon

Headless Mode

Non-interactive execution for CI/CD pipelines and automation

CLI Reference

Complete command reference for all ByteRover CLI commands

Agent Connectors

Connect coding agents like Cursor, Claude Code, and Windsurf

LLM Providers

Connect external LLM providers and bring your own API key