Live data from Hacker News

Show HN: CodeRLM – Tree-sitter-backed code indexing for LLM agents

github.com

11–20 of 38 posts

Re: Show HN: CodeRLM – Tree-sitter-backed code indexing for LLM agents

#11
Aider [0] wrote a piece about this [1] way back in Oct 2023!

I stumbled upon it in late 2023 when investigating ways to give OpenHands [2] better context dynamically.

[0] https://aider.chat/

[1] https://aider.chat/2023/10/22/repomap.html

[2] https://openhands.dev/

Re: Show HN: CodeRLM – Tree-sitter-backed code indexing for LLM agents

#12
post #11

Aider [0] wrote a piece about this [1] way back in Oct 2023! I stumbled upon it in late 2023 when investigating ways to give OpenHands [2] better context dynamically. [0] https://aider.chat/ [1] https://aider.chat/2023/10/22/repomap.html [2] https://openhands.dev/

I just looked and it was posted a number of times with 0 discussion

https://news.ycombinator.com/item?id=38062493

https://news.ycombinator.com/item?id=41411187

https://news.ycombinator.com/item?id=40231527

https://news.ycombinator.com/item?id=39993459

https://news.ycombinator.com/item?id=41393767

https://news.ycombinator.com/item?id=39391946

Re: Show HN: CodeRLM – Tree-sitter-backed code indexing for LLM agents

#13
post #11

Aider [0] wrote a piece about this [1] way back in Oct 2023! I stumbled upon it in late 2023 when investigating ways to give OpenHands [2] better context dynamically. [0] https://aider.chat/ [1] https://aider.chat/2023/10/22/repomap.html [2] https://openhands.dev/

Aider's repo-map concept is great! thanks for sharing, I'd not been aware of it. Using tree-sitter to give the LLM structural awareness is the right foundation IMO. The key difference is how that information gets to the model.

Aider builds a static map, with some importance ranking, and then stuffs the most relevant part into the context window upfront. That's smart - but it is still the model receiving a fixed snapshot before it starts working.

What the RLM paper crystallized for me is that the agent could query the structure interactively as it works. A live index exposed through an API lets the agent decide what to look at, how deep to go, and when it has enough. When I watch it work it's not one or two lookups but many, each informed by what the previous revealed. The recursive exploration pattern is the core difference.

Re: Show HN: CodeRLM – Tree-sitter-backed code indexing for LLM agents

#14
post #10

Great idea! I’ve been thinking about something along these lines as well. I recommend configuring it as a tool for Opencode. Going from Claude Code to Opencode was like going from Windows to Mac.

will take a look at opencode, thanks for sharing!

Re: Show HN: CodeRLM – Tree-sitter-backed code indexing for LLM agents

#15
post #5

Would this be useful to people who aren't using Claude? Maybe it should be installable in a more normal way, instead of as a Claude plugin.

I don't see why it wouldn't - but I'm not familiar with setup / integration on other platforms. Would love to hear more about your stack and see if we can't find a way for you to try it out

A CLI or slim MCP would do it. IF you want a formal plugin, here's another popular ecosystem: https://opencode.ai/docs/plugins/

Re: Show HN: CodeRLM – Tree-sitter-backed code indexing for LLM agents

#16
post #11

Aider [0] wrote a piece about this [1] way back in Oct 2023! I stumbled upon it in late 2023 when investigating ways to give OpenHands [2] better context dynamically. [0] https://aider.chat/ [1] https://aider.chat/2023/10/22/repomap.html [2] https://openhands.dev/

Aider's repo-map concept is great! thanks for sharing, I'd not been aware of it. Using tree-sitter to give the LLM structural awareness is the right foundation IMO. The key difference is how that information gets to the model. Aider builds a static map, with some importance ranking, and then stuffs the most relevant part into the context window upfront. That's smart - but it is still the model receiving a fixed snaps…

Aider actually prompts the model to say if it needs to see additional files. Whenever the model mentions file names, aider asks the user if they should be added to context.

As well, any files or symbols mentioned by the model are noted. They influence the repomap ranking algorithm, so subsequent requests have even more relevant repository context.

This is designed as a sort of implicit search and ranking flow. The blog article doesn’t get into any of this detail, but much of this has been around and working well since 2023.

Re: Show HN: CodeRLM – Tree-sitter-backed code indexing for LLM agents

#18
Excellent share, thank you. My question is with your setup, how strictly does Claude Code adhere to using this mode to traverse the codebase over grep? I have found this is to be a huge issue when implementing similar solutions... it loves to just grep.

Re: Show HN: CodeRLM – Tree-sitter-backed code indexing for LLM agents

#19
post #10

Great idea! I’ve been thinking about something along these lines as well. I recommend configuring it as a tool for Opencode. Going from Claude Code to Opencode was like going from Windows to Mac.

yeah I would definitely recommend the same. I'm a daily user of opencode and I really want to try this.

Re: Show HN: CodeRLM – Tree-sitter-backed code indexing for LLM agents

#20
i thought the reason claude code defaults to terminal-ish workflows (glob/grep) is bc they trained with bash-y sandboxes, and the creator argued for this approach vs indexing + bespoke tools. would be interesting to see how often the model defaults to using grep for everything (in my experience almost always..)
Post reply on HN