The similar-argument tip is not a file loader. grok --system-prompt-file <prompt-path> --version exited 2. Standard error named --system-prompt and printed a usage line for --system-prompt-override. A missing path passed to --system-prompt, next to a prompt file that does exist, did not fail the read. It reached the sign-in error. The same missing path passed to --prompt-file exited 1 before any sign-in line, with No such file or directory.
That split is the check before a setup script treats the tip as the 1.0.91 file flag, or treats a later changelog sentence as a description of this binary.
The binary
The binary was Grok Build 1.0.67, build 2fe064390d07, on Linux x86_64, on 28 November 2026. grok version printed grok 1.0.67 (2fe064390d07). The grok name on PATH is a symlink. The file it resolves to is 194169184 bytes, dated 22 October 2026. Its SHA-256 is ce33b1a29e37901f56fe59916cda7a1149e6fd377118f918e90d89f9abb52a51. This run did not install a newer build.
grok update --check --json, pointed at a new GROK_HOME, printed currentVersion 1.0.67, latestVersion 1.0.92, updateAvailable true, and channel stable. The error field was null. The changelog page fetched the same night lists 1.0.92 as the latest entry, dated 19 November 2026. The 1.0.91 entry on that page, the same day, says --system-prompt-file <path> loads a system prompt override from a file. That sentence is not this binary. The update check is the reason not to copy the sentence onto a 1.0.67 command line. It is not a test of 1.0.92.
Each file check used a new GROK_HOME and a new working directory. No grok login was part of those checks. No API key was set. The account config.toml and trusted_folders.toml kept the modification times recorded before the checks. A headless invocation still wrote the bundled user guide under the disposable home, so the check is not a pure read of the executable. Delete that home when you are done. Do not point the check at the account grok home if the files under test are disposable.
The rejection
On this binary, grok --help lists --system-prompt-override and describes it as an override of the agent’s system prompt. The same line names --system-prompt as the compat alias. It lists --prompt-file separately, as a single-turn prompt from a file. It does not list --system-prompt-file. The long help from grok help has the same split. The bundled headless chapter written into the disposable home says --prompt-json and --prompt-file trigger headless mode, and its extra-flag table lists --system-prompt-override as an override of the agent’s system prompt. That chapter does not name --system-prompt-file.
The public CLI reference fetched the same night, marked last updated 21 July 2026, also lists --system-prompt-override as a full replacement of the system prompt, and lists --system-prompt among the Claude Code aliases. It does not list --system-prompt-file. The public headless page, marked last updated 10 June 2026, lists --prompt-file as the prompt from a file. The file flag lives on the changelog, not on this help text.
The rejected command was:
grok --system-prompt-file <prompt-path> --version
Exit code 2. Standard error was:
error: unexpected argument '--system-prompt-file' found
tip: a similar argument exists: '--system-prompt'
Usage: grok --system-prompt-override <PROMPT> [PROMPT]
For more information, try '--help'.
The same text was printed when --help replaced --version. The tip is the parser’s similar-argument hint. It is not the 1.0.91 changelog sentence, and it does not say the named flag reads a file. The usage line under the tip already names the text form, --system-prompt-override, and the placeholder is PROMPT, not a path.
Two missing-value errors make that type difference explicit. grok --prompt-file --help exited 2 and said a value is required for --prompt-file <PATH>. grok --system-prompt-override --help exited 2 and said a value is required for --system-prompt-override <PROMPT>. One slot is a path. The other is prompt text. The tip points at the second family.
grok --system-prompt <prompt-path> --help exited 0 and printed the top-level help. That exit does not show whether the alias opens a file. --help is handled as help. Use a missing path, not --help or --version, when the question is whether the flag reads.
The file read happens first
--prompt-file opens the path before sign-in. With GROK_HOME pointed at a new directory, this command exited 1:
grok --prompt-file <missing-file>
Standard error was one line:
Error: Failed to read '<missing-file>': No such file or directory (os error 2)
Standard output was empty. There was no sign-in sentence.
A directory in that slot failed the same way, still before sign-in:
grok --prompt-file <directory>
Exit 1. The line was Failed to read '<directory>': Is a directory (os error 21).
--version is the wrong witness for that read. grok --prompt-file <missing-file> --version exited 0 and printed grok 1.0.67 (2fe064390d07). Standard error was empty. The version flag returns before the prompt file is opened. A green version check beside a missing --prompt-file does not mean the path is valid. Drop --version when you want the read.
The bundled headless chapter says a prompt passed non-interactively triggers headless mode, and that --prompt-file is one of those triggers. The missing-file result matches that order. The process tried to read the prompt, failed, and never reached the sign-in check. That is the error you want when a path was supposed to be opened.
The tip does not open the path
The flag named by the tip does not do that read. Three commands each exited 1. Each had a real prompt file, so the prompt-file read could succeed. The system-prompt value was a path that --prompt-file had already rejected:
grok --system-prompt <missing-file> --prompt-file <prompt-file> --output-format json --disable-web-search --no-subagents
grok --system-prompt <directory> --prompt-file <prompt-file> --output-format json --disable-web-search --no-subagents
grok --system-prompt-override <missing-file> --prompt-file <prompt-file> --output-format json --disable-web-search --no-subagents
None of them printed Failed to read. None of them printed Is a directory. Standard error on each was:
Error: Not signed in. To authenticate without a browser, run:
grok login --device-code
Alternatively, set the XAI_API_KEY environment variable or run `grok login` on a machine with a browser.
Standard output was one JSON object, type set to error, with that same message. The disposable log for those commands did not contain the body marker written into the prompt file, and it did not contain the body marker written into the file whose path had been passed as the system prompt. This run did not complete a login, and it did not send a model turn. The sign-in error is as far as the accepted path went.
That is the misread. A script that sees the tip, substitutes the file path into --system-prompt, and treats any exit other than 2 as “the file was loaded” will accept a missing file and a directory. Both reached authentication. The path string was taken as override text. The file was not opened. On a signed-in machine the same shape can spend a turn with the path, not the file body, installed as the system prompt. This run stopped before that turn. It is enough to show the file was not required.
The sign-in line names grok login --device-code. grok login --help on this binary lists --device-auth and marks --device-code as its alias. The public install table fetched the same night says to use grok login --device-auth when there is no browser. The error text and the install table are two names for the flag help already joins. They are not a second file-loader. Do not treat the sign-in line as evidence that --system-prompt read a path. It is the next error after the path was accepted as text.
Test the tip before you follow it
Run the file check and the tip check in a new GROK_HOME, from a directory that is not the account grok home. Create one real prompt file. Do not create the missing path.
grok --system-prompt-file <prompt-path> --version
grok --prompt-file <missing-file>
grok --system-prompt <missing-file> --prompt-file <prompt-file> --output-format json --disable-web-search --no-subagents
Require exit 2 and the usage line that names --system-prompt-override before you conclude this binary lacks the changelog flag. Require exit 1 and No such file or directory from the second command before you trust a later sign-in error. Require the third command to print Not signed in and not Failed to read. If the third command prints a file-read error, the tip’s flag opened the path on that build, and this note does not describe it.
Do not add --version to the second or third command. Do not use --help as the file test. Do not pass the file path to --system-prompt or --system-prompt-override and then look for the file body in the reply. If the override has to be the file’s text on 1.0.67, read the file in the shell and pass the text to --system-prompt-override. If the user prompt has to come from a file, pass that path to --prompt-file and require the missing-file error when the path is wrong.
Do not install 1.0.92 in the middle of the check. grok update --check --json can tell you the stable version is newer. It does not make --system-prompt-file exist on the binary that just rejected it. After an install, repeat the first command. The flag is present only when help lists it, or when a missing path in that slot fails the read the way --prompt-file failed it here. Until then, the similar-argument tip is a text flag.
Sources
- Grok Build 1.0.67, build
2fe064390d07, Linux x86_64, 28 November 2026. The resolved executable is 194169184 bytes, dated 22 October 2026, SHA-256ce33b1a29e37901f56fe59916cda7a1149e6fd377118f918e90d89f9abb52a51. DisposableGROK_HOME. No login and no model turn. Commands weregrok version,grok update --check --json,grok --help,grok help,grok login --help,grok --system-prompt-file,grok --prompt-fileagainst a missing file and a directory, andgrok --system-promptplusgrok --system-prompt-overrideagainst those same paths beside a real prompt file. - Bundled headless chapter written by that binary into the disposable home.
--prompt-filetriggers headless mode.--system-prompt-overridereplaces the system prompt.--system-prompt-fileis not named. - CLI reference, fetched 28 November 2026, page date 21 July 2026.
--system-prompt-overridereplaces the system prompt.--system-promptis listed as a Claude Code alias.--system-prompt-fileis not listed. - Headless and scripting, fetched 28 November 2026, page date 10 June 2026.
--prompt-fileis the prompt from a file. - Grok Build changelog, fetched 28 November 2026. Version 1.0.91, dated 19 November 2026, adds
--system-prompt-fileto load a system prompt override from a file. The same page lists 1.0.92 as latest. This host’s update check reported 1.0.92 and this run did not install it. - Grok Build overview, fetched 28 November 2026. The no-browser sign-in command in the install table is
grok login --device-auth.