Run Claude Code sessions from Grok Bot with your own Claude subscription

Let Grok Bot start and follow Claude Code sessions on your own computer through Happier, using your own Claude subscription or Anthropic API key.

Based on
CLI
0.2.17
Preview ref
a6f72a6

TL;DR

Grok Bot can start Claude Code sessions on your own computer through Happier. Install Claude Code on that computer and sign it in with your Claude subscription or an API key. Connect Grok Bot to Happier with the public Happier template, which runs happier mcp serve. Grok Bot can then call the session_spawn_new tool to start a Claude Code session on a machine and folder you choose. The session runs the Claude Code CLI installed on that machine, with that machine's login, so the usage counts against your own Claude Code plan or key.

The problem

An AI assistant is handy for deciding what to work on next. Turning that into actual coding work usually means switching tools: open a terminal, start Claude Code, paste the plan, then come back later to see what happened.

If you already pay for Claude subscription, you probably want that plan to do the coding work, on your own machine and your own repo, while the assistant handles the planning and the follow-up.

Common approaches and their trade-offs

  • Copy the plan into a terminal: simple, but every step is manual and the assistant loses track of what happened.
  • Give the assistant SSH access: it can start Claude Code itself, but it also gets a full shell on your machine.
  • Let the assistant write the code itself: fine for small changes, but the work does not happen in your local repo with your own Claude Code setup.
  • Happier: Happier is an open-source app that lets you run and orchestrate Claude Code, Codex and other agents cross-device, from your phone, desktop or the web. An assistant connected to Happier through MCP can start and follow sessions, and each session uses the agent CLI and login on your machine.

If you're new to Happier (what it is, and where to get it)

Happier is an open-source app that lets you run and orchestrate Claude Code, Codex, OpenCode and other agents cross-device, from your phone, desktop or the web. Gemini, Copilot, Cursor, Kiro and more agents are listed in the agent docs.

The workflow here is: Grok Bot asks Happier to start a Claude Code session, and the session runs on the machine that owns the repo, with your own Claude Code login.

Get set up:

Who this is for

  • Claude Code users with Claude subscription who want an assistant to kick off and follow coding work
  • People who keep repos on a desktop, laptop or home server and want the work to stay there
  • Teams on Happier Cloud or a self-hosted relay

Prerequisites

  • A computer with your repo, the Happier CLI and the Happier daemon running
  • Claude Code installed on that computer and signed in
  • A Happier account, and the Happier app to approve sign-in links
  • Grok Bot set up from the Happier template, or another MCP host that can run happier mcp serve

A workflow that works (step-by-step)

1) Install Claude Code on the machine that owns the repo

Happier does not ship its own copy of the model. It runs the Claude Code CLI that is installed on the machine. Happier can install it for you:

happier install provider claude

Or use the native Claude Code installer from Anthropic, then restart Happier.

2) Sign Claude Code in with your own plan

You have two options, both documented in the Claude Code docs:

  • Machine-local login: run claude on the machine and use /login, or open Settings → AI & Agents → AI backends → Claude in Happier and use Log in. Happier then shows whether it detected a CLI login or ANTHROPIC_API_KEY.
  • Connected services: store credentials in Happier with happier connect claude --setup-token (or Settings → Connected services). This supports both a subscription and an API key, and lets you pick a profile when a session starts.

Either way, the session uses your login. The usage goes to your Claude Code plan or key, not to Happier.

3) Make sure the daemon is running

Sessions started remotely are spawned by the Happier daemon on the target machine:

happier daemon status
happier daemon start

For a machine that should always be reachable, happier daemon install sets it up as a service.

4) Connect Grok Bot to Happier

The Happier Grok Bot template installs the Happier CLI on Grok Bot's own computer and pairs it with your account. You approve the one-time link in the Happier app. Works with Happier Cloud or a self-hosted relay. Tailscale is optional for private relays. The template then talks to Happier through happier mcp serve. The full setup is in Manage AI coding sessions from an AI assistant with Happier.

5) Ask Grok Bot to start a session

Happier exposes the session_spawn_new tool over MCP. It takes, among other fields, agentId, machineId, path, modelId, permissionMode, connectedServices and initialMessage. A request like this is enough:

Start a Claude Code session on my desktop in ~/code/my-app and ask it to fix the failing tests in the billing module.

Grok Bot picks the machine and folder (it can look them up with action_options_resolve), starts the session, and sends the first message. Starting a session can need an approval in Happier, depending on your settings.

You can also start the session yourself from the Happier app, or with happier claude on the machine, and let Grok Bot follow it.

6) Follow up

Grok Bot can then use session_status_get, session_wait_idle and session_message_send to check progress and send follow-ups. Permission prompts raised by Claude Code come back to you. The template asks for your yes on each one.

Why this works (and what breaks)

The session is a normal Happier session. The daemon spawns the Claude Code CLI on your machine, in your repo, with that machine's login or the connected service you picked. Grok Bot only calls Happier actions, the same ones the app and CLI use.

What to keep in mind:

  • Monitoring is polling. Happier does not push session events to an MCP host yet (issue #795). The template's watcher checks status every 5, 15 or 30 minutes (5 to 15 is recommended), so updates arrive at that interval. It stays silent unless there is a new permission request, a finished turn or an error.
  • The machine has to be online. If the daemon is not running, Happier cannot start the session.

Common mistakes

  • Claude Code not signed in on the target machine → the session starts and then fails to authenticate → check AI backends → Claude → Authentication for that machine.
  • Wrong machine or path → the session starts in the wrong repo → name the machine and folder in the request, or let Grok Bot list the options first.
  • Daemon not running → the spawn fails → run happier daemon start, or install it as a service.
  • Expecting instant updates → monitoring is polling → keep Happier app notifications on for urgent prompts.

Troubleshooting

Symptom: the session starts but Claude Code reports it is not logged in

Likely cause:

  • No CLI login and no connected service on that machine.

Fix:

  1. Open Settings → AI & Agents → AI backends → Claude, pick the machine, and use Log in.
  2. Or run happier connect claude --setup-token and select that profile when starting the session.

Symptom: Grok Bot cannot find your machine

Likely cause:

  • The daemon is not running, or the machine is on a different Happier server than Grok Bot.

Fix:

  1. Run happier daemon status on the machine.
  2. Make sure both are signed in to the same server and account.

Symptom: not_authenticated from the Happier tools

Likely cause:

  • The Happier CLI on Grok Bot's side is not paired.

Fix:

  1. Redo the pairing step from the template and approve the link in the app.

FAQ

Whose Claude Code plan does the session use?

Yours. The session runs the Claude Code CLI on your machine with the login or connected service you set up.

Can Grok Bot start sessions, or only watch them?

It can start them through session_spawn_new, if you let it. The template also has watch only and assist modes if you prefer to start sessions yourself.

Does this work with other agents?

Yes. The same tool takes an agentId, so the flow works for any agent Happier supports on that machine, such as Claude Code, Codex or OpenCode.

claudemcpassistantsubscriptions
Last updated: 2026-10-30