JetBrains Context indexes the repo for VS Code agents
August 25, 2026
JetBrains Context indexes the repo so VS Code agents can ask for a file instead of crawling it. The product is a CLI named jbcontext, not a Marketplace extension. You install it, wire Claude Code or Codex, and a search comes back as a file path plus a line.
The tempting substitute is another fat instruction file. Fat instruction files hurt coding agents already measured what happens when CLAUDE.md becomes a dump of the tree. This post puts a map next to the agent and leaves the instruction file thin.
What has to exist before the curl#

You need a JetBrains AI subscription. The product FAQ names AI Free, AI Pro, AI Ultimate, or AI Enterprise. If the IDE subscription already includes AI Free, that counts. Early access adds no extra fee on those subscriptions. The July 2026 JetBrains announcement said Context does not consume AI quota.
You also need an agent that already runs from VS Code. Claude Code in the sidebar, Codex in the terminal, Junie if that is the harness. The terminal eating the IDE is the same surface. Context wires the agent, not a new editor panel.
The getting-started docs still say an internet connection is required to index and search. They store embeddings rather than raw source, and they still send code chunks to the JetBrains Context server while the index is built. CLI 0.9.8 can keep indexes for repos under one million lines on the local disk. That is storage location, not an offline mode. Do not unplug and expect hits.
On Windows, pin 0.9.10 or later. That is the 25 August 2026 CLI that quotes hook paths containing spaces. An older binary plus a username like With Space is a known footgun.
- A JetBrains AI plan, AI Free included with the IDE counts
- Claude Code or Codex already usable from VS Code
- A live path to JetBrains for index and search
- CLI 0.9.10 or later if the Windows home path has a space
Install the CLI, not an extension#

People will open the VS Code Marketplace. There is nothing named JetBrains Context there. The install lives in a terminal, same as the public integrations repo says. Binaries come from download.jetbrains.com. jbcontext upgrade updates in place.
1. Run the JetBrains installer, skip the Marketplace#
macOS and Linux use the curl installer from the getting-started page. Windows uses the PowerShell one-liner. Both drop a jbcontext binary. The install skill is the same recipe the agent can run if you paste https://jb.gg/context-install.
curl -fsSL https://download.jetbrains.com/jetbrains-context/release/download-jbcontext.sh | bash
jbcontext --versionWindows PowerShell is irm https://download.jetbrains.com/jetbrains-context/release/download-jbcontext.ps1 | iex. Proof is a version string, not a silent prompt. command not found means PATH missed the binary. jbcontext doctor and setup-agent will name the shell file to edit, including fish, as of 0.9.8.
2. Log in with a JetBrains Account#
Auth is a JetBrains Account, not GitHub, not Anthropic. The install skill treats a later 401 as this step missing.
jbcontext loginCentral orgs have an extra gate. An admin has to enable AI for the organization before Context will talk. Individual accounts skip that. If login succeeds and search still 401s, the session is not the account you think it is.
Wire the agent and build the index#

setup-agent is the whole VS Code step. It drops skills, hooks, and instructions into the agent the editor already runs. Claude Code reads ~/.claude. Codex reads its own agents directory. You are not installing a panel.
3. Run setup-agent for Claude or Codex#
Non-interactive Claude setup is the one-liner in the install skill. Codex has the same shape with --agent=CODEX. CLI 0.9.10 changed --auto so it registers the MCP server for Claude Code only. Other agents need --mcp or --mcp-minimal or they never see code_search.
jbcontext setup-agent --agent=CLAUDE --auto --non-interactive
# Codex, add MCP explicitly:
# jbcontext setup-agent --agent=CODEX --auto --non-interactive --mcpJunie is named on the product page. The install skill does not document a --agent=JUNIE flag. Do not invent one. Run jbcontext setup-agent --help and take the interactive path.
Claude --auto also lands the context-explorer subagent, the one that returns file:line hits in its own thread so the main session stays clean. Codex --auto installs that subagent as of 0.9.9. Codex skills need --skills on top. Multi-repo MCP tools need --multi-repo as of 0.9.10. You probably do not want that on a laptop checkout.
4. Index this checkout#
Start the agent in the repo. Help says each session triggers incremental indexing, only the files that changed. jbcontext index is optional and useful when you want the map before the first prompt. A 404 on search means this step never finished.
jbcontext index0.9.10 makes a failed index noisy. Exit code 1 if sign-in failed, indexing failed, or one repo in a multi-repo run failed. Deliberate skips still exit 0. Watch the number.
Keep secrets out with .jbcontextignore. CLI 0.9.7 gave it gitignore-style patterns in any directory. A file with patterns excludes those paths. An empty file excludes the directory it sits in. Put one at the repo root before the first index if .env files would otherwise go for a ride.
Prove a hit without a grep crawl#

Grep is a flashlight in a parking garage. You sweep every floor for a word you already know. The index is a card catalog. You ask for the thing by what it does, and you get a drawer number.
5. Search until a path and a line come back#
From the project root, run a sentence, not a token. The search skill wants a description of behavior. email is a grep. function that validates user email addresses is a search.
jbcontext search "function that validates user email addresses"
# once you know the folder:
# jbcontext search -p src/auth "JWT token validation"Checkpoint. Hits list file paths with line numbers or byte offsets, plus a short snippet. The MCP tool description on GitHub is explicit about that shape. Help is blunter. Search results are chunk IDs with the file path and offsets, not the source. The agent then opens the file from your checkout. JetBrains is not handing the model a copy it stored.
0.9.10 prints the git revision it searched above the results. If that revision is not the branch under your feet, the map is stale. Reindex.
Inside the agent, /context-search is the same call. A Claude session with the explorer subagent can run a few searches in its own context and return file:line plus snippets. That is the point of the wiring. The main thread should not start with ripgrep.
JetBrains' own bench, on the product page, claims up to 68 percent fewer agent turns, 59 percent lower latency, and 48 percent lower cost across 205 SWE-bench tasks, 175 production-monorepo tasks, and 1,953 code-localization tasks. Vendor numbers. Your repo is not in that set. jbcontext analyze is the local receipt if you want one later. Do not treat 68 percent as a promise.
When the search is empty#

Empty results are almost never "the index is dumb." The common operational failures are one of three strings, a stale snapshot, or a network you do not have. If the command succeeds and the hits are junk, rephrase the behavioral query and check .jbcontextignore.
command not foundis a PATH miss, reload the shell or fix whatdoctornames401is a missing login, or Central AI still off404is no index yet, runjbcontext index- A dirty buffer or unsaved file is invisible until the next revision is indexed
command not found is PATH. The binary installed and the shell did not reload. Open a new terminal. If doctor names a config file, edit that file, do not re-curl.
401 is login. The install skill's line is "The user is not logged in." Run jbcontext login again. Central users, this is also the admin-has-not-enabled-AI case, and it looks the same from the CLI.
404 is no index on the server. Run jbcontext index. Help still talks about the server even when 0.9.8 stored a small-repo index on disk. Either way, a search against nothing is a 404, not a polite empty list.
Windows users with a space in the home path used to get a hook that bash split in half. GitHub issue 29 printed /usr/bin/bash: line 1: C:/Users/With: No such file or directory. 0.9.10 quotes that path. Upgrade. Do not hand-edit ~/.claude/settings.json around an old binary and call it fixed.
The index is a git revision, not the dirty tree. Help indexes a repository ID plus a revision ID. A July 2026 thread on r/Jetbrains asked whether untracked files were in the map. They were not, on day one.
0.9.8 later searches an unpushed local branch after you reindex that checkout. The buffer you have not saved is still invisible. That is the correct default. It is also why a search can miss the function you just typed.
Privacy has a sharp edge. Help stores vectors, paths, offsets, and revision IDs, not raw source. Search returns coordinates. The agent reads the file from disk.
During indexing, batches of code chunks go to the JetBrains Context server so it can compute those embeddings. Ireland is the primary store, US replicas are read-only. Data is dropped after 14 days of search inactivity, or sooner with jbcontext remove-index. The parking meter resets when you search. It is not a vault you own.
You'll hit the inactivity wipe if a side project sits quiet for two weeks and the next session 404s. Reindex. You'll also hit a wall without a network, because help never shipped an offline mode. Local storage of a small index does not cancel that.
What now exists#
jbcontext --version prints. setup-agent has wired Claude or Codex. A jbcontext search in this checkout returns file paths with line numbers, and a new agent session starts with that map instead of a grep crawl. That is the end state.
Keep CLAUDE.md for law. Keep the index for location. Mixing those jobs is how the instruction file gets fat again. If Copilot on the VS Code agent host is the harness, MCP is the seam, --mcp on setup-agent, not a hoped-for extension. Claude Code as the default coding agent is the other common harness. Same CLI either way.
JetBrains Context setup
Is the index built from the git repo or from dirty local files?
From a git snapshot. Help indexes a repository ID plus a revision ID, not the unsaved buffer. A 2026-07-23 JetBrains reply on r/Jetbrains said the first cut indexed HEAD, with local branches coming later. CLI 0.9.8 can search an unpushed local branch after you reindex that checkout.
asked on jetbrains.com ↗Can you keep some paths out of the index?
Yes. CLI 0.9.7 added .jbcontextignore with gitignore-style patterns, placeable in any directory. A file with patterns excludes only those paths. An empty file still excludes the directory it sits in.
Do you need a JetBrains AI subscription during early access?
Yes. The product FAQ names AI Free, AI Pro, AI Ultimate, or AI Enterprise. If the IDE subscription already includes AI Free, that counts. Early access adds no extra fee on top of those subscriptions. The July 2026 JetBrains announcement said Context does not consume AI quota.
asked on jetbrains.com ↗Does JetBrains store the raw source of your repo?
No. Help stores vector embeddings, file paths, chunk offsets, and repository plus revision IDs. Search returns coordinates. The agent then opens the file from your checkout. Chunks of source still travel to the server while the index is built. That is storage policy, not a promise that code never leaves the machine.
asked on jetbrains.com ↗What does a 401 or 404 from jbcontext mean?
401 means the CLI is not logged in. Run jbcontext login. 404 means there is no index on the server yet. Run jbcontext index. command not found is a PATH miss, not an auth miss. Install first.
