---
id: m-6c32
status: closed
deps: []
links: []
created: 2026-01-25T20:06:36Z
type: bug
priority: 1
assignee: chriskd
---
# Fix mx search --scope=project returning no results

Repro: mx init in temp dir, add entries, mx reindex --scope=project, then mx search 'alpha' --scope=project -> no results. Same query without --scope returns entries. mx list --scope=project shows entries. Likely scope metadata missing in index/search results; relations JSON also shows scope null.

## Acceptance Criteria

- [ ] mx search --scope=project returns project entries (keyword + hybrid)\n- [ ] Search results include scope metadata (or scope filter uses index selection correctly)\n- [ ] Regression test for project-scope search\n- [ ] Ensure --scope=user still behaves correctly


## Notes

**2026-01-25T20:15:40Z**

Fixed core search scope filtering for single-KB mode (avoid @scope prefix filter, annotate kb_scope). Added test_search_scope_single_kb_returns_results. Ran: uv run pytest tests/test_core.py::TestSearch::test_search_scope_single_kb_returns_results (pass).
