BUILD / speed-up-a-slow-grok-cli-session

Build

Speed up a slow Grok CLI or Build session

Speed up a slow Grok CLI or Build session

Long Grok Build / CLI runs often spend turns on web search, planning, subagents, or rediscovering project conventions. The CLI exposes flags and files that cut that work without inventing hidden “fast mode” switches.

Put durable rules on disk

Load project conventions once via AGENTS.md (and related rule files) so each turn does not re-ask for build commands and layout. See Make Grok Build follow your AGENTS.md. Confirm discovery with:

grok inspect

Trim what a single run is allowed to do

From the CLI reference, useful one-shot flags:

Flag Effect
--disable-web-search Skip built-in web search for that session
--no-plan Disable plan mode for that session
--no-subagents Keep work on the main agent
--max-turns <n> Cap how many agent turns the run may take
-m, --model <id> Pin a model (grok models lists what you can use)
--effort <level> Set reasoning effort for the run

Example headless pass that stays local and bounded:

grok -p "Summarize src/ and list failing tests" \
  --disable-web-search \
  --no-plan \
  --no-subagents \
  --max-turns 20

Interactive TUI sessions can still use /model, /compact, and related slash commands from Modes and Commands when a long thread grows heavy. See Compact a long Grok Build session.

Prefer headless for scripted jobs

For scripts and bots, start with a prompt in headless mode:

grok -p "Explain the architecture" --output-format streaming-json

Headless usage is documented on the Build overview. Pair it with --cwd, and use --always-approve only when you accept auto tool execution. Permission --allow / --deny rules tighten the sandbox when you need them.

Memory and weekly usage

Pitfalls

  • There is no documented consumer toggle that promises a fixed wall-clock latency for every prompt. Use the flags and rule files above.
  • --always-approve / --yolo speeds approvals by skipping them — only use it when that risk is acceptable.
  • Consumer Grok chat on grok.com is a different surface from the Build CLI; this page is for grok / Grok Build.