from Hacker News

Why Cline doesn't index your codebase

by intrepidsoldier on 5/27/25, 1:44 PM with 124 comments

  • by jeffchuber on 5/27/25, 2:44 PM

    This is still retrieval and RAG, just not vector search and indexing. it’s incredibly important to be clear about terms - and this article does not meet the mark.
  • by cdelsolar on 5/27/25, 2:56 PM

    Cline is the most impressive agentic coder tool I’ve used and it seems to be getting better. I’ve learned to work with it to the extent where I can plan with it for 10-15 minutes, set it loose on my codebase, go get lunch, and then its diff is almost always completely on the money. You should commit often for those rare cases where it goes off the rails (which seems to happen less frequently now).

    Using Gemini 2.5 pro is also pretty cheap, I think they figured out prompt caching because it definitely was not cheap when it came out.

  • by silverlake on 5/27/25, 8:22 PM

    Have you guys at Cline considered using LLMs to create summaries of files and complex functions? Rather than read a 500 line function, feed it a short comment on what the function is doing. I'd like to use a local LLM to create summaries at every level: function, file, directory. Then let the LLM use that to find the right code to read. This is basically how I navigate a large code base.
  • by WhitneyLand on 5/27/25, 6:08 PM

    I generally agree with the article and the approach given practical constraints, however it’s all stop gap anyway.

    Using Gemini 2.5’s 1MM token context window to work with large systems of code at once immediately feels far superior to any other approach. It allows using an LLM for things that are not possible otherwise.

    Of course it’s damn expensive and so hard to do in a high quality way it’s rare luxury, for now…

  • by ramoz on 5/27/25, 4:06 PM

    I kept wondering why Cursor was indexing my codebase, it was never clear.

    Anyway context to me enables a lot more assurance and guarantees. RAG never did.

    My favorite workflow right now is:

      - Create context with https://github.com/backnotprop/prompt-tower
      - Feed it to Gemini
      - Gemini Plans
      - I pass the plan into my local PM framework
      - Claude Code picks it up and executes
      - repeat
  • by mindcrash on 5/27/25, 2:51 PM

    Warning: I don't know what this post does in the background but it definitely slows down Firefox 138 to the point that it is barely usable
  • by crop_rotation on 5/27/25, 6:14 PM

    After trying cline,aider,codex, and what not, I feel claude code is just so so better than all of them. e.g It takes much much fewer prompts to be able to do the same thing compared to cline. tbh I am not sure how cline will compete against something like Claude code due to the resource/capability imbalance. Does anyone else have a different experience?
  • by behnamoh on 5/27/25, 2:55 PM

    I never had good experience with RAG anyway, and it felt "hacky". Not to mention most of it basically died when most models started supporting +1M context.

    LLMs are already stochastic. I don't want yet another layer of randomness on top.

  • by olejorgenb on 5/27/25, 4:28 PM

    I've been wondering when someone would finally use the actual code structure to do RAG. It seems like such an obvious, if somewhat harder (at least if you need to support many languages), approach.

    The vector/keyword based RAG results I've seen so far for large code bases (my experience is Cody) has been quite bad. For a smaller projects (using Cursor) it seems to work quite well though.

  • by 3cats-in-a-coat on 5/27/25, 6:58 PM

    This seems like a marketing piece, very poorly justified.

    First, large context models essentially index their context as it grows bigger, or else they can't access the relevant parts of it. However it can't be as comprehensive as with RAG. There is also nothing that makes navigating the context from point to point easier than with RAG.

    It seems they're trying to convince people of their superiority, but it's BS, so they're trying to bank on less knowledgeable customers.

    Indexing is essentially a sorted projection of a larger space, based on the traits and context you care about. There's no magical way for a context to be more accessible, if it has no such semantical indexing, implicit or explicit. Also RAG doesn't mean you can't embed AST and file structure as a concern. A vector is a set of dimensions, a dimension can be literally anything at all. AI is about finding suitable meaning for each dimension and embedding instances in that dimension (and others in combo).

  • by k__ on 5/27/25, 3:44 PM

    Cursor does it.

    Cline doesn't.

    Aider goes the middle way with repo maps.

    Let's see what works best.

  • by NitpickLawyer on 5/27/25, 3:19 PM

    Eh... I'm not convinced. I like cline, I've been using it here and there and I think it found a good mix between "vibesus take the wheel" and "hey, I'm still here and I enjoy doing this". I was particularly surprised that it worked pretty well with local models. A lot of that is on the model (tested w/ devstral) but a lot of it is on the cradle (e.g. aider is great at what it does, but local model support is hit and miss).

    First, like some other comments have mentioned RAG is more than result = library.rag(). I get that a lot of people feel RAG is overhyped, but it's important to have the right mind model around it. It is a technique first. A pattern. Whenever you choose what to include in the context you are performing RAG. Retrieve something from somewhere and put it in context. Cline seems to delegate this task to the model via agentic flows, and that's OK. But it's still RAG. The model chooses (via tool calls) what to Retrieve.

    I'm also not convinced that embedding can't be productive. I think nick is right to point out some flaws in the current implementations, but that doesn't mean the concept in itself is flawed. You can always improve the flows. I think there's a lot to gain from having embeddings, especially since they capture things that ASTs don't (comments, doc files, etc).

    Another aspect is the overall efficiency. If you have somewhat repetitive tasks, you'll do this dance every time. Hey, fix that thing in auth. Well, let's see where's auth. Read file1. Read file2. Read fileN. OK, the issue is in ... You can RAG this whole process once and re-use (some) of this computation. Or you can do "graphRAG" and do this heavy lifting once per project and have AST + graph + model dump that can be RAGd. There's a lot of cool things you can do.

    In general I don't think we know enough about the subject, best practices and useful flows to confidently say "NO, never, nuh-huuh". I think there might be value there, and efficiencies to be gained, and some of them seem like really low hanging fruit. Why not take them?

  • by electroly on 5/27/25, 2:52 PM

    I'm not convinced--codebase indexing is still a killer feature in Cursor. I have tens of thousands of reference files stashed in the project directory to be indexed so that any time the model reaches out to the codebase search tool with a question, it finds a file with the answer. Lots of it is not code and has no AST representation; it's documentation. Without codebase indexing, it may entirely miss the context.

    1. This argument seems flawed. Codebase search gives it a "foot in the door"; from that point it can read the rest of the file to get the remaining context. This is what Cursor does. It's the benefit of the agentic loop; no single tool call needs to provide the whole picture.

    2. This argument is "because it's hard we shouldn't do it". Cursor does it. Just update the index when the code changes. Come on.

    3. This argument is also "because it's hard we shouldn't do it". Cursor does it. The embeddings go in the cloud and the code is local. Enforced Privacy Mode exists. You can just actually implement these features rather than throwing your hands up and saying it's too hard.

    This honestly makes me think less of Cline. They're wrong about this and it seems like they're trying to do damage control because they're missing a major feature.

  • by jdoliner on 5/27/25, 8:59 PM

    Does anybody else see high CPU and GPU utilization on this site with a process called ClineBot?
  • by nchmy on 5/28/25, 2:48 AM

    I cant help but think this article was published as a direct response to Cline's (arguably superior) fork, Roo Code, releasing an experimental Codebase Indexer in the past week...

    https://docs.roocode.com/features/experimental/codebase-inde...

    Augment Code's secret sauce is largely its code indexer, and I find it to be the best coding agent around.

  • by tonipetrov91 on 5/28/25, 8:18 AM

    Isn't this what is called CAG (context augmented generation) these days? 1. Although I think RAG for code is nonsense, CAG seems to be very expensive even with cachig - imagine a huge code base. There should be a more efficient option. 2. How about indexing documentation - RAG should be okay there?
  • by nico on 5/27/25, 3:00 PM

    They could still RAG the AST and just use different chunking strategies

    It doesn’t seems like what they are doing necessarily replaced RAG, even if it can

    The times I’ve implemented RAG, I’ve seen an immediate significant improvement in the answers provided by the model

    Maybe they need some metrics to properly assess RAG vs no-RAG

  • by cat-whisperer on 5/27/25, 7:32 PM

    What about doing something just-in-time? I'm just speculating, but what if cline leverages the LSP (for instance, rust-analyzer) to track the function chain and build a tree-like context of the codebase—not the entire codebase, but just specific blobs of code?

    Would that work?

  • by nkmnz on 5/27/25, 11:04 PM

    Does cline expose this retrieval mechanism to the user? If yes, could I randomly chose points in my codebase, ask cline to do its “intelligent walk” and store the results in a graph database for graph-RAG?
  • by rtuin on 5/27/25, 3:04 PM

    Totally irrelevant on the subject, but the screen recording in the article caught my attention: what tool does one use to create the screen recording with zoom and mouse tracking?
  • by weitendorf on 5/27/25, 6:46 PM

    My company is working on a similar tool to Cline, and we had an intern project last summer to create a tool for AI-for-coding RAG: https://github.com/accretional/semantifly

    Ultimately we came to a similar conclusion and put the project on ice: chunking and vector similarity search are fundamentally not great approaches for code RAG.

    I don't really agree with most of Cline's other assertions because those are pretty easy to work around (I suspect they may just be content slop?). It's pretty easy to vectorize and re-chunk code as you change it as long as you have a fixed way of encoding vectors, and you can also generate indices or do more expensive changes to encoding as part of your CI/CD. Indices can be stored in your git repo itself so theres not really a security risk either. Our tool made this pretty easy to do. An index can literally just be a file.

    No, the problem is really that vector search (especially with a-kNN) is fundamentally a fuzzy/lossy kind of search, and even when the vector search part works perfectly, your choice of k will usually either include more information than you intend or miss information that didn't meet the top-K threshold. And naive implementations that don't add additional context or are unconditionally searching based on your prompt will probably bias or confuse your model with code that might seem relevant but isn't (eg if you are trying to debug deployments, you include a bunch of your code related to deployments, but the bug is in the application code, and also you have a bunch of deployment scripts in your codebase that are for different platforms and are extra irrelevant).

    It's significantly more work to make a vector based approach to code-RAG actually good than it is to get a naive implementation working. We have a different approach to Cline but it's similar in that it uses things like references and how the developer actually understands their codebase.

  • by wejick on 5/27/25, 3:32 PM

    I noticed that Sonnet 4 likes to use code search tool in cursor. Probably giving model option of tool to use is not bad thing to do.
  • by coreyh14444 on 5/27/25, 2:43 PM

    Yep. Have definitely been replacing RAG solutions with search+feed the context window instead lately as well.
  • by jjani on 5/27/25, 6:04 PM

    The security argument is a valid one, as long as the prompts aren't passing through Cline's servers but instead directly sent to the LLM providers. If they go through an intermediary step, it's a pretty pointless difference. Yet it's very hard to make money off of a coding assistant where the prompts don't pass through their servers in one way or form. Cline is for-profit and currently their only monetization is to get users to use their credits system, meaning prompts go through them. In other words, if Cline is to succeed and monetize you, the security advantage sounds questionable.

    This is a hilariously obvious LLM sentence by the way:

    > Your codebase isn't just text – it's your competitive advantage

    When creating articles aimed at LLM power users (which this one is), just have a human write it. We can see through the slop. Come on, you're VC backed, if you were bootstrapping I wouldn't even be calling this out.

    The other arguments I used to agree with - compression and RAG means loss of quality, increasing context windows and decreasing prices means you should just send a lot of context.

    Then I tried Augment and their indexing/RAG just works, period, so now I'm not convinced anymore.

  • by nsonha on 5/28/25, 1:08 AM

    just coincidentally I saw an excerpt of an recent interview from Swyx when someone made this exact same point. Can't find it but wonder if that's the author and anyone has a link?
  • by izabera on 5/27/25, 5:13 PM

    the third point is applicable to a number of tools and systems, but who would claim that using git doubles your security surface?
  • by esafak on 5/27/25, 2:58 PM

    "We Don't Dynamically Index Your Codebase So We Recan It with Every Query".

    Wasting time and tokens like this is not something to brag about. If indexing is so hard maybe someone should start a company just to do that, like https://news.ycombinator.com/item?id=44097699

  • by deepdarkforest on 5/27/25, 2:49 PM

    Terrible stuff and a reddish flag. First of all, gpt signs all over the blog post, reads like a bottom of the barrel linkedin post.

    But more importantly, why double and triple down on no RAG? As with most techniques, it has its merits in certain scenarios. I understand getting VC money so you have to prove differentiation and conviction in your approach, but why do it like this? What if RAG does end up being useful? You'll just have to admit you were wrong and cursor and others were right? I don't get it.

    Just say we don't believe RAG is as useful for now and we take a different approach. But tripling down on a technique so early into such a new field seems immature to me. It screams of wanting to look different for the sake of it.