Found while dogfooding the current source with the locally built cdidx.
Several non-MCP diagnostic paths still pass raw exception messages across process or CLI boundaries. This is distinct from the existing MCP-tool error issue: these surfaces are symbol/hook worker responses, parent-side worker process failures, and batch query JSON parsing.
Evidence:
src/CodeIndex/Indexer/Symbols/SymbolExtractionWorker.cs returns worker errors using raw ex.Message and parent-side send/start/read errors include raw messages.
src/CodeIndex/Indexer/Hooks/PostExtractionHookCallbackWorker.cs has the same worker boundary pattern.
src/CodeIndex/Cli/QueryCommandRunner.cs batch JSON parse failures write raw JsonException.Message to stderr.
Suggested fix: route these diagnostics through the same bounded/sanitized error formatter used for other user-visible diagnostics, preserving safe failure categories such as worker_start_failed, worker_protocol_error, and invalid_batch_json.
Found while dogfooding the current source with the locally built
cdidx.Several non-MCP diagnostic paths still pass raw exception messages across process or CLI boundaries. This is distinct from the existing MCP-tool error issue: these surfaces are symbol/hook worker responses, parent-side worker process failures, and batch query JSON parsing.
Evidence:
src/CodeIndex/Indexer/Symbols/SymbolExtractionWorker.csreturns worker errors using rawex.Messageand parent-side send/start/read errors include raw messages.src/CodeIndex/Indexer/Hooks/PostExtractionHookCallbackWorker.cshas the same worker boundary pattern.src/CodeIndex/Cli/QueryCommandRunner.csbatch JSON parse failures write rawJsonException.Messageto stderr.Suggested fix: route these diagnostics through the same bounded/sanitized error formatter used for other user-visible diagnostics, preserving safe failure categories such as
worker_start_failed,worker_protocol_error, andinvalid_batch_json.