XNews

Grok Build open-sourced and user quotas reset

Grok Build open-sourced and user quotas reset

Grok Build was open-sourced and user quotas were reset. - Grok Build codebase publicly published - All user quotas were reset for Grok - Release framed as response to uploaded-code security incident - Repository described as ~800k lines of engineering - Prompts and tools available for download - CLI layered: Pager/Shell/Tools/Workspace - Supports headless, TUI, ACP front-ends - Local compilation and config.toml-driven local backends - Agent Harness has seven components (Leader, Session Actor, AgentActivity, Turn, Sampler, Subagent Coordinator, Tool Index) - Leader supports Stdio/Headless/ACP with 4-byte length-prefixed JSON and 64MB frame limit - Turn accepts eight PromptOrigin types determining history visibility - Tool Index uses BM25 over MCP tools with identifier tokenization - Two-pass history compression: NOTE₁ 95% then NOTE₂ with final 5% - Snapshots cut at tool-call boundaries; tool_calls not split - Goal suite with goal_stop_detector using nine regex patterns - Dual doom-loop defenses: client regex + server SSE with thresholds - Subagent states, atomic running gauge, cancel_with_outcome three-state returns - Per-client capability routing (terminal/fs_read/fs_write/code_nav) based on client flags

Key insights

Grok Build open-sourced and quotas reset

SpaceXAI announced that Grok Build has been open-sourced and that usage quotas were reset for all users. The open-source move was presented as a response to prior security concerns about uploaded user code and as a transparency measure to rebuild trust. The repository and related code (Agent Harness, CLI components, prompts and tools) were published publicly and linked from announcements. A GitHub repo was referenced in community posts reporting the release and reset.

Agent Harness: seven-layer architecture disclosed

The open-sourced Agent Harness was described as a seven-layer structure: 1) Leader process (single resident process with three ingress modes: Stdio, Headless WebSocket relay, and ACP embed; uses 4-byte big-endian length-prefixed JSON frames with 64 MB single-frame limit); 2) Session Actor per session driven by mpsc::UnboundedSender<SessionCommand> with state exposed via Arc<Mutex>; 3) AgentActivity view to let external tasks probe non-Send MvpAgent busy state and enable graceful shutdown; 4) Turn abstraction with eight PromptOrigin types determining history/scrollback visibility; 5) SamplerActor handling retries and interacting with Responses API SSE; 6) Subagent Coordinator state machine (pending→active→completed) binding parent_prompt_id and foreground/background distinctions; 7) Tool Index using BM25 over MCP tools rebuilt per search.

Grok CLI layered design and local-first capability

Grok CLI was described with four decoupled layers: Pager (UI) ↔ Shell (runtime) ↔ Tools (capabilities) ↔ Workspace (host interaction). This design enables headless, TUI, and ACP entry points to reuse the same runtime and toolchain. The codebase supports local-first deployment: it can be compiled locally, pointed at user local inference backends, and driven by config.toml to address data sovereignty and offline scenarios.

Engineering highlights: hierarchical compression and safety modules

Grok Build includes a two-pass hierarchical compression scheme: 95% of history is summarized into NOTE₁, then NOTE₁ plus the last 5% becomes NOTE₂; snapshots are cut at tool-call boundaries and tool_calls are never split from ToolResult. The system enforces prompts to include prior summaries to avoid early forgetting. There is a goal management suite including goal_stop_detector using nine locked regex patterns to detect ’giving up’ language and inject nudges, emitting observability events. Dual doom-loop defenses combine client-side regex and server-side SSE signals with thresholds (default max_threshold=8, max_retries=2) to detect and resample repetitive tails.

Subagent behavior, tooling, and routing details

Subagents use a pending→active→completed state machine, track parent_prompt_id, and support foreground/background semantics; running gauges use atomic recomputation to avoid drift; cancel_with_outcome returns three states (Cancelled / AlreadyFinished / NotFound); worktree snapshot refs support resume hydration. Tool Indexing uses BM25 over MCP tools rebuilt each search with identifier tokenization by __/_/-/camelCase. Per-client capability routing allows a single leader to independently route terminal, fs_read, fs_write, and code_nav based on client terminal flags.

Repository scale, contents, and community rationale

Community reports state the repository is an ~800k-line engineering project with full prompt texts downloadable, a mix of self-developed and ported tools, and components for memory dreaming, anti-deadloop strategies, hashing, and a single-leader process. Posts framed open-sourcing as a corrective response to a prior code-upload security incident and as a means to allow community supervision and transparency.

Source posts