ADR 0021 β Remove idx watch command
Status
Accepted
Context
idx watch ran a foreground file-watcher that re-indexed changed directories.
ADR 0020 merged the watch loop into the idx server process: idx server start
spawns a single daemon that runs the JSON-RPC server and the watch loop concurrently.
After ADR 0020, idx watch was redundant:
- When the server is running, the command printed βnot available in server modeβ.
- Without the server, re-indexing ran but search/init/sync were unreachable via RPC.
Decision
Remove idx watch from the CLI surface. The internal watch loop (WatchWithContext)
is retained in InitCommandService and continues to be invoked by idx server run.
The watch.debounce configuration key is preserved; it is applied to the serverβs
internal watch loop.
Consequences
idx watchno longer appears inidx --help.- Users who relied on
idx watchshould useidx server startinstead. - The
Watch(showUpdatedFiles, debounce)method and the daemon-check logic (watchStartedByDaemon,currentProjectAlreadyMonitored) are removed fromInitCommandService. WatchWithContextremains as the internal API consumed bynewServerRunCommand.