AIToday

xAI open-sources Grok Build after privacy backlash over data uploads

Simon Willison's Weblog2h ago

Key takeaway

xAI's grok CLI tool was uploading entire user directories to Google Cloud without explicit consent, prompting Elon Musk to pledge deletion of all uploaded data. xAI has now disabled the feature, deleted retained data, and open-sourced the entire Grok Build codebase under Apache 2.0 to give users the ability to run it locally and privately. The released code is 844,530 lines of Rust and reveals the tool reuses implementations from Codex and Claude.

Summaries like this, in your inbox every morning.

Sign up free →

3 Key Points

  • What happened

    xAI's grok CLI tool was uploading entire user directories—including SSH keys, password databases, and personal files—to Google Cloud without clear consent. After community outcry, xAI disabled the feature, deleted all uploaded user data, and released the entire Grok Build codebase under an Apache 2.0 license on July 12th.

  • Why it matters

    The incident exposed a serious privacy flaw in a coding assistant tool used by developers. By open-sourcing the 844,530 lines of Rust code and disabling data retention by default, xAI is attempting to rebuild trust and let users run Grok Build locally without data leaving their machines—a direct response to concerns that other major coding products do not address as explicitly.

  • What to watch

    The codebase reveals Grok Build borrows tool implementations from OpenAI's Codex and Anthropic's Claude (via xai-grok-tools), and includes a custom Mermaid diagram renderer for terminals. Remnants of the Google Cloud upload code remain in the repository but are now disabled.

In Depth

On July 15th, 2026, details emerged about a serious privacy flaw in xAI's grok CLI tool. The tool was configured to upload entire user directories to xAI's Google Cloud buckets without explicit user awareness. One user reported running the command in their home directory and discovering it had uploaded "my SSH keys, my password manager database, my documents, photos, videos, everything." The severity and scope of the unintended uploads prompted swift community backlash.

xAI responded publicly, with Elon Musk stating: "As a precautionary measure, all user data that was uploaded to SpaceXAI before now will be completely and utterly deleted." The company disabled the upload feature immediately. A few hours later, xAI released the entire Grok Build codebase under an Apache 2.0 license, framing the move as a step toward complete transparency and user privacy protection. In an official announcement, xAI explained that data retention had been enabled by default for non-ZDR (zero data retention) users in early beta, but following user feedback, they disabled retention by default for all Grok Build users starting July 12th and committed to deleting all previously retained coding data.

The released codebase is substantial: 844,530 lines of Rust, with only around 3% being vendored code. Examination of the repository reveals several technical details. The system prompts for Grok Build's main agent and subagent are stored in xai-grok-agent/templates/, with the subagent prompt containing an instruction to hide the system prompt from users—a restriction notably absent from the main agent prompt. The tool includes a custom terminal renderer for Mermaid diagrams (xai-grok-markdown/src/mermaid.rs) that draws chart types using Unicode box-drawing characters. The xai-grok-tools directory contains tool implementations adapted from OpenAI's Codex (apply_patch, grep_files, list_dir, read_dir) and Anthropic's Claude (bash, edit, glob, grep, read, skill, todowrite, write), with third-party notices indicating these are "ported from" the original projects in compliance with Apache and MIT licenses. Disabled remnants of the Google Cloud upload code remain in xai-grok-shell/src/upload/gcs.rs, while upload/trace.rs contains a hard-coded session_state_upload_unavailable error, confirming the feature has been switched off. The codebase is notably larger than OpenAI's Codex (950,933 lines of Rust), underscoring the complexity of modern terminal-based coding agents.

Context & Analysis

The grok CLI incident represents a significant privacy misstep by xAI. The tool was uploading user directories to Google Cloud buckets by default, a behavior that users discovered only through direct experience rather than clear documentation. Elon Musk's public commitment to delete all uploaded data and disable the feature appears to have been the immediate response, but xAI went further by open-sourcing the entire codebase—a move designed to demonstrate transparency and restore developer confidence.

The release of 844,530 lines of Rust code under Apache 2.0 is notable for its scope and speed. By making the code auditable, xAI allows security-conscious developers and researchers to verify that no hidden upload mechanisms remain active. The codebase also reveals that Grok Build integrates tool implementations derived from OpenAI's Codex and Anthropic's Claude, suggesting xAI built its coding agent by reusing and adapting well-established patterns from competitors. Disabling data retention by default and offering local-first operation positions Grok Build as addressing privacy concerns more explicitly than comparable coding assistants in the market.

FAQ

What personal data was being uploaded by grok?
Users reported the tool uploading their entire home directories when run there, including SSH keys, password manager databases, documents, photos, and videos.
When did xAI disable the upload feature and delete the data?
xAI disabled data retention for all Grok Build users starting on July 12th and committed to deleting all previously retained coding data.
Can I now run Grok Build without uploading data to xAI?
Yes, xAI released the full Grok Build codebase open-source under Apache 2.0, allowing users to run it fully locally with their own inference.

Discussion

No comments yet. Be the first to share your thoughts!

Log in to join the discussion

Related Articles

Stay ahead with AI news

Get curated AI news from 200+ sources delivered daily to your inbox. Free to use.

Get Started Free

Free · takes 30 seconds · unsubscribe anytime

1 minute a day. The AI essentials.

200+ sources · Email / LINE / Slack

Get it free →