Shell commands no longer keep running after quitting grok or after grok receives a signal, and grok worktree rm and gc no longer delete worktrees that open sessions are using or directories grok did not create. Fixed a model switch reverting on restart, automatic compaction on context overflow errors and after repeated refills, and MCP replies with invalid characters timing out, plus smaller fixes across hooks, /model, and the terminal UI.
Grok Build
AI coding agent for the terminal (Grok CLI).
npx @buildinternet/releases get grok-buildThe /share command and session sharing are removed from the CLI, and memory is now only an on or off switch. Cancel and edit-resend on long sessions no longer revert workspace files, and headless grok -p waits for background goals to finish and reports their outcome.
grok worktree rm without -f now refuses to delete worktrees that are in use or have unsaved changes and exits with an error, and long sessions stay connected when the conversation exceeds 4 MiB. The release also retries stalled model calls and Chat Completions streams that end without a finish reason, prevents concurrent settings edits from dropping config.toml entries, and adds a timestamps setting plus TSV/CSV/Markdown table export.
Cancelling one tool call no longer terminates commands started by other parallel calls, and Ask rules for WebSearch and WebFetch now show a prompt instead of running on their own. The read_file, search_replace, and grep tools handle large, special, and binary files more reliably with clearer errors, and /rewind now lists only prompts you typed.
Web searches, fetches, and image generation now follow the prompt_policy setting and rule decisions before prompting, and "Allow once" on a permission card applies only to the next shell command. Hook permission prompts now appear in every approval mode, and pkill -f and pgrep -f are rejected earlier when the pattern would kill their own shell wrapper.
Switching models from the agent now updates the displayed model list and context window, and clicking the Goal chip opens the goal panel even when workflow runs are present. Error messages on the home and login screens wrap on narrow terminals, and sessions in a repository with an .envrc file start faster.
Permission rules with relative paths now apply when the working directory contains symlinks, and video cards no longer get stuck extracting posters without ffmpeg. Also faster session startup when loading skills from large directories, plus fixes to MCP server source reporting, client rule preservation on system prompt rebuilds, and slow list_dir subtree counts on network filesystems.
Custom agents from plugins or config can now be chosen directly with spawn_subagent, and MCP servers can use a token file that is re-read on every request so rotating credentials stay fresh. Also added colored notice banners above the prompt for selected models and a "Waiting for N subagents…" status when the parent turn is blocked.
A new /context-window slash command lets you pick a context window size for the current session when the model offers choices, and /model selection now offers context window choices before effort level. Pasting on Windows no longer crashes from overlapping clipboard operations, and parallel tool calls that edit the same file now run in sequence.
MCP tool prompts now appear correctly in minimal mode, and users are notified when a prompt goes unanswered.
New grok worktree create command creates a managed worktree without launching an interactive session, and plugin hooks now run on a fresh session without an explicit reload. Fixed bracketed pastes attaching leftover images, grok -p not exiting cleanly on interrupt, inline images appearing blank after repaint, and Ctrl+C twice while writing a plan comment getting stuck.
Sessions interrupted by a crash now show a clear marker instead of silently dropping the turn, and partial subagent config tables that only set limits or models no longer disable subagents. Agent frontmatter mcpServers headers and URLs override config.toml and survive reloads or agent switches, and subagent model inheritance is configurable in /settings.
Image attachments now survive multiple compactions, including images attached to the last user prompt, and local worktree capture no longer refuses repositories containing uninitialized submodules. Subagents now always use the parent model, and MCP tools that receive the wrong JSON shape are automatically corrected when the mismatch is unambiguous.
Long agent replies in prompt-suggestion transcripts are no longer cut off mid-sentence, and pasted images now survive yank, undo, and history recall, with a notification when an image cannot be sent. Subagent overlays no longer stay stuck showing "Cancelling" after the child turn ends, and long quoted arguments in permission prompts wrap instead of clipping.
Mermaid flowcharts with complex labels or large sizes now render and open correctly, and the /context legend shows accurate percentages. Bash commands using quoted filename variables respect configured permission rules instead of always prompting.
Organizations can now disable hooks that do not come from managed policy, and a dashboard preview setting hides the selected-session preview panel. Fixed grok --sandbox exiting when accepting folder trust, MCP plugin authentication for servers declaring a client ID in their manifest, and background subagent shell approvals being silently rejected.
Copy-paste in --minimal mode no longer inserts extra blank lines or breaks long paths at wrap points, and memory deletion is much faster with the /memory modal gaining copy confirmations, content search, and narrow-terminal support. Syntax highlighting uses less memory and runs faster on large TypeScript files.
Memory is now generally available in Grok Build, and Markdown headings now receive theme colors correctly.
Pasting an image on macOS no longer attaches the wrong image, and long-running sessions no longer lose older compacted history during the 30-day cleanup. MCP tool results now include structured JSON data when the server provides it, and cancelled or timed-out MCP tool calls stop instead of continuing in the background.