owner_user_id and receive only the token scopes you grant.
Quick setup
In ClickClack, open Workspace settings → Integrations → OpenClaw, create a bot using Setup code (recommended), and copy the generated command:localhost and 127.0.0.1.
If OpenClaw is already running, ClickClack connects automatically and no second
command is needed. Otherwise, start it with:
Alternative: manual token
Choose Manual token in ClickClack when configuring a non-OpenClaw client or when you explicitly need to manage the token yourself:workspace accepts a workspace id (wsp_...), slug, or display name.
--code cannot be combined with --token, --token-file, or --use-env.
Alternative: env-based token
The default account can readCLICKCLACK_BOT_TOKEN instead of storing a token
in config:
JSON5 reference
The equivalent config shape is:baseUrl, a token source, and
workspace are all set. A token source can be token, tokenFile, or
CLICKCLACK_BOT_TOKEN for the default account. workspace accepts a workspace
id (wsp_...), slug, or name; the gateway resolves it to the id at startup.
Account config keys
Keep an auth-gated public hostname
UseapiBaseUrl when ClickClack and the OpenClaw gateway run on the same host
but the public ClickClack hostname is protected by an authentication gateway
such as Cloudflare Access:
embedUrl and openUrl links continue to
use the public baseUrl. If apiBaseUrl is omitted, all traffic uses
baseUrl, preserving existing behavior.
If plugins.allow is a non-empty restrictive list, explicitly selecting
ClickClack in channel setup or running openclaw plugins enable clickclack
appends clickclack to that list. Onboarding installation uses the same
explicit-selection behavior. These paths do not override plugins.deny or a
global plugins.enabled: false setting. Direct
openclaw plugins install @openclaw/clickclack follows the normal
plugin-install policy and also records ClickClack in an existing allowlist.
Multiple bots
Each account opens its own ClickClack realtime connection and uses its own bot token.Session discussions
Enable discussions on one ClickClack account to give each OpenClaw session a dedicated ClickClack channel. The account token must includechannels:write (the bot:admin bundle includes it); the normal bot:write
setup token cannot create or synchronize channels.
discussions.workspace accepts the same workspace id, slug, or display name
as the account-level workspace and defaults to that value. section controls
the ClickClack sidebar section and defaults to Sessions. When
controlUrlBase is set, the managed channel links back to the canonical
Control UI session path.
Enable discussions on exactly one ClickClack account. The gateway provider has
no account selector, so multiple enabled discussion accounts are rejected
rather than choosing one by configuration order.
Opening a discussion creates a public ClickClack channel marked as externally
managed. The plugin keeps the session label, category, and archive state in
sync. Restoring a session restores its channel; clearing the session category
moves the channel back to the configured default section. Deleting an
OpenClaw session archives the ClickClack channel instead of deleting it, so its
history remains available. The plugin reconciles bindings when discussion RPCs
are used and approximately once per minute while any bindings exist.
Inbound messages in a managed channel use a deterministic side session under
the same agent id as the attached main session. The side agent is told which
main session to observe and can use sessions_history and session_status
(changesSince is useful for incremental checks). It uses sessions_send only
when people in the discussion ask it to relay or steer the main session.
The binding, managed ownership reference, and side-session peer identity include
the concrete OpenClaw session id along with the pinned ClickClack server and
channel. Resetting a reusable session key or retargeting an account revokes the
old channel locally, archives it when the old credential remains usable, and
cannot reuse its side transcript. Messages arriving through an
archived, reset, disabled, or retargeted binding are dropped instead of falling
back to the account’s normal channel routing. Released bindings leave a durable
revoked-channel marker so delayed realtime events remain fail-closed. Remote
ownership is keyed by ClickClack server and channel id, so renaming the local
account cannot turn a managed channel into an ordinary one.
Keep tools.sessions.visibility at its safer default tree. The plugin
installs a host-scoped grant only between each side session and its attached
main session, plus a tool-policy hook that blocks session discovery and
cross-session targets. It allows sessions_history, session_status, and
sessions_send only for the attached main session and prevents the status call
from changing that session’s model. Those tools must still be present in the
agent’s effective tool allowlist. The system prompt is guidance; the host grant
and hook are the authorization boundary.
The ClickClack server must support managed-channel fields (external_managed,
external_ref, external_url, and sidebar_section) on channel creation and
updates and return them in channel responses. OpenClaw verifies that contract
before persisting a binding. If a create response is lost, the next open adopts
the channel by its server-enforced external_ref instead of creating another.
Until that outcome is reconciled, the pending reservation quarantines
otherwise-unbound events in the destination workspace. The coarse reconciler
adopts the channel when the same session is still live or archives it after a
reset; it clears the reservation when no remote channel was created.
That reference contains a durable per-OpenClaw-installation namespace plus a
hash of the session key, concrete session id, ClickClack destination, and durable
binding generation. Separate gateways cannot adopt each other’s channels,
reset sessions cannot inherit old channel history, and an account or workspace
round trip cannot re-adopt a previous channel. Bindings are also pinned to the
configured ClickClack server URL and are invalidated if the account is
retargeted. Changing or removing controlUrlBase updates or clears the managed
channel link on the next reconciliation pass. Changing
discussions.workspace archives and releases the old binding before a channel
can be opened in the new workspace when the old workspace credential remains
configured. If the token was replaced with a workspace-scoped credential that
cannot access the old workspace, OpenClaw records the old channel as revoked and
releases the binding without trying the replacement token; archive that leftover
channel from ClickClack.
The attached main session also receives a pull-only discussion tool. It reads
the latest messages and recent thread replies as one escaped, attributed record
per message, and has no write or lifecycle side effects. Channel-root and thread
lookups have fixed request budgets; the result explicitly warns when that
safety bound can omit an older active thread.
Reply modes
replyMode: "agent"(default) dispatches inbound messages through the normal agent pipeline, including session recording and tool policy.replyMode: "model"skips the agent pipeline and uses the plugin runtime’sllm.completefor direct bot replies, optionally shaped bymodelandsystemPrompt. The selected provider and model own the completion budget.
plugins.entries.clickclack.llm.allowAgentIdOverride: true trust
bit:
agent reply mode; it is
not needed there.
Command menu
At gateway startup, each configured account publishes OpenClaw’s native commands to ClickClack. They appear in composer autocomplete labeled with the bot’s handle. The published set is replaced wholesale on each startup, including clearing a stale menu when the native command catalog is empty. Command-menu sync is enabled by default. SetcommandMenu: false on an account
to opt out:
commands:write. Current ClickClack bot:write and
bot:admin bundles include that scope, and it can also be granted
individually. Tokens created before command menus were introduced may need the
scope added or a replacement token.
Sync is best effort and runs once per gateway start. A missing scope or network
failure logs a warning; an older ClickClack server without the endpoint logs at
debug level. None of these failures block realtime startup. Menus remain
available while the agent is offline and are removed when the bot leaves the
workspace.
This release publishes native command specs only. Aliases and
skill-, plugin-, or custom-command catalogs are not added to the menu. If a
name is also registered as an HTTP slash command, ClickClack dispatches that
registration first; other menu commands continue through normal message
delivery.
Use agent mode for cross-service correlation evidence. For an authoritative
ClickClack message id in its canonical msg_<ulid> shape, the channel derives
the deterministic OpenClaw run id clickclack:<message-id>. Each model call is
then visible in diagnostics as clickclack:<message-id>:model:<n>; when that
turn uses ClawRouter, the same model-call id is sent as X-Request-ID.
model mode bypasses the normal agent run/session diagnostics and is therefore
not suitable for this evidence path.
When a realtime event contains a validated payload.correlation_id, the
channel carries it as X-Correlation-ID on the authoritative message fetch and
the resulting ClickClack reply requests. Values use ClickClack’s safe
128-character set (A-Z, a-z, 0-9, ., _, :, and -); invalid values
are omitted. These joins contain identifiers only, never message bodies,
prompts, completions, credentials, or tool output.
Durable media delivery
Agent replies containing media use required durable delivery. OpenClaw assigns stable per-part message and upload nonces before the first ClickClack write, so a retry reuses the same upload and message instead of consuming storage quota or publishing duplicates. If an upload already exists after a restart, OpenClaw does not reread the original local path or remote media URL. This recovery contract requires a ClickClack server that supports:GET /api/uploads/by-noncewithX-ClickClack-Upload-Nonce: supportedon found and missing results.GET /api/messages/by-noncewithX-ClickClack-Message-Nonce: supportedon found and missing results.- Idempotent message creation and attachment association for the same owner-scoped nonce and upload.
Agent activity rows
By default a ClickClack channel shows nothing while an agent turn runs; only the final reply lands. SetagentActivity: true on an account to publish durable agent_commentary and agent_tool message rows while the turn is in progress:
- Off by default. Stock setups and older ClickClack servers are untouched.
- Requires the
agent_activity:writetoken scope. This scope is separate frombot:writeand is not inherited by it; create the bot token with--scopes bot:write,agent_activity:write(or grant the scope to an existing token) before enabling the option. - Best-effort degradation. If the token lacks
agent_activity:writeor the server rejects activity writes, failures are logged and the final reply still delivers normally; no activity rows appear. - Rows are grouped per turn (
turn_id), coalesced so one logical step is one row, and tool rows use the same progress formatting as Discord/Slack/Telegram (tool name plus command detail). - Attribution metadata. Agent-authored posts (activity rows and the final reply) carry
author_modelandauthor_thinkingfields resolved from the actual model used for the turn (including after fallback). Servers that do not define these columns ignore the unknown JSON fields; servers that persist them can answer “which model said this line, at which thinking level” per message.
Group mention gating
By default, every group message in ClickClack dispatches to every enabled ClickClack account in the same workspace. This behavior is backward compatible. AddrequireMention: true to an account to require a direct mention before the agent pipeline runs.
The effective policy is resolved in this order:
- Exact channel entry in
groups(keyed by ClickClack channel ID). - Wildcard
"*"entry ingroups. - Account-level
requireMention/mentionPatterns. - Backward-compatible default (
{ requireMention: false, mentionPatterns: [] }).
requireMention. When a DM arrives, the mention gate is skipped entirely.
Mention detection
ClickClack mentions are detected when:- The message body matches any pattern in
mentionPatterns(each pattern is a regular expression). - The message contains the bot’s ClickClack
@handle. The gateway reads the handle from the authenticated bot identity at startup.
Blackbird) are not treated as mentions unless they are explicitly configured as a pattern.
Configuration example
requireMention: true reject an unmentioned message while an account with requireMention: false may process it.
Migration warning
ClickClack channel IDs (e.g.chn_...) are not automatically Discord channel IDs. Configuring per-channel rules requires the actual ClickClack channel identifier. Do not reuse Discord IDs unless the ClickClack server explicitly stores them as external_ref and the adapter has a documented translation layer.
Adding requireMention: true without also restricting allowFrom will not silently change existing sender allowlist behavior for group messages; the mention gate is an additional guard on top of the existing sender policy.
Targets
channel:<name-or-id>sends to a workspace channel. Bare targets default tochannel:.dm:<user_id>creates or reuses a direct conversation with that user.thread:<message_id>replies in the thread rooted at that message.
clickclack: or cc: provider prefix.
Outbound media uses ClickClack’s upload API and then attaches the durable upload
to the created channel message, thread reply, or DM. Local files and supported
remote media URLs follow OpenClaw’s normal media-access policy, with a 64 MiB
per-file limit. Durable queued sends use separate owner-scoped nonces for each
upload and message part, then retry attachment association with those same
objects. See Durable media delivery for the server
contract and recovery behavior.
Examples:
Permissions
ClickClack token scopes are enforced by the ClickClack API.bot:read: read workspace/channel/message/thread/DM/realtime/profile data.bot:write:bot:readplus channel messages, thread replies, DMs, uploads, and command-menu publishing.bot:admin:bot:writeplus channel creation.commands:write: publish the bot’s command menu. Included in currentbot:writeandbot:adminbundles and grantable individually.agent_activity:write: durable agent activity rows (agent_commentary/agent_tool). Not inherited bybot:writeorbot:admin; required only whenagentActivity: trueis set.
bot:write for normal agent chat and command-menu sync. Add agent_activity:write when enabling agent activity rows.
Troubleshooting
ClickClack is not configured for account "<id>": setbaseUrl,token(for example viaCLICKCLACK_BOT_TOKEN), andworkspacefor that account.ClickClack workspace not found: <value>: setworkspaceto the workspace id, slug, or name returned by ClickClack.- No inbound replies: confirm the token has realtime read access and note that the bot ignores its own messages and messages from other bots.
- Channel sends fail: verify the bot is a member of the workspace and has
bot:write. - No command menu: confirm
commandMenuis notfalse, the ClickClack server supportsPUT /api/bots/self/commands, and the token hascommands:write.