#Help with agent + discord tool

1 messages · Page 1 of 1 (latest)

wraith mirage
#

I tried asking my bot to spawn a sub-agent for reading messages in another channel and summarizing only what's relevant to them. I've got this:

ah, i'm hitting a wall here — the discord tool isn't available to me through direct exec calls. the subagent couldn't access it either, and i don't have a direct function interface for it in this context.

here's what i could do instead:

you paste relevant messages from that channel (if they're about music-understanding LLMs) — i'll summarize & give you thoughts
you give me a quick summary of what's been discussed there about music AI
we use discord skill differently — but i'd need to understand the gateway setup better

honestly though, the cleanest thing would probably be if you just copied over the messages you think are relevant? that way i skip the middleman and we get straight to analysis. what makes sense to you? đź‘€

Can you help me troubleshoot this? Thank you in advice, Krill.

leaden zenithBOT
warm heraldBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> âś… Mark Solution

leaden zenithBOT
peak loomBOT
#

Yep, a couple things are getting mixed together here.

  1. exec cannot call the Discord/message tool. exec is just shell, so that part is expected.
  2. A native OpenClaw subagent, sessions_spawn with default runtime: "subagent", should normally have message by default. If it does not, the usual culprit is tool policy:
    • tools.allow / tools.deny
    • agents.list[].tools.*
    • tools.subagents.tools.allow/deny
    • if you use allowlists, include message or group:messaging, not discord.message
  3. If you actually spawned an ACP session, runtime: "acp" for Codex / Claude Code / Gemini CLI, do not expect it to reach Discord through exec or necessarily have the same OpenClaw tool surface as a native subagent.

Fastest way to isolate it:

openclaw --version
openclaw status --all
openclaw message read --channel discord --target channel:<OTHER_CHANNEL_ID> --limit 5
#

If that message read works, Discord auth and perms are fine, and the problem is runtime or tool policy, not Discord itself.

Also check:

  • bot has View Channels and Read Message History in that other channel
  • channels.discord.actions.messages, search, channelInfo, and channels were not disabled
  • if you want thread-bound child sessions, channels.discord.threadBindings.spawnSubagentSessions: true only affects auto-thread binding, not tool access

For the actual task, the prompt should be closer to:

Spawn a native subagent (runtime: "subagent"). In the child, use the message tool directly, not exec. Read or search channel:<id> on Discord, summarize only the relevant music-LLM bits, then report back.

Docs:

#

If you paste:

  • openclaw --version
  • whether this was runtime: "subagent" or runtime: "acp"
  • your tools / tools.subagents config block

…I can help narrow it down fast.

wraith mirage
#

Can I send you a screenshot?

peak loomBOT
#

Yes, please do. A screenshot of the error, prompt, or relevant config bits would help a lot.

If you can, include:

  • the exact message you gave the bot
  • whether it was a normal subagent or ACP/Codex/Claude Code
  • any tools / tools.subagents config visible in the screenshot

I’ll take a look.

wraith mirage
peak loomBOT
#

Ah, this is the real clue.

The problem is very likely not “Discord tool permissions”. It’s that the agent is looking for the wrong tool name.

In OpenClaw, there usually is no tool named discord.
For Discord actions, the built-in tool is message, with channel: "discord".

So for this task, it should be thinking in terms of:

  • message + action: "read" + target: "channel:<id>"
  • or message + action: "search" + guildId / channelId

Not discord(...).

A few important bits:

  • Skills do not create tool names. They tell the model how to use tools.
#
  • The real source of truth is the actual exposed tool list.
  • So if the model says “I need a discord tool”, that’s a tool-selection/prompting mistake, not automatically a gateway failure.

What I’d test next:

openclaw --version
openclaw status --all
openclaw message read --channel discord --target channel:<OTHER_CHANNEL_ID> --limit 5

If that works, then Discord is configured fine, and the issue is just that the agent was trying to call discord instead of message.

If the message tool is missing from the agent entirely, then check:

  • tools.allow / tools.deny
  • agents.list[].tools.*
#
  • tools.subagents.tools.allow/deny

If you use an allowlist, make sure it includes:

  • message
  • or group:messaging

and not discord.message or discord.

If you want, send me:

  • your exact prompt to the bot
  • whether this was native subagent or ACP/Codex/Claude Code
  • your tools config

and I can help rewrite it so it uses the right tool path.

wraith mirage
#

Here's my tools config:

{
  "tools": {
    "profile": "coding"
  }
}

Actually, I just changed the profile to full and it worked. Thank you!!