In this article
Treat the custom index and live repository as separately versioned resources, and preserve the file identity when returning retrieved code to the agent.
Decide why a separate code service is needed
Continue’s custom code RAG guide targets advanced cases such as indexing code once for multiple users or adding custom retrieval logic. That differs from asking the agent to inspect files already available in its workspace. Define the intended repository set and reuse requirement first. A central service adds an indexing and access contract; it is not automatically needed for every small coding task.
Separate index preparation from tool execution
The guide constructs an index before exposing query operations through an MCP server. Changing a model configuration or connecting the server does not itself establish that the code was indexed. Diagnose preparation, storage and query access separately. If a new source file cannot be found, first determine whether it exists in the indexed revision rather than repeatedly rewording the query or changing the chat model.
Preserve the returned file identity
The reference service formats search results with a filename and code text, and separately demonstrates a file-context operation. That distinction lets an agent discover a candidate and request more material from the same source. A bare snippet without repository and revision context becomes ambiguous when several projects have identically named files. Extend the result contract to preserve the identity needed by the intended task; do not assume a text match identifies a unique live file.
Compare retrieval with the current workspace
The codebase-awareness guide distinguishes open-workspace exploration from access to other repositories. Retrieved remote code can explain an interface without being editable in the current checkout. Before an actual modification, establish which source revision and workspace own the target. The context-selection guide says tool responses become context, so a stale retrieved example can influence later actions even when the query itself completed successfully.
Verify the integration through source-specific questions
Use a known symbol in the intended indexed revision and inspect the returned file identity and relevant code. Then compare a deliberately newer workspace change to establish refresh behavior. Document-update guidance explains stale retrieved evidence; progressive reading helps move from a snippet to the needed source. Record the indexed revision and refresh process rather than describing successful MCP discovery as complete, current code awareness.
Earn rental income from GPUs
Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.