RAG for autonomous coding agents is dead

Agentic exploration is the new way

Hero Image

Published: July 17th 2025

For AI coding agents like Cursor, the traditional approach has been to create embeddings of the entire code base, and search against those embeddings to find related pieces of code based on your query.

Similar to how the pdf chatbots work.

They create embeddings of the pdf, which means we can do similarity searches against them i.e when you ask a question about something in the pdf, the embeddings let us find the relevant information. This is also known as RAG (Retrieval Augmented Generation).

Coding agents worked the same way.

But something called agentic exploration is starting to take over.

The Claude Code team have ditched traditional RAG for agentic discovery.

"It outperformed everything, by a lot"

Cline, another autonomous coding agent platform works like this too

Agentic exploration does not use embeddings.

Instead, it does the same thing a software engineer would do when looking at the code.

Based on the question being asked, it will

→ Look into the overall folder structure of the code base
→ Look at file names
→ Explore files that look relevant
→ Explore the dependencies of these relevant files

This works especially great because code bases are inherently logical and structured (hopefully!), making it easier for the agent to navigate.

The agent start's to build up a context of all the relevant information, and use that to solve the problem.

Instead of using RAG to get code information from embeddings, it gets the file contents directly via read operations on the files.

This has a few key advantages over traditional RAG.

→ Traditional RAG might give you chunked and split code from a file. This could mean snippets of methods or functions, which could confuse the agent.
→ It might include snippets from random and different parts of the code base.
→ Indexing your entire code base could be a security issue also. Embeddings can be converted back to original code, so they need to be stored securely.
→ Embeddings need to be stored somewhere, and constantly updated and kept in sync. This adds complexity.
→ You need to start going into the deep and continuous work of improving your RAG pipeline to improve your results

Sounds like a lot of work, right?

With agentic exploration, just give the agent some file reading capabilities, and let it handle it from there.

→ It can add entire files to the LLM context window, instead of partial bits of files
→ No need to chunk and guess what might be relevant
→ With the 200K context windows available today, you can pass in a lot of information directly.

Any downsides?

Coding agents are expensive. They are context heavy, and burn a lot of tokens. RAG could be useful if you want to save tokens, at the cost of improved performance

But if you want the best results? Let the agent explore.