Skip to content
Blog

Run Grok Build on a persistent cloud desktop

A step by step guide to running xAI's Grok Build on a persistent Spine cloud desktop: create it, sign in, schedule runs, and keep every agent apart.

. 8 min read

Grok Build is xAI's command line coding agent, still widely searched under its older name, Grok CLI. You install @xai-official/grok, run grok, and it works in the terminal against the files in front of it. That arrangement holds right up until the work outlasts the session. Close the laptop and the run stops. Move to another machine and the files, the shell history and the browser logins stay behind on the first one.

This guide moves Grok Build onto a cloud desktop that stays up: a machine of its own with a browser, a terminal, a file system and a disk that survives restarts. Grok is one of five agent types Spine runs, alongside Claude Code, OpenClaw, Codex and Hermes.

One thing to settle before the steps. On Spine, Grok is bring your own account. You sign in with your own grok.com account from inside the desktop, and Spine does not resell or proxy xAI inference for it, so what the agent costs to run stays between you and xAI. (Grok Bot, the hosted agent product xAI announced on 11 August 2026, is a different product. This guide covers the command line agent you run yourself.)

What you need before you start

  • A Spine account. Sign-in is Google or GitHub.
  • An xAI account that can sign in at grok.com. That is the credential the agent runs on.
  • A browser. There is nothing to install on your own machine.

No API key. The other agents ask for a provider and a key at creation time. Grok does not, because it signs in after the desktop has booted. If you went looking for the key field and could not find it, that is the reason.

Step 1: create a desktop and pick Grok as the agent

Creating the desktop takes about a minute of your attention and about 2 minutes of waiting.

  1. Sign in at www.spinestudio.dev and open Home.
  2. Start a new desktop. The dialog is titled New desktop.
  3. Under AI agent, choose Grok, described there as xAI's Grok Build CLI coding agent with autonomous terminal workflows.
  4. Give it a Name you will still recognise in a month. "grok-refactor" beats "test2" once you have four desktops.
  5. There is no size to pick: every desktop gets the same standard size, which is enough for a real repository.
  6. Click Create desktop.

The desktop then provisions and boots, and most finish in about 2 minutes. What you get is a full cloud desktop: a browser, a terminal, a file manager, an editor, and a disk that keeps what you put on it.

Step 2: sign in to Grok with your xAI account

A fresh Grok desktop boots to running and then waits for you. That is the intended first-run state. The toolbar shows Sign-in required, and the desktop shows a card titled Sign in to Grok.

  1. Open the desktop and click Sign in to Grok.
  2. The panel generates a short sign-in code. Copy it.
  3. Click Open xAI sign-in. xAI's device page opens in a new tab.
  4. Enter the code there and approve the request with your xAI account.
  5. Come back to the panel. It flips to Grok connected on its own, and there is a button to check immediately if you would rather not wait.

Codes expire. When one does, the panel says so and hands you a new one.

Two consequences are worth knowing. The credential is written onto the desktop rather than held in your browser, so it survives a stop and a restart: you sign in once per desktop, not once per session. And Spine pins the Grok version and turns the CLI's own updater off on every boot, so the agent that passed your review this week is the one running next week, until you decide otherwise.

Step 3: give Grok Build its first task

There are two ways in, and they reach the same machine.

From the chat panel. Type the task and send it. Replies stream back, and so do the agent's reasoning and its tool calls, which arrive as rows you can open. Grok's slash commands appear in the composer menu, read from the agent itself rather than hardcoded by us, so the list matches the version you are actually running. /compact is among them and does what it says.

From the terminal. Open the terminal on the desktop and type grok. Same files, same credential, your own session. This is the one to use when you want to drive it the way you always have, or to run grok --help against the installed version.

A good first task is one that exercises persistence: ask it to clone a repository you care about, read it, and write a summary to a file. Then close everything, and come back for step 4.

Step 4: close the browser and let the run finish

Closing the tab does not stop the desktop. The machine keeps running on our side whether or not you are looking at it. The run carries on, the terminal keeps its session, and the files land on disk.

What survives between visits:

  • Files, and anything the agent installed while working.
  • The browser profile on the desktop, so a site you or the agent logged into is still logged in tomorrow.
  • The Grok credential from step 2.
  • The conversation, which stays readable in chat.

When you are finished for a while, stop the desktop from the toolbar. The machine shuts down and the data stays; start it again and everything is where you left it. Delete is a different thing entirely: a deleted desktop and its disk are gone, and it does not come back.

To follow a long run without sitting on the desktop, open Tasks. It lists every task, its history, and anything waiting on your approval.

Step 5: schedule Grok to run without you

A persistent desktop is worth more once the agent starts itself.

  1. Open Tasks and click New task, or New routine on the Routines page.
  2. Write what needs to be done the way you would write it in chat.
  3. Under Who does it, pick this Grok desktop, or Any agent to hand the work to an agent with the skills it needs.
  4. Set Repeat: every day, every weekday, every Monday, every month on the 1st, or a custom cron schedule, and the time it runs.

A task that repeats is a routine, and each run creates a task. Results come back to Tasks while the working files stay on the desktop, which is the whole point: a recurring job that builds on last week's output instead of starting from an empty directory.

One thing to get right. A routine pinned to a specific desktop runs only while that desktop is running: if you stop the machine, each run is skipped until it starts again, rather than moving elsewhere. Any agent is the safer default for anything recurring. Pin the work that genuinely has to happen on one particular machine.

Step 6: keep Grok separate from your other agents

Each Spine desktop is its own virtual machine, and desktops cannot reach each other over the network. Grok's desktop cannot read the files, the browser sessions or the credentials of the Claude Code desktop next to it, and that boundary does not depend on either agent behaving well.

This matters more for Grok than for most agents. The CLI reads project configuration and instruction files from the directory it starts in, which is useful when the directory is yours and a problem when it is shared with another agent's credentials. On Spine the question does not come up, because the other agent is on another machine.

Sharing, when you want it, is explicit and per resource:

  • The workspace knowledge base is a shared set of notes several desktops can read, which is how you hand context between agents without handing over a file system.
  • Connectors attach per desktop, so an integration you connected once is not automatically available to every agent you own.
  • The Secret Manager lets an agent use a website login without the password passing through the model, and you attach secrets to the desktops that need them.

The trade against one shared machine is real. You do not get automatic handoff of a logged-in browser between agents. What you get instead is a boundary you can reason about, and a deliberate way to cross it. Grok Bot alternative: a desktop per agent compares the two models.

Next steps and common questions

Does Spine charge for what Grok uses?

No. Grok on Spine is bring your own account, so usage sits between you and xAI. Spine bills for the desktop.

Which plan do I need?

Start with the 15-day free trial: one agent on its own cloud desktop. Starter is 19 EUR a month for 2 agents, Pro 49 EUR for 5 and Max 99 EUR for 10, with as many workspaces as you need on Max. Enterprise is on request. Details on the pricing page.

Can I run Grok next to Claude Code or Codex?

Yes. Five agent types, one per desktop. You pick the agent when you create the desktop, and each one gets its own machine. Claude Code and Grok Build in one workspace shows how to split work between two of them.

Does the sign-in survive a restart?

Yes. Sign in once per desktop and the credential stays with it.

Create your first Grok desktop at www.spinestudio.dev. Questions go to contact@spinestudio.dev.

Give Atlas its first task as soon as your workspace opens.

New accounts join the waiting list, and we open workspaces in order. No credit card · Cancel anytime · 15-day free trial