Back
Grok Build vs. Claude Code: which coding agent has the better memory?
SiTech AI Team3 წთ. საკითხავი

Grok Build vs. Claude Code: which coding agent has the better memory?

xAI added memory to Grok Build on September 16, while Claude Code has had auto memory for months. A three-test comparison found both recall per-project rules, but only Grok carried them across repositories — at less than half the cost.

On September 16, xAI announced that memory had arrived in Grok Build, its terminal coding agent. The pitch was that Grok "keeps notes on the conventions, decisions, and project facts that come up," and that "later sessions read those notes before touching related code." The New Stack tested that claim against Claude Code, which has offered a comparable feature for months.

Two memory systems

Grok Build stores its notes as Markdown files in two scopes: a workspace scope per project and a global scope that applies everywhere, browsed with the /memory command. Claude Code's auto memory keeps a MEMORY.md index plus one file per note, scoped to each repository, and the documentation says it is on by default. Anthropic's Projects beta, announced September 17, adds shared memory across cloud threads, but only for select Pro and Max subscribers, so the test used the CLI that every user has.

How the test ran

Each tool ran on the author's Mac on its own copy of four small Node repositories. Grok Build 1.0.40 ran Grok 4.6 at high effort through an xAI API key, while Claude Code 2.1.226 ran Opus 5 on a subscription. Sessions ran in each tool's headless mode, which reports its own token use and cost. Three checks followed: recalling a test command, honoring project decisions with a deliberate trap, and carrying a rule meant for every project into a second repository.

What the numbers showed

Both agents remembered the test command in the second session. Grok read its memory files first and ran make test without ever touching npm test, finishing in 29 seconds on 102K tokens for $0.11. Claude Code also ran make test and took 22 seconds, 186K tokens and $0.32 — roughly 80K more tokens at nearly three times the price. In the second test, built around a deliberate trap, both were correct, but Claude again cost $0.49 against $0.18.

The third test split the two. Grok saved the rules to its global scope as git-and-code-style.md and carried them into the second repository, committing a --help flag with usage text and no comments for $0.12. Claude Code stored both rules only in the first project's memory folder and warned that its store "is scoped to this project's directory"; in the second repo it found nothing and failed the rule. Overall, Grok passed 3 of 3 in 165 seconds, 390,848 tokens and $0.41; Claude Code passed 2 of 3 in 66 seconds, 576,863 tokens and $1.05.

What it means

On the core claim — remembering what you told it last time in the same project — the reviewer could not tell the two apart: both wrote a Markdown note the moment a rule was stated and followed it next session, and Claude Code's notes were better written. The split came on cross-project memory, where Grok's global scope won. The review notes that the price difference mostly reflects Opus 5 versus Grok 4.6 rather than the memory systems themselves, and concludes that Grok Build is the better option for most people today: it remembered everything, carried rules across repositories and cost less than half as much on every test.

SSiTech

SiTech — AI-powered web development

We build fast, modern websites and bring AI into real business workflows. Have a project or a question? We'd love to help.