Last updated:
Quick answer
Install Claude Code and OpenAI Codex CLIs on Grok Bot’s shared cloud computer, sign in with your own Anthropic and OpenAI subscriptions, then set routing rules so writing, coding, and browser-heavy jobs hit the model you already pay for, without pasting the setup into Codex or Claude Code directly.
At a glance
All outcome figures are estimates from cited sources, not independent verification by us.
- What it is allowed to do
- Drafts for you
Writes drafts (emails, posts, plans, replies). You review and send. Nothing goes out without you.
- Time saved (estimate)
- One-time setup; saves repeated “which CLI?” confusion per task
- Money saved (estimate)
- Not stated in sources (uses subscriptions you already pay for; their usage limits apply).
- Difficulty
- Intermediate
- Tools needed
- Grok Bot, Claude Code CLI, OpenAI Codex CLI
- Typical cost
- Grok Bot: paid plan usage pool; Claude Code and Codex CLIs: draw on Anthropic and OpenAI subscriptions you already pay for. Limits and agent-use terms are provider-specific.
Reviewed Oct 19, 2026
Basis (estimate): Estimate only: one-time setup; no timed source.
What does this setup do?
Install Claude Code and OpenAI Codex CLIs on Grok Bot’s shared cloud computer, sign in with your own Anthropic and OpenAI subscriptions, then set routing rules so writing, coding, and browser-heavy jobs hit the model you already pay for, without pasting the setup into Codex or Claude Code directly.
Who is it for?
Grok Bot users who already pay for Claude and/or ChatGPT and want Bots to delegate coding or drafting to those CLIs instead of defaulting back to Grok every time.
How do you set it up?
Tools
- Grok Bot with Computer access (paid plan)
- Anthropic subscription with Claude Code CLI access (per provider terms)
- OpenAI subscription with Codex CLI access (per provider terms)
- Completed shared-computer security audit (see linked setup below)
Steps
- Read each provider’s terms for automated or agent use of a consumer or team subscription. You are routing usage through CLIs on a shared cloud machine.
- Run the Grok Bot shared-computer security audit setup first; every Bot on your account shares that computer, browser sessions, and credential files.
- Open one Grok Bot chat (any Bot you trust for setup). Paste the prompt below here, not into Claude Code or Codex terminals.
- When the Bot offers sign-in links or codes for Claude Code or Codex, complete OAuth or device login yourself; do not paste passwords or API keys into chat.
- After login, have the Bot run a short smoke test in each CLI (one harmless command each) and confirm which subscription usage pool each draw affects.
- Set default models in each CLI if prompted, then add explicit routing rules to every Bot’s instructions (e.g. “use Codex for repo edits, Claude Code for refactors, Grok for browser research”).
- Save the same routing block to shared memory or a /workspace file all Bots are told to read so rules persist across chats. Otherwise Bots tend to revert to Grok-only.
- Re-test after a day: ask a coding task and a writing task and confirm the Bot names which CLI it used.
Example output
Illustrative. Your results will differ.
- This month's spending sorted into 6 categories
- 3 subscriptions you forgot about, flagged for review
- You decide what to cut. Nothing moves on its own.
Where to paste this prompt
Claude: Claude → Project knowledge & custom instructions
Copy-paste prompt
Adapt bracketed fields to your situation.
SUBSCRIPTION CLI ROUTING SETUP (run in this Grok Bot chat only, not inside Claude Code or Codex)
Goal: On my Grok Bot shared cloud computer, install and authenticate Claude Code CLI and OpenAI Codex CLI with MY subscriptions, then document routing rules so my Bots use the right tool per job.
Safety and scope:
- Complete the shared-computer security audit mindset first: one computer per user; all Bots share files and CLI logins. Prefer an isolated host or separate Cursor user if I need hard credential separation.
- I will approve every sign-in link, device code, and OAuth screen myself. Never store tokens in plain text files other Bots can read (no committing .env with secrets to /workspace).
- If a CLI is unavailable, not installed, or a usage limit is hit, say so clearly and do the task yourself in Grok instead of failing silently.
- Ask before changing any other Bot's instructions or shared memory.
- When finished, report which Bots you updated and which CLIs authenticated successfully.
Tasks:
1) Check whether Claude Code CLI and Codex CLI are installed; install per official docs if missing.
2) Guide me through subscription login for each CLI I want (I perform login; you verify with a read-only version or status command).
3) Explain whose rate limits and terms apply for each CLI call (Anthropic vs OpenAI vs Grok usage pool). In plain language, citing what you can see from CLI output only.
4) Draft a ROUTING RULES block I can paste into each Bot's instructions, for example:
- Long-form writing / editing → [Claude Code or Codex per my preference]
- Repo coding / tests → [Codex or Claude Code]
- Browser research, connectors, email → Grok Bot native tools
- If limit hit → notify me and fall back to Grok with a short note
5) Save the ROUTING RULES to shared memory (or a agreed /workspace path) and confirm how other Bots should load it each session.
6) Run one tiny test task per CLI and show me the command output summary (no secrets).
Do not revoke connectors or delete files unless I explicitly approve after this setup.Newsletter
Get the free starter pack
Free starter pack with five beginner copy-paste prompts after you confirm, plus three sourced setups in your inbox each week. Unsubscribe anytime.
What usually goes wrong?
Where agents tend to stall on this job. More patterns in Where AI gets stuck.
- Paste the setup prompt into Grok Bot chat, not into Codex or Claude Code. Public threads ask “where do I paste this?”
- Bots revert to Grok unless routing rules live in each Bot’s instructions plus shared memory or a file they re-read.
- Subscription usage limits and rate limits are per provider; heavy coding can eat Claude or OpenAI allowance faster than Grok-only work.
- CLI login sessions expire; you may need to re-authenticate on the shared computer after updates or idle timeouts.
- CLI login on a shared cloud computer exposes credentials to every Bot on the account. Isolate the host or audit first.
Which chat tools work with this prompt?
Paste the prompt into any of these assistants (free or paid tiers).
- Grok Bot
- Claude Code CLI
- OpenAI Codex CLI
Common questions
- Do I paste this prompt into Codex or Claude Code?
- No. Paste it into a Grok Bot chat. The Bot installs and configures the CLIs on its cloud computer; you only complete sign-in when prompted.
- Do I need to ask for Claude or GPT every time?
- Public reports say Bots default back to Grok unless routing rules are in each Bot’s instructions and saved to shared memory or a file Bots reload.
- Whose usage limits am I spending?
- Tasks sent through Claude Code or Codex typically count against those providers’ subscription limits; Grok-native work uses your Grok Bot plan pool. Confirm with each CLI’s status output after login.
Where should you go next on this site?
What tips make it smoother?
- Name one “routing admin” Bot that may edit instructions; keep other Bots read-only for routing files.
- After marketplace templates, re-run a one-line routing test. Templates often omit CLI rules.
- Pair with Ask-first rules for spend and outbound send; routing does not replace approval fences.
Where do the claims come from?
Summaries use public sources linked below, not independent verification. How setups are picked.
- Read @coreyganim’s write-up (x.com)
@coreyganim: Pattern for installing subscription CLIs on Grok Bot’s computer and routing work.
- Read @solomonsgrave’s write-up (x.com)
@solomonsgrave: Where to paste setup: Grok Bot chat vs Codex vs Claude Code.
- Read @SilvaRhys70444’s write-up (x.com)
@SilvaRhys70444: Need to tell Grok to use Claude/GPT each time or it reverts to Grok.
- Read @chenxi2072332’s write-up (x.com)
@chenxi2072332: Question on whose rate limits and terms apply.
- Read @sebuzdugan’s write-up (x.com)
@sebuzdugan: CLI login exposes local credentials; isolate host first.
- Read @vaitkus’s write-up (x.com)
@vaitkus: Routing also consumes subscription limits.
Related setups
- Bot shared-computer security audit
Before you give Bot Bots more connectors or routines, run a read-only audit of what every Bot on your account can see on the shared cloud computer.
- iPhone Action Button opens one bot
Map the iPhone Action Button (or Back Tap) to a Shortcut that opens one specific Bot chat instantly, so you are not hunting the sidebar when you want the same agent every time.
- Morning inbox briefing and multi-inbox triage
Start the day with a short “what needs you” note, and periodically sort multiple inboxes into reply vs FYI vs junk, with drafts for your approval, not auto-send.