nanocoai/nanoclaw · error · Error
no messaging group for ${channelType} ${platformId} — create
Error message
no messaging group for ${channelType} ${platformId} — create it first What it means
Wiring creation resolved channel_type/platform_id but getMessagingGroupByPlatform found no messaging_groups row for that combination. The wiring needs an existing messaging group; create it first.
Source
Thrown at src/cli/resources/wirings.ts:185
create: {
access: 'approval',
description:
'Wire a messaging group to an agent group. Identify the messaging group by --messaging-group-id OR --channel-type + --platform-id (+ --instance); identify the agent by --agent-group-id OR --agent-group <folder>. Idempotent on (messaging group, agent group). Engagement flags: --engage-mode, --engage-pattern, --session-mode, --sender-scope, --ignored-message-policy, --threads, --priority. Omitted engage flags default from the channel adapter declaration.',
handler: async (args) => {
// Resolve the messaging group.
let mgId = args.messaging_group_id as string | undefined;
if (!mgId) {
const channelType = args.channel_type as string;
const platformId = args.platform_id as string;
if (!channelType || !platformId) {
throw new Error('provide --messaging-group-id, or --channel-type and --platform-id to resolve it');
}
const mg = await getMessagingGroupByPlatform(
channelType,
platformId,
(args.instance as string) ?? channelType,
);
if (!mg) throw new Error(`no messaging group for ${channelType} ${platformId} — create it first`);
mgId = mg.id;
}
// Resolve the agent group (by id or by folder).
let agId = args.agent_group_id as string | undefined;
if (!agId) {
const ref = args.agent_group as string;
if (!ref) throw new Error('provide --agent-group-id or --agent-group <folder>');
const ag = (await getAgentGroup(ref)) ?? (await getAgentGroupByFolder(ref));
if (!ag) throw new Error(`no agent group "${ref}" (by id or folder)`);
agId = ag.id;
}
// Idempotent: a wiring for this pair already exists → return it
// (defaults/validation/side-effects are skipped — nothing new is written).
const existing = await getMessagingGroupAgentByPair(mgId, agId);
if (existing) return existing;
View on GitHub (pinned to 294ef2aee8)
Solutions
- Create the messaging group first: `ncl messaging-groups create --channel-type X --platform-id Y` (then retry)
- Double-check the platform id against the channel (channel/snowball id)
- Alternatively send one message in the chat so the host registers it, then wire
Example fix
# before ncl wirings create --channel-type slack --platform-id C999 --agent-group bot # after ncl messaging-groups create --channel-type slack --platform-id C999 --is-group 1 ncl wirings create --channel-type slack --platform-id C999 --agent-group bot
Defensive patterns
Strategy: validation
Validate before calling
const mg = await getMessagingGroupByPlatform(channelType, platformId, instance); if (!mg) await createMessagingGroup(channelType, platformId); // then wire
Prevention
- Create messaging groups before wiring them
- Send one message in the chat so the host registers it, then wire
When it happens
Trigger: ncl wirings create --channel-type X --platform-id Y where no messaging group with that platform identity exists (e.g. the channel adapter hasn't received a message from that chat yet, or the group was never created).
Common situations: Wiring a brand-new channel chat before the host has seen a message from it, or a typo in the platform id.
Understand the failure class
Background: "Not found" and "does not exist" errors: why "Task not found", "No such folder", and "Can't find" fire when a lookup comes back empty — this error's family across 14 libraries.
Related errors
- messaging group not found: ${id}
- no agent group "${ref}" (by id or folder)
- agent group not found: ${values.agent_group_id}
- no messaging group for ${channelType} ${platformId} — create
- provide --messaging-group-id, or --channel-type and --platfo
AI-assisted analysis of nanocoai/nanoclaw@294ef2aee8 (2026-08-28).
Data as JSON: /api/errors/dcb0ceec4fc6b2f3.
Report an issue: GitHub.