Grok Bots Directory
Submit a Grok Bot

Use a Grok Bot as the daily entry for Claude Code and Codex work

A post on r/GrokBot asked how to make Grok Bot the daily driver and single point of contact: the Bot plans the work, Claude Code and Codex do the heavy website SEO and review work, everything runs on Grok Bot's cloud computer, and the work continues when the laptop lid is closed. The author said they had already tried for two days without success. This page is a careful attempt, not a verified success story. Official docs confirm parts of the setup. The composed workflow was not run end to end for this draft.

Checked on

The playbook

What the source post asked

A post on r/GrokBot asked how to make Grok Bot the daily driver and single point of contact. The author wants to give instructions to that Bot, have it plan the work, and have Claude Code and Codex do the heavy website SEO and code-review work. They want everything to run on Grok Bot's cloud computer so the work continues when the laptop lid is closed. They said they had already tried for two days without success. Treat that as the author's account, not as a completed setup. This draft did not retrieve the post's author handle, comments, or vote counts (N/A).

What official docs confirm

xAI's Use the computer and apps page, checked on 2026-11-12, says your Bots work from a persistent cloud computer with a browser, command line, and filesystem, and that work continues while your laptop is closed. The FAQ states the same fact as a direct answer: Bot work runs on the cloud computer, and closing the app, laptop, or phone does not stop a background turn or a routine.

That cloud computer is not the Mac or Windows machine in front of you. A Bot runs a command on your local computer only if you allow it, under Settings → Computer → Your computer, labeled Execution on this computer (or Execution on Local Computer until a desktop is listed). The default is Ask every time. If your laptop sleeps when the lid is closed, a Claude Code or Codex process that was started on that laptop does not keep running just because a Grok Bot asked it to. The lid-closed path in the official FAQ is the Bot's cloud work, not your local CLI.

Shared computer, files, and recovery

Every Bot on your account uses one cloud computer. Files, browser sessions, and command-line credentials are shared. Official wording: do not use separate Bots as a security boundary, and do not place a credential on that computer if another Bot should not be able to use it. Each Bot gets its own screen. One Bot can run only one computer-use task on its screen at a time.

Keep durable project files in /workspace. Files, browser state, and supported sign-ins usually survive a normal computer update or recovery. Treat temporary directories, manually installed packages, and uncommitted application state as replaceable. Project folders such as node_modules or a Python virtual environment are not saved; reinstall them after a computer update, Recover, or Reset. Recover and Reset interrupt running work. Files that exist only on your Mac or Windows machine are not covered.

An official coding handoff that is not this CLI setup

How Grok Bot works says Bots can hand coding work to Cursor Cloud Agents and attach the results to the reply. Files and results adds that when the Cloud Agent finishes, the Bot copies cited files to its computer and attaches them. Those agents run on separate computers under your existing Cloud Agent controls, which a team admin can disable. That is a documented orchestrator pattern. It is not the same product as Claude Code or Codex, and it is not a process on the shared Grok Bot computer.

No exact public success case

A remembered earlier example is not evidence. Prior GBD playbooks and a search of official docs and public pages did not turn up a named, checkable report that a Grok Bot started Claude Code and Codex on its shared cloud computer, completed website SEO or code-review work, and kept that CLI work going while the owner's laptop was closed.

Analogous cases, with the missing equivalence stated:

  • Official Grok Bot background turns and routines on the cloud computer, with the laptop closed, are documented. That is the Bot's own work, not a verified Claude Code or Codex child process.
  • Official delegation to Cursor Cloud Agents is documented. Those runs use separate Cloud Agent VMs.
  • Third-party blogs describe installing the CLIs on the Grok Bot computer. They are not treated as success cases here. Official Codex docs say --full-auto is no longer supported, so copy-paste recipes that still use it are stale.

The source Reddit post is a failed two-day attempt, not a working example.

What remains untested

The composed workflow in the source post is untested in this draft: the Bot plans a website SEO or review task, starts Claude Code or Codex on the shared cloud computer, captures logs and exit status, leaves the laptop closed, and later verifies the result. Official docs confirm that a background turn or routine continues after you close the laptop. They do not document the lifetime of a CLI child process after that turn ends, or after Recover or Reset. This draft does not invent a session, tmux, or restart guarantee. The steps below are instructions, not a run we executed. Do not install, sign in, or start a CLI just because you are reading this page.

Try the pattern carefully

  1. Name the computer before you install anything

    Write down which machine will run the heavy work.

    • Grok Bot cloud computer. Official docs: work can continue after you close the app or laptop, because it runs in the cloud. All of your Bots share that computer. This is the path the source post asked for.
    • Cursor Cloud Agent VM. Official docs: a Bot can hand coding work to a Cloud Agent on a separate computer. Use this when you want an official coding handoff without installing another vendor's CLI on the shared Grok Bot computer.
    • Your laptop, through Execution on Local Computer. Official docs: this is a separate capability, default Ask every time. It is not the lid-closed path. If the laptop sleeps, a local CLI on that laptop stops.

    If you need the lid-closed behavior the official FAQ describes, do not point Claude Code or Codex at your laptop.

  2. Set approval and credential boundaries

    Before any install or sign-in, set the limits in Grok Bot and in the vendor CLI.

    In Grok Bot, add narrow Ask first rules for sending, publishing, deleting, purchasing, pushing to a shared branch, or changing production systems. Official guidance: only your own messages count as instructions, but those checks do not remove every risk. Never paste passwords, one-time codes, or API keys into ordinary chat. For a site login, let the Bot use Vault, a connected password manager, or a Secure Form, or take control of the computer for single sign-on, a passkey, or a CAPTCHA. For an API key, use the secure secret card so the value is not written into the chat or shown to the Bot.

    Treat anything stored on the cloud computer, including ~/.claude or ~/.codex/auth.json, as visible to every Bot on your account. Official Codex docs say ~/.codex/auth.json contains access tokens and must not be pasted into tickets or chat.

  3. Run a smoke test only

    Do not point either CLI at a production repository yet. Confirm the cloud computer meets the vendor's published system requirements first. Claude Code's official setup page lists Ubuntu 20.04+, Debian 10+, or Alpine Linux 3.19+, plus 4 GB of RAM, as supported Linux options. Official Grok Bot docs say the hosted computer runs Linux, but they do not name the distribution. If an installer refuses the environment, stop and record the error. Do not invent a workaround.

    On the cloud computer, official Linux install commands, checked on 2026-11-12, are:

    curl -fsSL https://claude.ai/install.sh | bash
    
    curl -fsSL https://chatgpt.com/codex/install.sh | sh
    

    For Claude Code, official setup says to open a new terminal and run claude --version. A working install prints a version number. If the command is not found, follow the official PATH fix on that same page. This draft did not run those commands.

  4. Sign in without putting secrets in chat

    Let the Bot hand you the computer for the vendor login. Complete only the blocked step, then tell the Bot to continue.

    For Claude Code, official authentication says: run claude and follow the browser prompts, or run claude auth login first. If the browser does not open, press c to copy the login URL and open it yourself. If the browser shows a code instead of redirecting, paste it at Paste code here if prompted. A Claude.ai free plan does not include Claude Code. If ANTHROPIC_API_KEY is set, Claude Code may use it after you approve the key, which bills API usage instead of a subscription.

    For Codex, official CLI and authentication docs say: run codex and choose Sign in with ChatGPT, or run codex login and complete the browser flow. On a headless machine, official docs prefer device-code login (codex login --device-auth, beta, and the setting must be enabled in ChatGPT security or workspace permissions). API key login is printenv OPENAI_API_KEY | codex login --with-api-key. Check the method later with codex login status. Sign out with codex logout.

    Do not copy auth.json through chat. Official Codex docs allow copying that file only through a controlled path, and they treat it like a password.

  5. Run one disposable task in one worktree

    Give the orchestrator Bot one task at a time, in one project folder under /workspace. Do not start Claude Code and Codex on the same files at once. Official Grok Bot docs: one Bot can run only one computer-use task on its screen at a time.

    Start with a read-only check in a throwaway clone or a branch you can delete. Official non-interactive commands, checked on 2026-11-12:

    Claude Code, from Run Claude Code programmatically:

    claude -p "What does this repository contain? Do not edit files."
    

    Claude Code exits 0 on success and a non-zero code when the run fails. Combine -p with --allowedTools only when you have decided which tools may run without a prompt. Official docs also note that -p shows no workspace-trust dialog. --bare skips subscription login and requires ANTHROPIC_API_KEY or an apiKeyHelper instead. --continue resumes the most recent conversation; on Claude Code v2.1.257 or later, official docs say --continue opens a background session that has finished, not one that is still running. Use --resume with a session id for a specific conversation.

    Codex, from Non-interactive mode:

    codex exec "summarize the repository structure and list the top 5 risky areas"
    

    By default, codex exec uses a read-only sandbox and prints progress on stderr and the final message on stdout. To allow edits, official docs use --sandbox workspace-write. --sandbox danger-full-access is only for a controlled environment. --full-auto is no longer supported. Codex requires a Git repository unless you pass --skip-git-repo-check and you are sure the environment is safe. To continue a previous exec, official docs use codex exec resume --last "..." or codex exec resume <SESSION_ID>.

  6. Capture status, logs, output, and exit status

    Ask the orchestrator Bot to report, in the chat, all of the following after every run: the working directory, the exact command, where the log file was written, a short excerpt of stdout and stderr, and the process exit status. Official Claude Code docs: branch on the exit status (0 or non-zero). Official Codex exec docs do not define a numeric exit-code table on the page checked for this draft, so record whether the process ended, keep stderr, and do not invent a meaning for the code.

    Watch the run in the Grok Bot computer preview. Official docs: you can leave the preview while cloud work continues, and closing the app or laptop does not stop a background turn or routine. That statement was not independently verified for a Claude Code or Codex child process after the Bot's turn ends. If you cannot see a live process, a log, or an exit status, treat the run as unfinished.

  7. Verify the result yourself, then decide

    Do not let the same Bot that started the CLI be the only reviewer. Read the diff, the SEO findings, or the review notes yourself, or hand them to a second reviewer or to a Cursor Cloud Agent review, and compare them with the official source or staging site. Official Files and results guidance: ask for facts found in source systems, assumptions, actions already completed, actions waiting for approval, and unresolved questions. Keep the final artifact in the conversation or in a clear /workspace path, not only in a runner's memory.

    Merge, publish, or deploy only after that independent check. This draft does not authorize those actions.

  8. Cancel, and set cost and time limits

    Before a long run, tell the Bot the time box and the spend box in the same message as the task: when to stop, that it must not start a second run if the first is still going, and that it must come back for approval if it would exceed either limit. Claude Code and Codex usage follows your own Anthropic or ChatGPT (or API) plan. Official vendor pages, not this draft, are the source for current prices and included usage.

    If you need to stop a run, use the Grok Bot computer preview to interrupt or take control, and stop the CLI process you started. Official docs say Recover and Reset interrupt running work, but they are recovery tools, not a normal cancel button. Do not Recover or Reset just to stop a CLI.

    This draft does not document an official guarantee that a CLI session resumes after a cancel, a finished turn, or a computer Recover.

  9. Consider the official Cloud Agent path instead

    If installing Claude Code or Codex on the shared computer is blocked, or if you want a documented coding handoff, ask the Grok Bot to give the coding task to a Cursor Cloud Agent. Official docs: the work runs on a separate computer under your Cloud Agent controls, and cited result files can come back on the Bot's reply. That path can continue while your laptop is closed because it is also cloud work, but it is still not Claude Code or Codex. Team admins can turn this delegation off.

    Use it as a substitute when the CLI path is not working, and say so plainly: the tools, the machine, the approval model, and the worktree are different.

  10. After an update or Recover, expect to reinstall packages

    If Settings offers Update Bot's Computer, or if you had to Recover or Reset, official docs say installed apps and packages are removed on a computer update, Recover, or Reset, while saved files and logins are kept when they were saved. Running work is interrupted. Re-run the official install and a smoke test, and confirm claude --version or a read-only codex exec, before you hand the Bot another real task.

    If the computer says Reconnecting or Couldn't Reach Grok Bot's Computer, official docs say a Bot cannot finish a turn until you fix the connection. Do not Reset during a reconnect.

Inspired templates

No public Grok Bot template in this draft is documented as running Claude Code or Codex for you.

No inspired templates are listed. This draft does not invent chips for a workflow we could not verify end to end.

More playbooks

All playbooks