#discord agent fails on /new

1 messages · Page 1 of 1 (latest)

undone isle
#

When i request new in gateway chat it responds nothing
when i do it on discord it responds "Hero
APP
— 14:44
502 Failed to authenticate request with Clerk
"

why is that?

remote plinthBOT
#

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

idle hawkBOT
#

Two different issues are getting mixed together here:

1) “/new in the gateway chat responds nothing”

In OpenClaw, /new only triggers if it’s a standalone command message (just /new by itself, no extra text).

If it still does nothing, the two most common causes are:

  • You’re not actually connected / you’re read-only in the Control UI/WebChat (WS auth/pairing issue).
    In the Control UI, if the gateway connection isn’t fully authenticated/paired, sends won’t execute.
  • Commands are not authorized (if you set commands.allowFrom, command-only messages from non-allowed senders can be silently ignored).

Docs: https://docs.openclaw.ai/tools/slash-commands
Control UI auth/pairing: https://docs.openclaw.ai/web/control-ui

2) “Discord says: 502 Failed to authenticate request with Clerk”

That error is not coming from OpenClaw itself (OpenClaw doesn’t use Clerk). It means the Discord App handling the slash command (looks like an app named “Hero”) is failing to auth against Clerk on its backend.

#

So either:

  • you’re running/using a different Discord app than your OpenClaw bot, or
  • your Discord slash commands are wired to some hosted endpoint/proxy that uses Clerk (and that auth is broken).

Quick checks to pinpoint it

  1. In Discord: does a normal message to the bot work (e.g. mentioning the bot), or do all slash commands fail?
  2. Paste:
  1. If this is a new Discord channel: and you’re using groupPolicy: "allowlist" with an explicit guilds.<id>.channels map, you must add the new channel ID there or it’ll be blocked.

If you paste your channels.discord config block (redact tokens), I can tell you exactly which of these is happening.

undone isle
#

i use tailscale url which was recently initiated so instead of direct local ip, i use tailscale dedicated url

idle hawkBOT
#

Using a Tailscale URL is totally fine, but it changes the auth/pairing behavior a lot compared to 127.0.0.1.

Why “/new in gateway chat” can look like it does nothing over Tailscale

When you open the Control UI/WebChat remotely (MagicDNS / Tailscale Serve), the Gateway typically requires one-time device pairing approval for that browser/device. Until that’s approved, you’ll either be disconnected (often with code 1008) or effectively blocked.

Fix (run on the machine that runs the gateway):

openclaw devices list
openclaw devices approve <requestId>

Docs: https://docs.openclaw.ai/web/control-ui (see “Device pairing”)

Also make sure you’re using the HTTPS Tailscale Serve URL if possible:

#

If you’re instead using a raw tailnet IP like http://100.x.y.z:18789/, note that plain HTTP can trigger “insecure context” issues in the browser, and the Control UI may refuse certain auth modes unless you explicitly relax it (docs explain this).

And the “502 Failed to authenticate request with Clerk” on Discord

That error is from some other Discord app’s backend (Clerk), not OpenClaw. In your screenshot it even shows it’s coming from an app called “Hero”.

So you’re likely running Hero’s /new slash command, not OpenClaw’s.

What to do:

  • Type /new and in the command picker, choose the one that belongs to your OpenClaw bot (it will show the app/bot name).
  • If OpenClaw’s /new doesn’t exist in the picker, native commands may not be registered (restart gateway after enabling native commands / ensuring the bot was invited with applications.commands scope).

Docs on commands: https://docs.openclaw.ai/tools/slash-commands

If you paste:

  1. your gateway connection URL (redact host if you want, but say Serve vs tailnet IP), and
  2. what the Control UI connection status shows (connected vs disconnected / any code),
    I can tell you exactly which branch you’re hitting.
undone isle
#

actually

idle hawkBOT
#

Actually… which part should I correct?

Quickly tell me these 3 things and we’ll nail it:

  1. What exact URL are you opening for the Gateway UI? (just enough to tell which mode)
  • https://<magicdns>/ (Tailscale Serve), or
  • http://100.x.y.z:18789/ (direct tailnet IP bind), or
  • something else?
  1. In the Control UI header/status, does it say connected or disconnected (any code like 1008 pairing required)?

  2. On Discord, are you typing text /new as a normal message, or using the slash command picker (and which app name shows next to /new—OpenClaw vs “Hero”)?

#

http://127.0.0.1:18789/ only works if (a) you’re opening it on the same machine the Gateway is running on and (b) the Gateway is actually bound to loopback.

Two super common gotchas:

  1. You’re not on the gateway host
  • If the Gateway runs on a VPS / other box, 127.0.0.1 is your laptop, not the server.
  • Use either:
  • Tailscale Serve URL (https://<magicdns>/), or
  • an SSH tunnel: ssh -N -L 18789:127.0.0.1:18789 user@server then open http://127.0.0.1:18789/
  1. You set gateway.bind: "tailnet"
  • In tailnet bind mode, loopback explicitly won’t be listening, even on the gateway host.
  • You must open http://<tailscale-ip>:18789/ instead (or switch bind back to loopback / use Serve).

Can you paste the output of these (run on the machine where you think the gateway is running)?