xAI open-sources its coding agent after a privacy backlash
xAI has published the complete source of Grok Build, its command-line coding agent, under an Apache 2.0 license. The move follows a serious privacy problem: the grok command was uploading whole directories to Google Cloud Storage without clear user consent. One developer reported that running it in their home folder sent up "my SSH keys, my password manager database, my documents, photos, videos, everything." xAI disabled the feature, said it deleted the retained data, and open-sourced the harness so anyone can inspect what the agent does. Its framing, as Simon Willison notes, is that with retention off by default and the code in the open, users get "complete user privacy."
The codebase itself is large. Willison counts 844,530 lines of Rust once comments and whitespace are stripped, with only about 3% coming from vendored dependencies, which puts it in the same range as OpenAI's Codex at roughly 950,000 lines. Inside are the system prompts that steer the main agent and its subagents, a custom Mermaid diagram renderer built on Unicode box-drawing characters, and tool code adapted from Codex, Claude, and Cursor. The disabled upload path is still visible in the source, which is part of why the release is worth reading rather than just trusting.
Why it matters
If you run coding agents on a machine that holds credentials, this is a concrete reminder that a CLI tool can quietly exfiltrate everything in reach. Open-sourcing the harness lets you actually check the data flows before you trust one, and reading Grok Build's prompts and tool definitions is a cheap way to learn how a production agent is wired.