grok_execute

A command that switches a task-local Grok Executor Mode on or off. Grok Executor Mode assigns execution work to a supervised Grok session for the current project directory.

In plain words
What is it for?
Turning Grok execution on or off for a project, while preparing or reusing its supervised session when needed.
Why use it?
It provides an explicit way to control whether the task uses that supervised executor and checks that the required session is available.

Command

Part of the grok-build-supervisor plugin — 2 skills, 2 commands shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/vanyangyang/cursor-bridge/grok_execute
Clone the repo
git clone --depth 1 https://github.com/Vanyangyang/cursor-bridge

Or install grok-build-supervisor, the plugin that ships this one along with the rest of its 2 skills, 2 commands.

Per session 14 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 701 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00014 $0.00701
Opus 5 $0.00007 $0.00351
Sonnet 5 $0.00003 $0.00140
Haiku 4.5 $0.00001 $0.00070

Measured 3d ago against content hash 079889a75b4b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

grok_execute scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/grok-build-supervisor/commands/grok_execute.md · 16 lines

What it actually says

Grok Executor Mode Toggle

Use $grok-executor-mode for the task-local role contract and $grok-build-supervisor for Grok session operations. This command is a prompt-level task policy, not a native host collaboration-mode switch.

Interpret the entire trimmed value of "$ARGUMENTS" case-insensitively:

  • on: bind Grok Executor Mode to the current host task's absolute project directory and immediately ensure its supervised Grok session is ready. Before changing mode state, call grok_session_inspect with view: status. If the proxy is not initialized, the project directory is unavailable or ambiguous, another workspace owns active Grok work, or session setup fails, leave the mode off and report only the actionable next step. Otherwise reuse the exact attached visible session for this directory or call grok_session_open with that absolute cwd, mode: new when no session is attached, the default presentation: windows_terminal, and confirmation: OPEN_GROK_SESSION. Use mode: resume only with an exact verified attached session UUID. If open returns needs_workspace_trust, leave executor mode pending and tell the user once that Grok is waiting for their trust decision in the already-open terminal and that /grok_execute on does not need to be run again. Do not answer this as a tool permission, simulate input, or pass --trust. After the user confirms, inspect the same session again; the Supervisor reuses that terminal and reports ready when Grok registers it. Commit the task-local mode and workspace binding only after the visible TUI is verified ready. Reply briefly that executor mode is on, the terminal is ready, and the user can provide the task. Render user-facing prose in the language of the user's latest substantive message unless the user explicitly requests another language; do not persist an inferred language. Preserve tool names, states, paths, IDs, and exact permission/form options verbatim. This activation authorizes opening the terminal but must not call grok_session_prompt or send development work. Never ask the user for a separate TUI command. Repeated on is idempotent and must reuse a trust-pending TUI rather than opening another one.
  • off: explicitly deactivate Grok Executor Mode for the current host task, clear its task-local workspace binding, and confirm briefly. Subsequent ordinary tasks use normal host behavior. Do not automatically cancel a running Grok prompt, disconnect ACP, close the visible TUI, or stop the owned Leader; continue any already-required Supervisor monitoring under its normal contract. Repeated off is idempotent.
  • Empty or any other value: do not change mode state, create a session, or send work. Reply only with the usage /grok_execute on or /grok_execute off.

Only the most recent exact /grok_execute on or /grok_execute off in this task controls the mode. The workspace selected by a successful on is task-local and must not be written to global proxy settings or silently changed while the mode remains active. Ordinary Grok mentions, task text, direct Skill invocation, partial matches, and every other command must not activate or deactivate it. Activation does not broaden permission for destructive work, publication, external writes, or consequential owner decisions.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 16 lines · 14 tokens per session scan A 079889a75b4b

Subscribe to this mod's changes

grok_execute is a command published in the GitHub repository Vanyangyang/cursor-bridge (51 stars, last pushed 3d ago), licensed MIT. It adds 14 tokens to every session and 701 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.