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.
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.
FEATURE
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.
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.
BUGFIX
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.
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.
BUGFIX
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.
FEATURE
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.
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.
BUGFIX
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.
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.
BUGFIX
Worktree Deletion Enforces Safeguards, Blocking Active and External Folders
When cleaning up multiple project copies, essential code and active work receive tighter safeguards.
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.
BUGFIX
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.
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.
BUGFIX
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.
Original changelog
Original changelogTerminal Supports Rex, Bringing Cleaner Folding and Layout to Long Chats
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
Original changelogSubdirectories Load Project Hooks, and Status Line Tracks Turn Details
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
Original changelogModel Switches Persist Across Restarts, with Strict Validation for Effort Flags
`/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
Original changelogFile Exports Block Overwrites, with Clear Errors for Large Images and Failed Searches
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
Original changelogExiting Cleanly Halts Background Commands, and Cancellations Identify Targets
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
Original changelogReview Cards Persist Reliably, and Authorization Prompts Specify Sessions
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
Original changelogWorktree Deletion Enforces Safeguards, Blocking Active and External Folders
`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
Original changelogContext Overflow Triggers Compaction, Ending Crashes and Loops in Long Chats
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
Original changelogHeadless Mode Filters BOMs, and MCP Tools Avoid Timeouts on Invalid Characters
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