Expose retrieval mode in query-based responses for easier debugging #14
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Expose whether a query-based tool used semantic/vector search or the Postgres full-text fallback path in its response payloads.
Why
llm/todo.mdlists this as a useful follow-up for debugging search behavior after the semantic fallback work. Right now fallback appears to be implemented, but callers cannot easily tell which retrieval mode was used for a given response.Affected tools
Consider this for the query-based tools that use shared retrieval logic:
search_thoughtsrecall_contextget_project_contextwhenqueryis providedsummarize_thoughtswhenqueryis providedrelated_thoughtsScope ideas
retrieval_mode: semantic|textAcceptance criteria
Source
Nice follow-up from
llm/todo.md: expose the retrieval mode in responses for easier debugging of semantic vs text fallback.Implementation on branch issue-14-expose-retrieval-mode, commit
cfc78e0493. All five query-driven tools now return retrieval_mode (semantic or text) in their response payloads. Fields use omitempty for backwards compatibility. Tests added in retrieval_test.go. README updated. Verified: go build ./internal/tools/... clean, go test ./internal/tools/... all pass. No blockers.Dispatcher follow-up: PR created for the pushed implementation.
PR: #37 (#37)
Branch: issue-14-expose-retrieval-mode
Commit:
cfc78e0493Verification reported by worker:
Caveat: go build ./... was not used as final verification because internal/app embeds ui/dist when UI assets are absent in the worker environment.
Issue left open for review/merge workflow.
Closing after verification: PR #37 (#37) was merged on 2026-07-14T14:44:14Z and implements retrieval_mode exposure for query responses. Verification recorded: go build ./internal/tools/... ./internal/store/... ./internal/mcpserver/...; go test ./internal/tools/... -count=1.