xAI's Grok Build Coding Agent Uploaded Your Whole Codebase — Then Went Open Source
Grok Build quietly shipped entire Git repos to xAI's cloud, even with data-sharing off. xAI's fix: open-source the whole agent. Here's what happened.
Every AI agency and dev team evaluating coding agents just got a live case study in why data handling matters as much as model quality. xAI's terminal-based coding agent, Grok Build, spent the last week at the center of one of the year's more uncomfortable AI security stories — and then, in a fairly unusual move, xAI responded by open-sourcing the entire tool.
A researcher's wire-level traffic analysis found that Grok Build wasn't just sending the model the files it needed to complete a coding task — it was uploading entire Git repositories, full commit history included, to a Google Cloud Storage bucket operated by xAI. The numbers were stark: on a 12 GB test repository, normal model-turn traffic came to roughly 192 KB, while the storage channel quietly moved 5.10 GiB — a gap of about 27,800x between what the model needed to do its job and what actually left the machine. The uploads reportedly included files the AI had never even opened. Worse, the behavior persisted even with the "Improve the model" data-sharing toggle switched off, meaning the setting users assumed controlled this exact behavior did nothing of the sort.
The analysis hit the Hacker News front page on July 14 and spread quickly through tech press, prompting a direct response from Elon Musk, who promised deletion of all previously uploaded user data. xAI disabled the upload behavior and, days later, published the complete Grok Build source code on GitHub under an Apache 2.0 license — about 844,530 lines of Rust covering the agent loop, tool system, terminal UI, and plugin/subagent extension framework.
This isn't just a Grok-specific embarrassment — it's a reminder that trust in AI coding agents rests on infrastructure decisions most users can't see or audit. For agencies handing client codebases to any AI coding tool, the question this story surfaces is uncomfortable but necessary: what actually leaves the machine when an agent runs, and does the privacy toggle in the settings panel do what it claims? Client contracts, proprietary logic, and commit history carry real IP and confidentiality risk, and "the vendor says it's fine" is no longer a sufficient answer on its own.
The open-sourcing move is the more interesting long-term story, though. Grok Build is now a fully inspectable coding agent — read, edit, run shell commands, search the web, manage long-running tasks, either interactively, headlessly in CI, or embedded in editors via the Agent Client Protocol. For teams that want to actually verify what a coding agent does with their code rather than take a vendor's word for it, that's now possible with Grok Build in a way it isn't with most closed competitors.
The practical takeaway isn't "avoid Grok Build" or "avoid AI coding agents" — it's that data-handling claims from any AI coding tool deserve the same scrutiny as the tool's actual coding output. Before rolling out a coding agent across client work, it's worth checking whether the vendor publishes any independent traffic analysis, whether data-sharing toggles have been audited by anyone outside the company, and whether self-hosted or open-source alternatives exist for sensitive engagements. Ironically, this scandal has made Grok Build one of the more auditable options on the market.
RAG assistants on your documents, AI agents that act in your tools, and LLM features inside your product.
Our cutting-edge features simplify collaboration and creativity, making your workflow intuitive and efficient. Transform your vision into reality effortlessly with Hadidiz Flow.



