Every Bot works on a real cloud computer with a terminal. A tip making the rounds on X puts that terminal to an unexpected use: install the command-line tools for Claude Code and OpenAI Codex, sign in with subscriptions you already pay for, and let your Bots hand certain work to them.
This guide explains where the tip came from, walks through the steps using each vendor's official sign-in flow, and lists the things to check before you try it. This is a community setup, not a Grok Bot feature, so it's worth understanding what you're turning on.
Where it came from
On October 7, Elon Musk posted that going forward, Grok Bot will use the best back-end model for any given task, naming Claude Opus 5.5, MidJourney, Suno “and other leading APIs.” (We covered what that means in Which AI model is behind Grok Bot?.)
The same day, Andrew Warner replied with a shortcut: you don't have to wait. Ask your Bot to connect to your AI subscriptions. In his description, the Bot opens a terminal on its own computer, installs the Claude Code and Codex command-line tools, you sign in once, and from then on it can assign work to those models. “No API keys,” he wrote.
A week later, Corey Ganim said it worked well for him. He sent Andrew's post to his own Bot, it installed both tools, he logged in to each, and then he updated his Bots' instructions and shared memory to prefer Claude for writing and Codex for coding and computer tasks.
He followed up with a full, copy-ready prompt.
What you need
- A Grok Bot account.
- A Claude plan that includes Claude Code. Anthropic's docs say
claude setup-tokenrequires a Pro, Max, Team or Enterprise plan. - A ChatGPT plan. OpenAI's help center says Codex is included across ChatGPT plans, including Free and Go, with usage limits that vary by plan.
You don't need both. Many people will only want one.
How it works, step by step
Here's the shape of Corey's prompt, with what each step does and what the official docs say about it.
1. Install the two command-line tools
Your Bot installs the Claude Code CLI and the OpenAI Codex CLI on its computer. Corey's prompt also tells the Bot to “upgrade Node if needed.”
2. Sign in to Claude with claude setup-token
This is Anthropic's documented way to sign in where a browser login on that machine isn't practical. Per the Claude Code authentication docs:
- It opens the same browser authorization flow as `/login`.
- After you approve, it prints a one-year OAuth token to the terminal. It does not save the token anywhere.
- You set it as the
CLAUDE_CODE_OAUTH_TOKENenvironment variable wherever Claude Code should run. - The token can only make model requests. It can't fetch claude.ai connectors or start Remote Control sessions.
In Corey's version, the Bot sends you the sign-in link, you approve in your own browser, and the Bot stores the token privately and loads it automatically.
3. Sign in to Codex with codex login --device-auth
OpenAI's Codex docs recommend device code authentication for remote or headless machines, which is what a Bot's cloud computer is. The Bot runs the command and shows you a link and a one-time code. You open the link in your own browser, sign in to ChatGPT, and enter the code.
One catch from OpenAI's docs: device code login is in beta, and for a personal account you may need to enable device code login in your ChatGPT security settings first. For a workspace account, an admin has to allow it.
4. Set default models and test
Corey's prompt asks the Bot to set default models, run a quick test prompt through each tool, and report which model answered. That last part is a good habit: it proves the sign-in worked before you build anything on top of it.
5. Add routing rules to your Bots
Finally, the prompt adds a short block of “model routing rules” to each Bot's instructions and to shared memory, so future Bots follow it too. His version, in short:
- Writing (drafts, emails, posts, copy): write with Claude through the CLI, then check against the Bot's voice rules.
- Coding, scripts, data work and terminal tasks: use Codex.
- Browser and desktop tasks: keep using the Bot's normal computer tools.
- If either tool fails: do the task without it, and say so.
That fallback line is important. Without it, a Bot can stall when a token expires.
A safer version of the prompt
If you want to try this, here's a trimmed version that keeps you in control of each sign-in:
> Help me connect my Claude subscription so you can use it for writing tasks. > 1. Install the Claude Code CLI on your computer. > 2. Run claude setup-token and send me the sign-in link. I'll approve it in my own browser. Don't ask me for my password. > 3. Store the token as a secret only you load when running Claude Code, and tell me where it's stored. > 4. Run one short test prompt and tell me which model answered. > 5. Don't change any other Bot's instructions yet. Show me the routing rule you'd add first.
Swap in codex login --device-auth for the ChatGPT version.
Who this is for
- People already paying for Claude or ChatGPT who want their Bots to use those plans.
- Builders who prefer a specific model for a specific job and want it applied consistently.
- Not for someone who just wants good results. Per Elon's note, Grok Bot already picks a back-end model per task. Try the default first.
Gotchas
- Read the terms. Anthropic's legal page says subscription OAuth sign-in is meant for ordinary use of Claude Code by plan purchasers, and that advertised Pro and Max usage limits assume ordinary, individual usage. It also says it does not prevent an end user from signing in to the unmodified Claude Code binary with their own subscription, including where a platform hosts Claude Code. Running it for your own Bots, on your own plan, matches that description. Sharing your token with other people does not.
- Every Bot can see the computer. Grok Bot's docs say all your Bots share one cloud computer, including files and logins, and you should treat anything placed on it as available to every Bot you run. A token stored there is usable by all of your Bots, which is the point here, but it's also a reason to only do this on an account you control.
- Tokens expire. Anthropic describes the setup token as a one-year token. Put a reminder on your calendar. The fallback rule keeps your Bots working if a sign-in stops working.
- Two plans, two sets of limits. Anthropic says the setup token authenticates with your Claude subscription, and OpenAI says Codex usage limits vary by ChatGPT plan. Heavy routing can run into those limits.
- “No API keys” isn't quite “no keys.” The Claude token is a long-lived credential. Treat it like a password: never paste it into a public chat, and revoke it if you stop using it.
- The model names will change. Corey's prompt names specific models. Check what each tool currently offers before you copy them.
The takeaway
The tip works because each Bot has a real terminal, and both Anthropic and OpenAI publish sign-in flows built for machines without a local browser. Go slowly: connect one tool, test it, read the terms, and only then add routing rules to your Bots.
