1,311 karma · joined July 5, 2017
Unlike some other AI coding IDEs, Claude Code doesn't either keep your entire codebase in context, or use some sort of vector representation and vector search of your code. It basically uses grep to find a keyword it's looking for then reads the file (it can also just read a few lines of a file too) into its context.
It seems to be the "magic" of Claude Code..it's very UNIX like, uses existing tools to do what it needs to do instead of trying to re-invent the wheel, so to speak.
Here's the ollama version (4.6bit quant, I think?) run with --verbose total duration: 21.193519667s load duration: 94.88375ms prompt eval count: 77 token(s) prompt eval duration: 1.482405875s prompt eval rate: 51.94 tokens/s eval count: 308 token(s) eval duration: 19.615023208s eval rate: 15.70 tokens/s
15 tokens/s is pretty decent for a low end MacBook Air (M2, 24gb of ram). Yes, it's not the ~250 tokens/s of 2.5-flash, but for my use case anything above 10 tokens/sec is good enough.
Note: I know pretty much nothing about racing but I have had that idea in my head for a while about the added weight. Maybe from a friend who told me his bike wasn't UCI compliant because it weighed too little?
Good for humans example: https://docs.expo.dev/llms-full.txt
Bad for humans example: https://www.unistyl.es/llms-small.txt
This could have been somewhat trivial to implement from scratch too (not using the Agent/Vercel SDKs), but it sure made it convient! It's basically one run({model:'sonnet4', prompt: systemPrompt, tools: [tool1, tool2, tool3]}) call. Much nicer than implementing a loop and all that logic by hand.
A MCP server is really just a collection of functions the model can call, and a list of those functions and their description/input params. In theory the MCP connector is calling /get-tools on the MCP servers and injecting that into the prompt, so the model knows which tools are available, their description and input params. It's then up to the model to pick a specific tool to use.
I don't know where specifically the MCP tools are injected into the prompt or what the original system prompt is (ie: maybe it's saying "always give the internal tools priority and only use MCPs if nothing else fits").
It could be the MCP server has poor descriptions of the tool. That is what the model uses to decide to use it or not.
It could also be the model just sucks. Claude Opus/Sonnet seem to be some of the best at tool calling, but it's still up to the model to pick which tools to use. Some models are better than other. Some models start to regress in their tool calling abilities as the context window fills up.
My instinct is the MCP tools have bad descriptions. I've done a bit of reverse engineering of Claude Code and most of the tool descriptions are very detailed. "Use this tool to call a bash command" would be a bad tool description. The Claude Code bash tool description is 110 lines long containing detailed usage information, when to use it, when not to use it, example usage and etc. It also has a summary at the bottom of very important things (that were just written above in the same description) for the model not to forget (they use the word IMPORTANT and YOU MUST a lot in the prompts/descriptions)
In theory, an AI should be able to fetch the llms.txt for every library and have an actual authoritative source of documentation for the given library.
This doesn't work that great right now, because not everyone is on board, but if we had llms.txt actually embedded in software libraries...it could be a game changer.
I noticed Claude Code semi regularly will start parsing actual library code in node_modules when it gets stuck. It will start by inventing methods it thinks should exist, then the typescript check step fails, and it searches the web for docs, if that fails it will actually go into the type definition for the library in node_modules and start looking in there. If we had node_modules/<package_name>/llms.txt (or the equivalent for other package managers in other languages) as a standard it could be pretty powerful I think. It could also be handled at the registry level, but I kind of like the idea of it being shipped (and thus easily versioned) in the library itself.
Works less well on other models. I think Anthropic really nailed the combination of tool calling and general coding ability (or other abilities in your case). I’ve been adding some extra tools to my version for specific use cases and it’s pretty shocking how well it performs!
Otherwise CC has been stellar and I live it’s a CLI + optional vs code extension.
It goes to show how the big athletic shoe companies are taking the piss. Of course they have middlemen and retailers and whatnot who need to take their cut, but if I can buy a pair of nice leather shoes, made from leather from UK/French/Italian tanneries, with about a million steps done by a human, for the same price as some glued together foam and fabric...something is wrong.
The ideal form factor might be a smart plug itself, but I can’t find any with hackable firmware and also matter/thread/wifi.
I can't wait for a more technical deep dive into how this works and compares to react native.