Blog Article

How to Connect Grokbot Agents to the Claude and Codex CLI

A three-beat routing rule lets any Grokbot agent operate strictly out of the Claude or Codex CLI and hand back a receipt. No integration, no engineering, no new

I had been running Grokbot and the Claude and Codex CLI harnesses side by side for the better part of a week. Two systems, both open, both working. It never occurred to me to point one at the other.

Someone in the community had to say it out loud before it clicked. Derek, one of our OGs, shared the workaround. I think it is brilliant, and I am a little shocked it took me this long, because there is nothing to build here. It is a prompt.

Here is the whole thing.

The routing rule

Three beats:

  • Name the bot. In Grokbot, you create a bot and you name it. Whatever bot you specify, you name it.
  • Constrain it to the CLI. You give it instructions to operate strictly out of either Codex or Claude out of the CLI.
  • Require a receipt. It provides a receipt so that your bot can continue doing the work specified.

That is the routing rule. No integration layer, no API glue, no new tool in the stack.

Why the word "strictly" is doing real work

The instruction is not "you can use the CLI." It is operate strictly out of the CLI. That constraint is the part that keeps the agent from quietly falling back to its own native execution when the work gets awkward. Loosen that word and you lose the routing.

Why the receipt is the load-bearing piece

The receipt is easy to read as a nice-to-have. It is not.

Without a receipt coming back, what you have is a one-shot handoff. The Grokbot agent fires work at the CLI, the CLI does something, and the agent has no idea what happened. The thread ends there.

With the receipt, the harness hands back a record of what it did, and that record becomes context. The Grokbot agent can keep going. That is the difference between a handoff and a workflow.

Give each harness a lane before you delegate

I run two dedicated chiefs in Grokbot, named literally: one called Claude, one called Codex. I do not overload a single generalist bot with both.

The split is by job, not by benchmark:

  • Claude is my researcher, front end, and wireframe agent.
  • Codex is who I rely on for most of the code base heavy work.

Deciding this in advance means the routing decision is already made by the time work shows up. You are not comparing models at the moment of dispatch. You are staffing.

What this looks like running

When I recorded the video, the handoffs were live. Not a staged demo, actual work in flight while the camera rolled:

  • An N8N clone in progress. Not ready, and I said so.
  • Sky building a fresh YouTube script pipeline front end.
  • An Electron macOS app being built.

Scrolling the message threads, Claude was heads down working and Codex was chatting back and forth. Different agents, different rhythms, same routing rule underneath.

One boundary worth stating clearly, because I stated it in the video too: I also showed some Grok 4.6 work on screen. That has nothing to do with the Claude or Codex harnesses. That is all Grok 4.6. Impressive demos have a way of bleeding credit onto whatever else is in frame, and I would rather be accurate than let that happen.

Two ways to install it, both free

Manual. Name the new bot Claude, then paste the prompt in. Same goes for Codex. Screenshot the prompt from the video and set it up yourself.

Automated. There is a master prompt that is not aimed at the coding bot at all. It is aimed at your chief of staff or executive assistant inside Grokbot, the agent that manages your roster. Feed it the master prompt and it configures the bots for you.

Either way, you can screenshot the prompt straight out of the video, or copy and paste it from clearmud.ai/resources under the Grokbot category. No gate, no email capture.

The part that actually matters

The mechanism is three sentences long. That is the point, and it is also the uncomfortable part.

I was as close to these tools as anyone. Both of them open on my machine every day for a week. No lightbulb. Proximity to the tools does not mean you see the combination. Someone in the community did, and my contribution here is packaging and distribution, not invention.

If you are running an agent stack, the useful lesson is probably not the routing rule itself. It is that the next obvious combination in your setup is likely already sitting in a message from someone you know.

I am not an AI expert. I am building in public and sharing what actually works.

If you want me to cover a specific topic, drop a comment: who you are, what you do, who your target audience is, and what your question is. I will add a video to the queue custom tailored for you.

My name is Marcelo. This is Clear Mud, and Clarity Matters.

Watch the full video: https://www.youtube.com/watch?v=Zz73ct9z8KY

Watch the full walkthrough on YouTube.

Watch on YouTube