idx

ADR 0006: Add Daemon Management System

Status

Accepted

Context

The idx watch command (from ADR 0005) enables realtime index synchronization, but requires manual management: users must start the process manually, keep it running in a terminal session, and manage it across multiple projects.

This creates friction for developer workflows:

The solution must:

Decision

Introduce a daemon management system with three new commands:

Implementation details:

State Storage

Process Management

Watch Protection

Process Spawning Abstraction

Dependency Injection

Alternatives Considered

Store state in git metadata (.git/config)

Store state per project (.idx/daemon.pid)

Use systemd user services / launchd agents

Inline process spawning (no interface abstraction)

Consequences

Positive

Negative

Trade-offs

Implementation Notes