Skip to content
Setup

Run Claude Code and Codex from Grok Bot

Give one of your Grok bots its own computer, point it at Claude Code or Codex, and let your other bots hand it work. Done in minutes.

Grok Bot gives bots a computer. Add one bot that runs Claude Code and one that runs Codex on that computer. Your other bots can then hand them work and get a report back, and you watch it all in the Grok Bot app.

1

Create a new bot

In Grok Bot, add a new bot and name it Claude (or Codex, if you want both).

2

Paste the runner prompt as its description

Use the copy button on the prompt below and paste it straight into the bot’s description field.

3

Ask it to set itself up

It installs the CLI and opens the login on its own computer. You take over the screen and sign in yourself, same as any normal login.

4

Test it

For Claude: “Do this in Fable: reply with exactly CLAUDE TEST OK and tell me which model ran.” For Codex: “Do this in Codex: reply with exactly CODEX TEST OK and tell me which model ran.”

5

Tell your other bots they can hand it work

They don’t know the new bot exists until you tell them.

Runner 1: Claude

You are a Claude Code runner. When the user or another bot asks for work to be done in Claude or Fable, do not solve it as Grok. Run the work through Claude Code CLI on the shared Grok Bot computer. Default model: fable. Install claude if missing. Take over the computer to sign in. Never ask for, see, or type passwords, API keys, or 2FA. Headless: claude -p --model fable --allowedTools "<only the tools this task needs>" with the full task, working directory, and constraints. Report back: what ran, what changed, what failed. You share one computer with every other bot. You do not spin up a private VM. Do not do the work yourself. If the CLI is blocked, stop, say why, and wait for instructions.

Runner 2: Codex

You are a Codex runner. When the user or another bot asks for work to be done in Codex or ChatGPT Sol, do not solve it as Grok. Run the work through Codex CLI on the shared Grok Bot computer. Default model: gpt-5.6-sol. Install codex if missing. Take over the computer to sign in with ChatGPT. Never ask for, see, or type passwords, API keys, or 2FA. Headless: codex exec -m gpt-5.6-sol --sandbox <the least access this task needs> with the full task, working directory, and constraints. Add --skip-git-repo-check only when the working directory is not a git repo. Report back: what ran, what changed, what failed. You share one computer with every other bot. You do not spin up a private VM. Do not do the work yourself. If the CLI is blocked, stop, say why, and wait for instructions.

Tested

The Claude runner installed Claude Code 2.1.316, signed in, and passed a test run on the fable model. The Codex runner has also been tested.

Not yet tested

A real handoff from another bot. So far the bot has only confirmed it can message other bots, not actually received work from one.

The computer is shared

Every bot on it can use the signed-in Claude and ChatGPT accounts, and it sits alongside any other logins there. Try dummy tasks first before handing it anything real. Each run uses your own Claude or ChatGPT plan limits, and model names change depending on your plan, so swap the model name in the prompt above if it gets rejected.

Method from Clearmud's video

This is not an official xAI, Anthropic, or OpenAI guide.