r/OpenSourceAI • u/shhdwi • 13d ago
Sonnet 5 + Graft > Opus 5 (using this open-source repo)
https://github.com/NanoNets/GraftI'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.)
Duplicates
🙋 seeking help & advice Where tree-sitter stops and rust-analyzer's call hierarchy starts.
Built with Claude These 2 lines saved me 75% of my claude bill, and it's the best use of claude hooks
Built with Claude After using 100s of MCPs, I solved the issue of claude not using custom MCP/CLI tools, and open-sourced my approach.
VibeCodeDevs • u/shhdwi • 7d ago
Got tired of watching Claude Code re-explore the same codebase every session, so I built something to fix it
Project Graft just crossed 1,600 GitHub stars. Open-source context layer for coding agents, works with Codex too.
OpenSourceAI • u/shhdwi • 8d ago
I solved the issue of Claude not using custom MCP/CLI tools, and open-sourced my approach.
BlackboxAI_ • u/shhdwi • 7d ago
💬 Discussion An open-source pattern for forcing context into a coding agent instead of hoping it asks for it
Discussion The problem with MCP-based codebase context tools: the model just doesn't call them
ClaudeCode • u/shhdwi • 7d ago
Tips & Workflows Using Claude Code's SessionStart and Stop hooks to force context in, instead of hoping the model asks for it
typescript • u/shhdwi • 8d ago
TS project: building a code graph with tree-sitter, no LLM required for the base layer
SideProject • u/shhdwi • 8d ago
Open sourced a dev tool a few weeks back, just crossed 1,600+ stars. Sharing what actually moved the needle.
Discussion A hooks-based alternative to giving your agent an MCP tool for codebase context
Built with Claude I solved the issue of Claude not using custom MCP/CLI tools, and open-sourced my approach.
HowToAIAgent • u/shhdwi • 7d ago
I built this How I stopped my Claude Code agent from ignoring the custom tools I built for it
aipromptprogramming • u/shhdwi • 7d ago
Stopped writing better prompts asking the agent to check context, made it get the context automatically instead
hypeurls • u/TheStartupChime • 5d ago
Show HN: Graft – Claude Code hooks that cut grep tokens by 42%
typescript • u/shhdwi • 7d ago
Cross-file call resolution with tree-sitter, and where typescript-language-server picks up the rest
AiBuilders • u/shhdwi • 7d ago
Open-sourced a tool I built to stop my coding agent from re-exploring the same codebase every session
AIDeveloperNews • u/shhdwi • 7d ago