usage

Grok Build 1.0.52

Tools and page contents
On this page

New 3

01

Terminal Supports Rex, Bringing Cleaner Folding and Layout to Long Chats

Working closely with AI in the terminal, nothing is more frustrating than scrolling stutter or suddenly scrambled formatting. ⟦Picture flipping through a beautifully formatted magazine, where columns align neatly against margins and foldout pages expand smoothly at a touch without creasing through lines of text.⟧ The application now officially supports the Rex terminal and OSC 7501 control sequences. Tool call groups inside the terminal stay expanded when new operations are added, and pressing Ctrl+E during long conversations expands or collapses thinking processes much faster. When hyperlinks inside prompts or quotations wrap across lines due to length, clicking them still reliably opens the complete URL. Inline tags within model responses will no longer disrupt layout alignment. In addition, the in-session menu for resuming earlier sessions, when set to ungrouped, now mirrors the ungrouped layout on the welcome screen.

Original changelog

Added support for OSC 7501 and the Rex terminal

Expanded tool-call groups stay expanded as new calls join them, and Ctrl+E expands or collapses thinking faster in long transcripts

Wrapped URLs in prompts and quotes link to the complete address

Inline tags in agent replies no longer break line layout

The in-session resume picker matches the ungrouped layout on the welcome screen when that layout is configured

02

Subdirectories Load Project Hooks, and Status Line Tracks Turn Details

When writing automated extensions for a project, custom rules across different directories now apply with precision. ⟦Think of dedicated guard stations on each building floor, where checking into a floor activates local patrol protocols, wiring faults trigger on-the-spot warnings, and duty boards constantly display order sequence numbers for active tasks.⟧ If you launch grok from a subdirectory of a repository, project hooks under that subdirectory will now load correctly. HTTP hooks connecting to local localhost also operate properly, immediately raising an error during loading if a URL is incorrect. Furthermore, command statusLine scripts at the bottom of the terminal can smoothly retrieve the prompt ID and start time of the current turn while the turn runs.

Original changelog

Project hooks in a repository subfolder load when you launch inside that folder

HTTP hooks to localhost work, and bad hook URLs are reported at load time

Command status-line scripts see the current turn prompt ID and start time while the turn is active

03

Exiting Cleanly Halts Background Commands, and Cancellations Identify Targets

When you hit the interrupt key or exit the program, active tasks now wrap up cleanly. ⟦A stage manager calls cut over the intercom: stage lights and backstage machinery immediately power down in unison, the clapperboard logs the halted scene, and machinery never idles backstage after the cast departs.⟧ Previously, after quitting grok or sending an interrupt signal, certain background commands continued consuming resources behind the scenes; now, exiting faithfully terminates all child processes spawned by the session. When you trigger a cancellation in the terminal, the screen explicitly displays which command was stopped. If you use /workflow stop to halt a workflow, the program accurately targets tasks currently running without mistakenly terminating other processes.

Original changelog

Shell commands no longer keep running after you quit grok, or after grok receives a signal

Cancelled terminal commands show the command that was stopped

/workflow stop picks the correct live run

Fixed 6

04

Model Switches Persist Across Restarts, with Strict Validation for Effort Flags

When switching to a more suitable model to solve a problem, your configuration is now reliably preserved. ⟦Much like switching shooting modes on a professional camera, a jammed dial never silently overwrites custom menus, rebooting preserves the last selected gear, and adjusting advanced parameters illuminates a warning light whenever the lens lacks support.⟧ Previously, if switching models via /model failed mid-operation, the footer display and saved default model were still overwritten; now, a failed switch leaves the existing state intact. After a successful switch, restarting grok no longer reverts to the previous model. If you use grok -p --effort to specify reasoning effort, the program directly rejects invalid effort values, and it explicitly issues a warning if the active model ignores this parameter.

Original changelog

/model switches that fail no longer change the footer or the saved default model

grok -p --effort warns when the model ignores the flag, and refuses invalid effort levels

Restarting after a model switch no longer reverts to the previous model

05

File Exports Block Overwrites, with Clear Errors for Large Images and Failed Searches

When organizing conversation logs or searching project contents, blocked operations no longer fail silently. When using export or copy features, if the destination file already exists, the program proactively refuses to overwrite it and displays a clear prompt to keep existing content intact. Pasting an oversized image exceeding 50 MB into the terminal triggers an explicit rejection message instead of silently swallowing the file. When tools execute a grep search or use list_dir to list folders, any search timeout, execution failure, or unreadable directory now explicitly reports an error instead of returning blank output as if nothing was found. Where you previously had to guess whether an operation was dispatched or finished, every obstacle now comes with clear feedback.

Original changelog

Export and copy refuse to overwrite an existing file, and show a clear message

Pasted images over 50 MB are rejected with a clear message instead of being dropped silently

grep and list_dir report a clear error when a search times out or fails, or the folder cannot be read, instead of returning no results

06

Review Cards Persist Reliably, and Authorization Prompts Specify Sessions

When leaving AI to handle complex tasks in the background, the key approval cards requiring your sign-off will no longer play hide-and-seek. ⟦Consider an executive's urgent pending folder, where incoming petitions from each department are stamped with their respective project marks, large drafting boards slide aside upon arrival, and pending requisitions remain securely on the desk even after the leadership meeting adjourns.⟧ Review cards submitted by background subagents no longer vanish without reason when a parent turn ends. Pop-up authorization notifications now explicitly indicate which session requires your approval. In minimal mode, if a permission prompt coincides with a hidden plan or cancel panel, the screen reliably renders the permission prompt. Whenever a review card appears, the program also automatically closes the block viewer to prevent card content from being obscured.

Original changelog

Approval cards for background subagents no longer disappear when the parent turn ends

Approval notifications name the session that needs approval

Minimal mode shows the permission prompt instead of a hidden plan or cancel panel when both are present

Approval cards close the block viewer so the card is visible

07

Worktree Deletion Enforces Safeguards, Blocking Active and External Folders

When cleaning up multiple project copies, essential code and active work receive tighter safeguards. ⟦Rental car return inspections enforce a strict checklist: vehicles with active leases on the road cannot be deregistered, and returning an outside vehicle or a master lot key is turned away on the spot.⟧ When managing worktrees, running grok worktree rm or gc garbage collection cleanup will directly refuse deletion if an active session is currently using that copy. grok worktree rm also erects strict safety boundaries, flatly refusing to remove any Git repository, .git directory, or any folder not created by grok itself, preventing mistyped commands from causing disaster.

Original changelog

grok worktree rm and gc no longer delete a worktree that an open session is using

grok worktree rm refuses to delete git repositories, .git folders, or any directory grok did not create

08

Context Overflow Triggers Compaction, Ending Crashes and Loops in Long Chats

During lengthy conversations with AI or extensive tool usage, the frustration of exhausted memory space now has an automatic resolution mechanism. ⟦An executive secretary condenses key highlights as meeting minutes swell, freeing notebook space so discussions proceed, and pauses to verify after overflowing pages three times in a row rather than tearing out sheets blindly.⟧ If a tool turn runs overly long and includes custom post-tool hook output, the program proactively summarizes and compacts the content instead of colliding with prompt length limits. When a context overflow error occurs, the program automatically triggers compaction rather than letting the current turn crash. To prevent runaway compaction from consuming resources, automatic compaction pauses after filling the context three consecutive times, preventing infinite loops.

Original changelog

Long tool turns that include PostToolUse hook output compact instead of hitting the prompt length limit

Context overflow errors trigger automatic compaction instead of failing the turn

Auto-compaction stops after three context refills in a row instead of looping

09

Headless Mode Filters BOMs, and MCP Tools Avoid Timeouts on Invalid Characters

When feeding prompt batches via automation scripts or connecting external services, bizarre errors caused by invisible characters are now eliminated. In headless mode, if a prompt file starts with a BOM byte-order mark common to Microsoft files, the program proactively strips it away, preventing extraneous markers from reaching the model or corrupting JSON prompt files. When external tools return results over MCP, invalid characters in the payload will no longer trigger tool call timeouts or freezes. Where invisible encoding symbols previously caused subtle bugs that abruptly halted scheduled tasks or left processes hanging, character parsing issues of this kind are now resolved. ⟦Automated ticket gates scan transit cards: where invisible adhesive residue or stray smudges once jammed the turnstile, the sensor now filters out surface noise to let passengers through smoothly.⟧

Original changelog

Headless prompts that start with a byte-order mark no longer send that mark to the model, and no longer break JSON prompt files

MCP tool replies that contain invalid characters no longer cause the call to time out