Local daemon lifecycle
Let stateful commands manage the daemon automatically, and use lifecycle commands only for observation or recovery.
You normally do not manage the daemon. A stateful command such as search, sync, get, or source add verifies the exact local runtime, starts it when absent, and uses typed local RPC. The daemon keeps the registry and SQLite ownership in one process, streams long-running work such as sync, and exits after five idle minutes.
ctxindex command -> ensure exact daemon -> local RPC -> result
└-> idle for five minutes -> exitActive business requests suppress idle shutdown. Completing a business request refreshes the deadline. Status observation does not keep an otherwise idle daemon alive.
Observe or stop it
ctxindex daemon status
ctxindex daemon stopUse status to inspect readiness, process identity, protocol version, and active request count. Use stop before diagnosing a stuck local runtime or when you explicitly want no background process; the next normal stateful command starts it again.
Start it explicitly only when useful
ctxindex daemon startExplicit start is useful for smoke tests and lifecycle diagnosis. It is not an installation step and there is no foreground serve mode to keep running in another terminal.
Once a command selects the daemon, it never falls back to opening the same database directly. A startup, protocol, or shutdown failure is reported with a stable exit instead of creating competing owners.
For malformed config or startup diagnostics, see Troubleshooting. For the process boundary, see Architecture.