Grok BotSoftwareShipping codeAI score · 76/100AI-assisted edit · no obvious prompt-injection riskX

Connect Claude Code to Grok Bot: Delegate Long Tasks via Slack Hooks

Input: dev request → Processing: Grok Bot routes to Claude Code, Slack notification wakes the originating agent → Output: cloud session completion report

ExperiencedStepsWorkflowTip
Who
Advanced developers with Claude Code Max subscription, using Grok Bot, who want to bypass Cursor Cloud usage limits
You get
Grok Bot agents autonomously delegate long dev tasks to Claude Code in the cloud; Slack notifications wake only the launching agent on finish/failure/permission request, with no polling
You need
Grok Bot

Constraints

Prerequisites: Claude Code Max subscription; Grok Bot environment; Slack workspace admin rights; hooks and skills from GitHub repo luck-prg/grokbot-claude-code. Costs: Claude Code Max monthly fee; Slack free tier sufficient. Limitations: Claude Code environment must be set as account default (--environment only accepts self-hosted); first run requires handling the "trust this folder" dialog; agents lack TTY, so wrap with script command.

What they did

Author luchoorocker, after two weeks using Grok Bot, found it lacked direct Claude Code integration. To keep using his Claude Max subscription and reuse months-refined project setup, he built a hooks + Slack + routines architecture: Claude Code session state changes trigger hooks to post to a private Slack channel; each Grok Bot agent filters by keyword so only the task launcher wakes up, enabling async delegation without polling.

How it went

Author reports achieving: keeping Claude Code harness intact, autonomy to choose Cursor Cloud or Claude Code from Grok Bot, and freedom from Cursor Cloud caps. Agents can create sessions, work on existing sessions, read messages, know when sessions finish, bind bots to sessions, and choose models. Cloud execution is recommended; local is alternative. (author_report, unverified)

Worth knowing

This solution depends on the GitHub repo luck-prg/grokbot-claude-code for hooks, scripts, skills, and test suites; source does not expand full code, clone required. Claude Code environment must be account default; --environment in terminal only accepts self-hosted. First run encounters "trust this folder" hang. Other integration approaches mentioned (Reason Network, Claude + Codex Connector) are background comparison only, not detailed. Author credits dr eggbot (poteto's bot, SpaceX engineer) for environment help.

Steps

  1. Install Claude Code on the Grok Bot VM and configure cloud environment

    Install Claude Code CLI once on the shared Grok Bot computer, log in with your Claude account; all agents use it. Cloud is default: agents launch with claude --cloud "<prompt>", session runs on claude.ai/code. Since agents have no TTY, wrap with: script -qec 'claude --cloud "<prompt>"' /dev/null </dev/null. Prompt must start with its own line notify: <agent>, task below. On claude.ai/code create environment named GrokBot: custom network allowing slack.com; network secret type Bearer with Slack bot token (injected by Anthropic proxy, never in code); variable SLACK_NOTIFY_CHANNEL=<SLACK_CHANNEL_ID>; setup script cloud/setup.sh installs hook per session. Important: this environment must be your account default; you cannot select it from terminal.

  2. Create Slack app and notification channel

    Create a private channel for notices. Create a Slack app with two scopes: chat:write and chat:write.customize (the latter shows notices with Claude Code's name and icon). Invite the app to the channel, copy its token into the network secret from step 1. In the notices channel also run /invite @Cursor, or the routine never fires.

  3. Configure Claude Code notification hooks

    Use five hooks: Stop, StopFailure, Notification, PermissionRequest, SessionEnd. When session finishes, fails, or requests permission, hook posts bulleted Slack message: Event, Session link, Repo, Branch, Agent, Task. Hook builds automatically: session from hook itself; repo and branch from git; task from branch name; agent from notify: <agent> line in first prompt message, read from transcript. Text sanitized: except agent field, notify- becomes notify‐, and &, <, > are escaped, preventing accidental wake of other agents or channel-wide pings.

  4. Set up Grok Bot routines and skills for per-agent wake-up

    One routine per agent. Each agent has a Grok Bot routine with Slack trigger on keyword notify-<agent>. When notice arrives, only the agent that launched the task wakes up: no polling, no tokens spent waiting. The claude-code-task skill delegates: launches cloud by default; notifies on launch with session link; waits for Slack notice, reviews branch, opens PR without merging; includes known issues: "trust this folder" dialog hangs first launch, and rule against waiting with pgrep loops. The claude-code-notify-setup skill configures any agent with one sentence: choose channel and bots to enable; checks keyword collisions; runs one test per bot.

Prompt you can copy

Reference prompt · Editorial suggestion。Confirm the destination, input variables and output format before use.

This block is the prompt. Ads are never placed here.

No prompt needed — just follow the steps.

Source

Connect Claude Code to GrokBot:Cursor Cloud 额度满时把长活交给 Claude Code · luchoorocker · X · 2026-10-16T18:27:42.000Z

Comments & feedback

Tried this method? Share results, problems or improvements. Comments appear after moderation. Please avoid sensitive information.

Loading…

    Related