Open-source sync to 0.2.116: richer headless streaming-json, /undo as an alias for /rewind, mode-aware slash commands, plus 0.2.115 history/LSP/auth fixes and stronger prompt caching.
Changelog
[changed] Headless --output-format streaming-json now includes tool calls, results, and usage (newline-delimited ACP-derived events).
[new] Headless --output-format streaming-messages-json with optional --include-partial-messages for Messages-style framing and partial rebuilds.
[new] /undo slash command — restores files and chat to an earlier turn; same behavior as /rewind.
[changed] Slash commands are hidden or refused in minimal or fullscreen mode according to each command’s declared support.
[fix] Chat history corruption that could duplicate tool results or cause later 400 errors after repeated identical tool calls.
[fix] Language server crashes (e.g. Roslyn on every edit) and missing C# diagnostics; more reliable diagnostics for other servers.
[changed] Improved prompt caching on long conversations, cutting repeated billing on growing transcripts.
[fix] Repeated forced re-logins after laptop sleep or network hiccups during token refresh.
[fix] Infinite redirect loops in embedded previews when the browser blocks the required cookie.
[fix] External auth provider commands (auth_provider_command) on Windows.
[fix] Spurious history load warnings on draft conversations that have no server history yet.
[fix] Settings enum pickers keep the selected radio on the current value until you press Enter.
[fix] Deep-linked settings (e.g. /privacy) close the settings modal on Esc or Enter instead of returning to the list.
[fix] Incorrect “Turn cancelled by user” messages on internal send-now wake turns.
[changed] Action-stationarity nudge no longer incorrectly claims tool results were identical.
[new] grok-4-fast model entry.
Agent & tools
/rewind gains alias /undo (documented in sessions and slash-command guides; Esc Esc idle shortcut unchanged).
Minimal vs fullscreen command filtering: fullscreen-only (/find, /jump, /timeline, /theme, /tutorial, /workflows, /dashboard) and minimal-only (/expand, /edit-prompt) are omitted from the menu/palette in the wrong mode, with a clear refusal if typed anyway.
LSP: new workspaceOpen config (solution or projects) so servers like Roslyn load a real solution/projects instead of miscellaneous files; diagnostics/document/refresh paths tightened.
Headless output surface expanded around tool-call and usage events; stopReason values normalized to snake_case ACP/Messages tokens in JSON results.
Docs
user-guide/14-headless-mode.md — four output formats, streaming-json / streaming-messages-json event shapes, usage bucket policy (including cache_creation_input_tokens), and --include-partial-messages.
user-guide/04-slash-commands.md — /undo alias, render-mode filtering, and clearer minimal/fullscreen wording.
shell-README.md — workspaceOpen for language servers that need an explicit solution or project list (with a Roslyn example).
Under the hood
New xai-grok-extra-ca crate and GROK_EXTRA_CA_BUNDLE for extra CA material; related env hooks (GROK_AUTH_FORCE_DARK_WAKE, GROK_SKILLS_BASE_URL).
Skills client and headless reducer/message paths extended for tool-call, usage, and web-search streaming.
Clippy policy: ban unenrolled Command::spawn (prefer ProcessScope::enroll) alongside the existing canonicalize ban.
Workspace package versions advance to 0.2.116.
Upgrade notes
No special migration for source builds. If you rely on headless JSON, re-check parsers for streaming-json tool/usage events, snake_case stopReason, and the optional streaming-messages-json shape.
C# / Roslyn users who saw empty project diagnostics should set workspaceOpen in the language-server config (see shell README).