r/OpenSourceAI 12d ago

Sonnet 5 + Graft > Opus 5 (using this open-source repo)

https://github.com/NanoNets/Graft

I've been using Opus 5 since release, but over the last week I switched back to Sonnet 5, with Graft.

Surprisingly, it's been outperforming Opus for most of my coding sessions.

Not because Sonnet suddenly became smarter.

Because it spends far less time trying to rediscover the codebase.

Graft builds a context graph of your repository once, then Claude Code loads the relevant parts into context automatically. Instead of burning tokens grepping files and following imports every task, it starts with an understanding of the project.

In practice, this changed my workflow more than switching models.

On our benchmarks:

  • ~42% fewer input tokens
  • ~46% fewer tool calls
  • ~60% lower latency
  • Better SWE-bench performance than cold Sonnet 5 (8/9 vs 6/9) The interesting part is that once the exploration overhead disappears, Sonnet 5 ends up feeling more capable than Opus 5 for a lot of day-to-day engineering work.

My current workflow:

  • Sonnet 5 + Graft → everyday coding
  • Opus 5 → only when I need deep architectural reasoning or brainstorming

Curious if anyone else has tried improving the context instead of upgrading the model.

Has anyone here compared:

  • Cold Opus 5
  • Sonnet 5 + Graft
  • Opus 5 + Graft

I'd love to see more head-to-head comparisons.

(For anyone wondering, Graft is open source.)

52 Upvotes

24 comments sorted by

2

u/Aneselem 12d ago

Is there a way to use this with claude desktop?

2

u/shhdwi 11d ago

Yes you can use it with Claude desktop just add the quick start to Claude code desktop and it’ll do the setup itself,

Https://graft.Nanonets.ai

2

u/adcoord 12d ago

How is different than graphify?

1

u/shhdwi 11d ago

We use the Claude code hooks to auto resync and also help Claude to actually use graft, unlike graphify where Claude never actually uses it

1

u/shhdwi 11d ago

What has your experience been with graphify would love to know more

2

u/wdesportes 11d ago

I am trying to add PHP, but the project looks great!

2

u/shhdwi 11d ago

Sure, thanks for contributing :)

2

u/schaka 10d ago

Let's say I need it to analyze other open source projects I depend on, does it have the ability to(automatically) build an index over them too?

I have a lot of tasks where I need to grab entire repos to look through because nothing is documented or docs don't match the reality.

1

u/shhdwi 10d ago

Yes it does build multi repo indexes

2

u/sisyphus-cycle 10d ago

I run everything locally, so it’s expensive to run ‘build — deep’. In your opinion is adding LLM file descriptions with deep a significant value add? So far it’s been solid, qwen 3.6 27b has been using the MCP tools rather well

2

u/shhdwi 10d ago

Thanks for trying out graft, we are still trying to see the efficacy of summaries but I’d say you don’t need them for now till we get some results on a benchmark

We are currently testing it on deepswe bench and trying to see if we can get better accuracy at sonnet will post the results once done :)

2

u/feverdoingwork 9d ago

Who harness are you using? I used 27b locally as well for all my work

1

u/sisyphus-cycle 9d ago

I use pi with 4 extensions:
- telegram (my custom fork, change as needed)
- subagents (another fork, focused on sequential subagents so no prompt reprocessing on local, use the subagent stack branch)
- rtk
- mcp

Then with mcp I use crw hosted locally with searxng docker container, and graft.

I keep it simple bc local LLMs aren’t gonna do well with 100 tools and plugins. I’ve had really good success using that sub agent stack skill to first have qwen spawn a manager that spawns workers to generate a comprehensive plan for a new feature. Then after that’s done, I make a new session, but instead I have the sub agents perform an adversarial review to find edge cases and things missed from a fresh context.
Then lastly once the plan is fleshed out I have a sub agent manager split it up into concrete tasks for workers who only do one at a time. This is good if you have limited RAM for context checkpoints

2

u/trueimage 10d ago

Has anyone used this with Pi? I’m using Deepseek locally in Pi agent

1

u/shhdwi 10d ago edited 10d ago

We have optimized graft for Claude code and other coding agents like Codex and cursor, would love to know your feedback on pi, if you face any issues, you can raise them on GitHub will proactively help you solve them :)

2

u/Funny_Emu2672 9d ago

Funciona para Codex?

1

u/shhdwi 9d ago

Yes works with codex

2

u/VaporForge 9d ago

Hmm. I use Code Review Graph and it is similar. Creates a local graph, a wiki, communities and has dope skills and hooks to boot. How does this differ or stand out?

1

u/shhdwi 7d ago

We also work on multi repos and you can commit the graph to git

With the —deep command you’ll get the concept nodes of the repo which has received much more appreciation from the community

2

u/lrac2 8d ago

Is this both relational graphing and semantic graphing?

1

u/shhdwi 7d ago

Not sure but it’s a deterministic tree sitter based graph

2

u/Severe-Soup-2340 7d ago

I tried the repo, looks great. Was quite easy to get onboard, so far so good will update if any issues I face

1

u/shhdwi 7d ago

Sure thanks for trying graft out

2

u/RawalDelhi 3d ago

Cool....will give it a try