This guide explains how OpenClaw, Claude Code, and a Lark bot can work together as one operating loop.
The goal is not to make one tool do everything. The goal is to let each tool handle the layer it is good at.
Roles
| Component | Role | Core capability |
|---|---|---|
| Claude Code | Local coding agent | Reads and edits code, runs shell commands, uses Git, and handles engineering tasks |
| OpenClaw | Local AI gateway and channel hub | Connects Telegram, Lark, Discord, and other channels; dispatches models and tools |
| Lark bot | Collaboration interface | Sends and receives team messages, docs, and operational updates |
Collaboration mode
The practical workflow is:
- Send an instruction from Telegram or Lark.
- OpenClaw receives the message.
- OpenClaw can spawn Claude Code as a local subprocess through ACP.
- Claude Code performs the engineering task on the machine.
- OpenClaw sends the result back to the chat.
The important point is that Claude Code remains local and capable, while OpenClaw handles channel access and routing.
Binding a chat to Claude Code
To bind the current chat to Claude Code:
/acp spawn claude --bind here/acp spawn claude --bind hereThis creates a Claude ACP session in the current chat. Messages sent after that can be forwarded directly to Claude Code, and Claude works in the configured local workspace.
Persistent threads
For larger tasks, use a persistent thread:
/acp spawn claude --mode persistent --thread auto/acp spawn claude --mode persistent --thread autoThis keeps intermediate progress, results, and follow-up context in a dedicated topic instead of polluting the main chat.
One-shot execution
For short tasks:
/acp spawn claude --mode oneshot/acp spawn claude --mode oneshotThis is useful for one-off work such as reviewing a pull request, generating a short report, or checking a repository state.
Common ACP commands
| Command | Purpose |
|---|---|
/acp status |
Check the current ACP binding |
/acp cancel |
Cancel the running task |
/acp close |
Close the session and unbind |
/acp doctor |
Check ACP health |
Using Claude with Lark operations
Claude Code does not directly need to own Lark tools. A clean split is:
- OpenClaw handles Lark messages, documents, and bot identity.
- Claude Code handles coding, debugging, and local file work.
- OpenClaw takes Claude's output and sends it into Lark.
This avoids mixing channel permissions into the coding agent.
Example: engineering daily report
- Bind Claude in Telegram:
/acp spawn claude --bind here/acp spawn claude --bind here- Ask Claude to draft the report:
Write a daily engineering update:
- Done: fixed the login bug
- In progress: refactoring the order module
- Blocked: waiting for designWrite a daily engineering update:
- Done: fixed the login bug
- In progress: refactoring the order module
- Blocked: waiting for design- Ask OpenClaw to send the result to the target Lark group.
OpenClaw uses the configured bot identity to send the message.
Bot identity
Using a bot identity is operationally stable:
- no personal login session expiration
- predictable permission scope
- suitable for scheduled or background workflows
- easier to audit than user-level automation
Recommended mental model
Use Claude Code as the local engineering worker.
Use OpenClaw as the gateway and dispatcher.
Use Lark as the collaboration surface.
That split keeps the system composable without forcing one agent to own every integration.