Human-in-the-Loop Task Manager for AI Agents
Docs / Connect Claude Code
Guide

Connect Claude Code

AgentRQ starts Claude Code for you on a machine of yours — no config file to copy. This guide covers starting it, the CLAUDE.md instructions that shape it, and permission handling.

Prerequisites

Start It From a Machine

Enrol the computer that runs Claude Code as a machine, and AgentRQ starts Claude Code there for you. A machine starts Claude Code directly, not through the ACP Gateway: agentrqd writes the workspace's config into the working directory itself, starts Claude Code with the task channel on, and shows its live terminal in the browser. You never handle a token.

  1. 1
    Enrol the machine, once. In AgentRQ, open Machines → + Add machine and run the two commands it shows on the computer that should run the agent, as yourself and never as root. A machine serves every workspace in your account. The machines and daemon docs cover what enrolling grants and how to undo it.The Add a machine panel with the install command and the agentrqd enroll command, both highlighted
  2. 2
    Click Start Claude Code in the workspace. An empty workspace offers it while a machine is online, with "on machine · model · Change" under it: one click starts it. Click Change (or Start an agent, when the button reads that) to choose for yourself. The workspace needs a working directory, set in Settings → General.The storefront-api workspace with the Start Claude Code button, on dev-laptop, default model and Change under it, highlighted
  3. 3
    Pick Claude Code in the agent list, then choose the Model (the models the machine's Claude Code reports), Effort (Default to Max) and Auto-compact (100k to 900k, 400k by default), and click Start Claude Code.
  4. 4
    Answer Claude Code in the terminal AgentRQ opens. Pick Yes, I trust this folder the first time it runs in that folder, and confirm the development channel on every start. Then the workspace's dot turns green and tasks reach Claude Code.Claude Code's trust prompt in the AgentRQ terminal, with Yes, I trust this folder highlightedThe storefront-api workspace with a green dot next to its name, highlighted
What agentrqd runs on the machine
claude --name storefront-api --model opus --effort high --autocompact 400k \
  --dangerously-load-development-channels server:agentrq-workspace
Guide: Connect Claude Code with Machines
All 19 steps with screenshots, from enrolling the machine to approving Claude Code's first file write from the browser.

Claude Code must already be installed on that machine (see below). If it needs signing in, it asks in that terminal the first time, and you sign in from there.

Install Claude Code

Already installed? Skip ahead — run claude --version to check first.

Native install (recommended)
macOS, Linux, WSL
curl -fsSL https://claude.ai/install.sh | bash
Windows — PowerShell
irm https://claude.ai/install.ps1 | iex
Windows — CMD
curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd

Not sure which Windows shell you're in? Your prompt shows PS C:\ in PowerShell and just C:\ in CMD. Native installs update themselves automatically in the background; on native Windows, Git for Windows is recommended so Claude Code can use its Bash tool (not needed under WSL).

Alternative install methods
macOS — Homebrew
brew install --cask claude-code
Does not auto-update — run brew upgrade claude-code periodically.
Windows — WinGet
winget install Anthropic.ClaudeCode
Does not auto-update — run winget upgrade Anthropic.ClaudeCode periodically.

Debian, Fedora, RHEL, and Alpine can also install via apt, dnf, or apk — see the official Linux package manager guide.

Confirm the install worked: claude --version should print a version number followed by (Claude Code).

1 Add CLAUDE.md Instructions

Tell Claude when and how to use AgentRQ tools by adding instructions to your CLAUDE.md. This is the most important step — it shapes Claude's behavior throughout your session.

CLAUDE.md (example)
## Human-in-the-Loop (AgentRQ)

# At the start of every session:
Call `workspace` with action `get` to load context about this workspace.

# When you need human input, approval, or a decision:
Use `task` with action `create` and assignee `human`. Include:
- A clear title
- Full context in the body (what you've done, what you need)
- Any relevant file snippets as attachments

Then wait for the human's response via the notification channel.
Do NOT proceed past a blocking decision without human approval.

# When you receive a reply:
Read the reply, set the task `completed` (`task` action `updateStatus`), then continue.

# When asked to make irreversible changes (DB, deploys, deletes):
Always ask via `task` action `create` before executing.

Adapt this template to your workflow. The key is being explicit about when Claude should pause and ask vs. when it can proceed autonomously. If an existing CLAUDE.md names the older tools, such as createTask or getWorkspace, update it to the action form. The server still answers those names for clients that call them directly, but no longer lists them, so Claude does not see them. See the MCP tools reference.

2 The Notification Channel

When you reply to a task in the AgentRQ dashboard, your response is delivered to Claude Code as a notification channel message — Claude's native push mechanism. The message looks like this in Claude's context:

Claude Code context — incoming message
<channel source="agentrq" chat_id="0ZRgCquBZ7R"
         ts="2026-03-24T14:30:00Z" user="human">
[Response to task 0ZRgCquBZ7R]

Approved — but use a UUID primary key instead of auto-increment.
Please add an index on expires_at too.
</channel>

Claude reads this channel message, processes your reply, and continues — all within the same session. No interruption, no re-prompting.

The channel only works when Claude Code starts with --dangerously-load-development-channels server:agentrq-workspace. The machine starts it that way for you; confirm the development-channel question in its terminal on every start.

In the dashboard, the reply is an ordinary message on the task. When Claude Code asks a question it sets the task to blocked, and your answer reaches it the same way.

A blocked task with Claude Code’s question and a reply typed in, highlighted
Permission Requests

Claude Code can also send permission requests for sensitive operations. These show up as special task types in your dashboard with Allow / Deny / Allow All buttons.

Example permission request
Claude is requesting permission to run: rm -rf dist/

3 Verify the Connection

Once the workspace's dot is green, type this quick test in Claude Code's live terminal:

Test prompt
> Call workspace get and tell me what workspace you're connected to.
  Then create a test task called "Connection test" with body "Hello from Claude".

Claude: I called workspace get — connected to workspace "my-api-project"
(ID: 0ZPO4WBMZIP). Creating test task now...
Task created ✓ (ID: 0ZRgXXXXXXX). You should see it in your dashboard.

Check your AgentRQ dashboard — the task should appear instantly. Reply to it, and Claude will receive your message via the notification channel.

Troubleshooting

AgentRQ tools not appearing
Check the workspace's working directory in Settings → General is the folder you expect on that machine, then stop the agent and start it again from the workspace page.
401 / Unauthorized error
Your MCP token may have expired (1-year validity period) or been revoked with Reset Workspace ID. The machine keeps an existing entry in the working directory, so delete the folder's agentrq-workspace entry and start the agent again from the workspace page.
Notifications not arriving in Claude
Claude Code must be actively running (not paused at input). The SSE connection drops when Claude is waiting for user input. Resume Claude to receive pending messages.
Started from a machine, but the dot stays grey
Open the Agent terminal: Claude Code is probably waiting on its trust-folder or development-channel question. If it says the AgentRQ server needs authentication, the folder already had a .mcp.json with an agentrq-workspace entry from another workspace or an old token; the daemon keeps an existing entry, so delete it and start again.
Tasks created but dashboard empty
Check you're viewing the correct workspace in the dashboard. If the working directory already had a .mcp.json entry from another workspace, the machine keeps it and the agent reports there; delete that entry and start again.
Connection working?
Learn the full task lifecycle next.