Grok · 5 min read

Headless prompts accept flags after -p, stdin and a system prompt file

Headless Grok Build runs now take flags after -p, read a prompt from stdin and load a system prompt from a file. The week also brings MCP dynamic headers, faster session switching and a /models refresh command.

Key takeaways 5
  • `-p` now accepts flags after it and joins extra words into the prompt, and a bare `-p` reads the prompt from stdin.
  • `--system-prompt-file <path>` loads a system prompt override from a file, and positional prompts without `-p` run headless when no terminal is available for the TUI.
  • MCP servers can specify a `headers_helper` command for dynamic request headers, and `/mcps` can re-authenticate a hosted connector with `i` then `y`.
  • Sessions get a `/rename` command on the dashboard, a fork offer for sessions open in another window, and Ctrl+[ / Ctrl+] switching across all open sessions.
  • The new `/models` command refreshes the model list from the server, and `grok login --device-auth` covers sign-in on SSH and remote machines.

Scripting an agent usually means fighting its argument parser, wiring up a prompt that does not fit on the command line, and hoping the right system prompt gets loaded. This week’s headless changes remove several of those frictions: -p is more forgiving, stdin works, and the system prompt can come from a file. Around that, MCP gets dynamic headers and easier re-authentication, session management gets quicker, and /models lets you refresh the model list without restarting anything.

Week 47 (November 16-20, 2026) covers versions 1.0.88 to 1.0.93: six releases and 135 changelog entries. Below are the changes that matter most for daily work, with the conditions the documentation gives.


Headless prompts that fit how scripts are written

Flags can follow -p. -p now accepts flags after it and joins any extra words into the prompt (1.0.91). You no longer have to put every option before the prompt text, and an unquoted multi-word prompt ends up as one prompt.

A bare -p reads stdin. If you give -p no prompt text, Grok Build reads the prompt from stdin (1.0.91). That makes it easy to feed in a prompt assembled by another tool or kept in a file.

System prompt from a file. --system-prompt-file <path> loads a system prompt override from a file (1.0.91). A long system prompt can now live in version control instead of being squeezed into a shell string.

Positional prompts work without a terminal. As of 1.0.92, a positional prompt without -p runs headless and prints its reply when the process has no terminal for the TUI. This applies to a CI job, a cron entry or any other process without a TTY. In those cases the call no longer needs -p to behave sensibly.

The documentation for these options is at headless scripting.

Two related changes from 1.0.92 are in the technical notes: MCP image results in headless output, and what grok inspect shows.


Changes for everyday work

Dynamic headers for MCP servers. An MCP server can now specify a headers_helper command that provides dynamic request headers (1.0.88). If your server needs headers that change between requests, a command can produce them instead of a fixed value in the config. See MCP servers.

Re-authenticating a hosted connector. In /mcps, press i then y to re-authenticate a hosted connector and choose fresh permissions (1.0.90). That is useful when a connector was approved with the wrong scope.

Rename without opening. The new /rename command on the dashboard renames the selected session without opening it (1.0.89). With many sessions, you can tidy the names directly from the list.

Fork a session open elsewhere. Ctrl+F or /fork now offers to fork a session that another Grok window has open (1.0.91).

Switch across all open sessions. Ctrl+[ and Ctrl+] switch between all open sessions, including fresh ones with no typed content yet (1.0.91). Details are in the sessions documentation.

Refresh the model list on demand. The new /models command refreshes the available model list from the server (1.0.89). A session whose model is removed from the list switches models (1.0.90). The command is listed under modes and commands.

Clearer limit-hit switches. When you hit a limit, the model switch now shows the exact settings it will select, for example ‘Switch to Auto (Standard, Terse)’, and the limit box applies exactly the settings the backend suggested (both 1.0.88). The label now matches what you get, which is a practical improvement.

Sign-in on remote machines. On an SSH or remote machine, use the device code flow with grok login --device-auth. Once you are in a session, /usage shows your credit usage. Both are described in the overview.


Technical notes

MCP and headless output.

  • MCP tool results that contain images now include those images in headless streaming and JSON output (1.0.92).
  • grok inspect shows the hooks a headless run would load and marks those that still need folder trust (1.0.92). Run it before you wire a headless job into CI.
  • Sandbox profile failures are now reported on stderr, on the welcome screen and in /doctor instead of failing silently (1.0.90). Silent failure is the worse option for anything unattended, so this is a welcome fix.

Lists and panels.

  • /mcps shows hosted sections expanded by default, unless a section contains more than ten servers (1.0.89).
  • /hooks rows now show the hook file name and list settings in readable fields instead of raw commands (1.0.89).
  • Pressing Enter on a workflow in the /workflows list opens its file for viewing and searching (1.0.89).

TUI and dashboard.

  • Arrow keys on the welcome screen move through the menu directly from the prompt (1.0.91).
  • /release-notes, /docs and /help now open while the dashboard is active (1.0.88).
  • Answering No with text on a subagent card shows that subagent’s reply in the main chat (1.0.90).
  • The Agent Dashboard shows every session at a glance and flags which agents need input. The Status Line shows live session context in a row at the bottom of the TUI.

What to take away

If you work in the terminal:

  • Try /models when the model list looks stale, and check that the limit-hit switch label matches what you expect.
  • Use Ctrl+[ and Ctrl+] to move between sessions, and /rename on the dashboard to give them useful names.
  • On a remote box, sign in with grok login --device-auth and check /usage for your credit usage.

If you run parallel sessions:

  • Try Ctrl+F or /fork on a session that another window has open.
  • Use the dashboard to rename sessions without opening them, and watch which agents are flagged as needing input.
  • Answer No with text on a subagent card and confirm that its reply appears in the main chat.

If you administer integrations and company deployments:

  • Check whether any of your MCP servers can use a headers_helper command for dynamic request headers.
  • Use i then y in /mcps to re-authenticate hosted connectors with fresh permissions.
  • Run grok inspect to see which hooks a headless run would load and which still need folder trust.
  • Test headless jobs with -p and stdin, --system-prompt-file, and positional prompts without a terminal. Also look for sandbox profile errors on stderr or in /doctor.

Sources: the Grok Build changelog, versions 1.0.88 to 1.0.93 (week of November 16-20, 2026), and the Grok Build documentation. Features can change in availability, particularly those still in beta.

Patrick Zandl trains teams in Claude Code and agentic software development in Prague and writes about what actually works in real-world AI-assisted projects. Follow on LinkedIn

Read next

Get the next one by email

Every Tuesday: what changed in Claude Code, Codex and other coding agents, plus new articles. No spam.