index_coverage tells the caller to restart the daemon while the index is only starting up #576

Closed
opened 2026-11-12 13:40:43 +01:00 by buildagent · 1 comment
Member

Found by two workers in the v0.41.51 train (dogfood batch 18) and reproduced on the installed release, 0.41.50 (3d0a584c).

Reproduction: start code-index-mcp --root <a fresh repository with 300 small Rust files> --no-daemon and call, among the first requests:

{"name":"index_coverage","arguments":{"path":"m0.rs","envelope":"minimal"}}

Actual: verdict: "pending", reason: "eligibility_unavailable", coverage_reasons: ["index_reconciling"], index_state.projects.primary: "reconciling", and the hint ends "Restart the daemon for a complete answer; use shell meanwhile." The same session reaches ready a moment later without any restart, and in this reproduction there is no daemon to restart.

Cause (read in the source): the pending answer of index_coverage chooses its hint from unknown alone (crates/mcp-server/src/server.rs, the hint: if unknown { … } arm). The lifecycle that the same reply reports in coverage_reasons is not consulted. A second sentence of the same kind is in crates/mcp-server/src/eligibility.rs ("restart the daemon for a complete answer").

Expected: the verdict and the floor stay as they are. While the reported lifecycle is ordinary startup or reconciliation, the hint says to retry, and that path-based read_code works meanwhile. A restart is advised only for a state that does not converge on its own.

Impact: the first call of a session sends an agent to an unnecessary restart and to the shell, and names a process that may not exist. The refusal itself is correct; the remedy is wrong.

Found by two workers in the v0.41.51 train (dogfood batch 18) and reproduced on the installed release, 0.41.50 (3d0a584c). **Reproduction:** start `code-index-mcp --root <a fresh repository with 300 small Rust files> --no-daemon` and call, among the first requests: ```json {"name":"index_coverage","arguments":{"path":"m0.rs","envelope":"minimal"}} ``` **Actual:** `verdict: "pending"`, `reason: "eligibility_unavailable"`, `coverage_reasons: ["index_reconciling"]`, `index_state.projects.primary: "reconciling"`, and the hint ends "Restart the daemon for a complete answer; use shell meanwhile." The same session reaches `ready` a moment later without any restart, and in this reproduction there is no daemon to restart. **Cause (read in the source):** the `pending` answer of `index_coverage` chooses its hint from `unknown` alone (`crates/mcp-server/src/server.rs`, the `hint: if unknown { … }` arm). The lifecycle that the same reply reports in `coverage_reasons` is not consulted. A second sentence of the same kind is in `crates/mcp-server/src/eligibility.rs` ("restart the daemon for a complete answer"). **Expected:** the verdict and the floor stay as they are. While the reported lifecycle is ordinary startup or reconciliation, the hint says to retry, and that path-based `read_code` works meanwhile. A restart is advised only for a state that does not converge on its own. **Impact:** the first call of a session sends an agent to an unnecessary restart and to the shell, and names a process that may not exist. The refusal itself is correct; the remedy is wrong.
Author
Member

Released in v0.41.52 (7fc7fb20, release run 8656, 15 assets). Verified on the installed Linux x86_64 binaries (code-index 0.41.52 (7fc7fb20)):

index_coverage on a path directly after start: no restart advice in any reply while the index was starting; the first settled answer was verdict: indexed, hint "Indexed and current.".

Released in [v0.41.52](https://git.h-dv.de/h-dv/code-index/releases/tag/v0.41.52) (`7fc7fb20`, release run 8656, 15 assets). Verified on the installed Linux x86_64 binaries (`code-index 0.41.52 (7fc7fb20)`): `index_coverage` on a path directly after start: no restart advice in any reply while the index was starting; the first settled answer was `verdict: indexed`, hint "Indexed and current.".
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
h-dv/code-index#576
No description provided.