code_search (MCP): absolute pathFilter to another indexed checkout is silently ignored and returns results from the root repository
@Elizaveta239 is already working on this.
Since Oct 13, 2026.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- git
- Domain
- devtools
Research direction
Start with the MCP code_search handler and how it resolves pathFilter in --multi-repo mode, and check whether the absolute path is matched against indexed repositories at all. Reproduce with two indexed sibling checkouts, one as the MCP root and one as the filter target, then compare with jbcontext search --project-path. Done means an absolute pathFilter returns results from the named repository or fails with an explicit error, and the storage-mode lookup is confirmed correct.
Written by the indexing model from the issue text.
Description
Version: jbcontext 0.9.15 (build 969, commit b319f597b7, channel stable), Linux
Steps to reproduce
- Repo A and repo B are sibling checkouts (
~/git/repo-a,~/git/repo-b), both indexed. - Start
jbcontext mcp --multi-repowith the MCP root set to repo A (this is what happens when an agent session is started inside repo A). - Call
code_searchwithpathFilterset to the absolute path of repo B.
Expected
Results from repo B. The tool description in --multi-repo mode says:
A pathFilter naming a checkout under the workspace root (or any absolute path) scopes the search to the local repositories it covers
Actual
Results come from repo A, with no error or warning. An agent reading the output has no way to tell the filter was ignored and takes the results as coming from repo B.
Variants:
- If repo A has no index, the same call fails with
Error: No index found for repository '<repo A>'., even though the filter points at repo B, which is indexed. - A relative
pathFilterof../repo-breturns no results. - Same behavior without
--multi-repo.
What does work
--multi-repowith the MCP root set to the parent directory that contains both checkouts, usingpathFilter=repo-bor the absolute path.- The CLI from inside repo A:
jbcontext search --project-path ~/git/repo-b "<query>".
Possibly related
jbcontext mcp --git-remote-url <repo B url> started from repo A returns No index found for repository '<repo B id>' (tried ssh and https URLs), although jbcontext status inside repo B lists indices. In my setup repo B's index is in remote storage and repo A's is local, in case the storage mode is being taken from the working directory.
Feature request
An explicit repository / project-path parameter on code_search (like --project-path on the CLI), so an agent started inside one repository can search another indexed checkout. Failing that, an error when pathFilter resolves outside the repositories being searched would avoid the silent wrong-repo results.
- Dominant language
- Shell
- Stars
- 38
- Forks
- 4
- Avg merge
- 5h 26m
- Merged PRs (30d)
- 5
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from JetBrains/context
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
-
Marketplace Configuration File is missingPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
-
Jbcontext requires login manually every dayMay be free again @Elizaveta239 claimed this 34 days ago, and no pull request is open. Open
Difficulty 5/5 Over a week Newbie friendliness 35/100
All issues in JetBrains/context
Similar issues
-
[Config] Neo Coolcam NAS-WS01Z (0x0258:0x0003:0x1085): param 2 "Alarm Interval" is 1 byte, not 2Open
Difficulty 1/5 Under an hour Newbie friendliness 94/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
pearu/agent-sandbox#412 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
ScoopInstaller/Nonportable#665 ·
-
bot-found documentation priority: P3
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
madenvel/KalinkaPlayer#602 ·