#TypeError: Cannot read properties of undefined (reading 'trim')

72 messages ยท Page 1 of 1 (latest)

wet jungle
#

i can never finish the onboarding now because of this

half spearBOT
#

thatโ€™s frustrating. First thing I need is your exact version, because this exact trim onboarding crash has had fixes recently.

Please paste:

openclaw --version
openclaw status --all

Why Iโ€™m asking:

  • there are recent fixes for onboarding/setup crashes with Cannot read properties of undefined (reading 'trim')
  • if youโ€™re already on a newer build, the next likely cause is stale bootstrapping/session state from a failed earlier run

Relevant docs:

#

Paste those two outputs and Iโ€™ll tell you the next exact step.

wet jungle
#

PS C:\Users\unkil> openclaw --version
OpenClaw 2026.4.14 (323493f)
PS C:\Users\unkil> openclaw status --all

OpenClaw status --all

Overview
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Item โ”‚ Value โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ Version โ”‚ 2026.4.14 โ”‚
โ”‚ OS โ”‚ windows 10.0.26200 (x64) โ”‚
โ”‚ Node โ”‚ 24.14.1 โ”‚
โ”‚ Config โ”‚ ~.openclaw\openclaw.json โ”‚
โ”‚ Dashboard โ”‚ http://127.0.0.1:18789/ โ”‚
โ”‚ Tailscale โ”‚ off โ”‚
โ”‚ Channel โ”‚ stable (default) โ”‚
โ”‚ Update โ”‚ pkg โ”‚
โ”‚ Gateway โ”‚ local ยท ws://127.0.0.1:18789 (local loopback) ยท unreachable โ”‚
โ”‚ Security โ”‚ Run: openclaw security audit --deep โ”‚
โ”‚ Gateway self โ”‚ unknown โ”‚
โ”‚ Gateway service โ”‚ Scheduled Task not installed โ”‚
โ”‚ Node service โ”‚ Scheduled Task not installed โ”‚
โ”‚ Agents โ”‚ 0 total ยท 0 bootstrapping ยท 0 active ยท 0 sessions โ”‚
โ”‚ Secrets โ”‚ none โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Channels
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Channel โ”‚ Enabled โ”‚ State โ”‚ Detail โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Agents
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Agent โ”‚ Bootstrap file โ”‚ Sessions โ”‚ Active โ”‚ Store โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Diagnosis (read-only)

Gateway connection details:
Gateway target: ws://127.0.0.1:18789
Source: local loopback
Config: C:\Users\unkil.openclaw\openclaw.json
Bind: loopback

โœ— Config: C:\Users\unkil.openclaw\openclaw.json
โœ“ Secret diagnostics (0)
โœ“ Restart sentinel: none
โœ“ Port 18789
! Tailscale: off ยท unknown
โœ“ Plugin compatibility (none)
! Channel issues skipped (gateway unreachable)

Gateway health:
gateway unreachable

Pasteable debug report. Auth tokens redacted.
Troubleshooting: https://docs.openclaw.ai/troubleshooting

half spearBOT
#

perfect, that helps.

Youโ€™re on a recent build, so this is less likely to be the older onboarding trim bug. The bigger clue is this part:

  • Gateway ... unreachable
  • Gateway service: Scheduled Task not installed
  • Agents: 0 total

So onboarding is not even reaching the point where the agent/bootstrap starts.

Try this in PowerShell, in order:

openclaw doctor
openclaw gateway status
openclaw gateway run
#

A few notes:

  • Gateway service not installed is okay if you run it manually
  • Gateway unreachable is not okay, thatโ€™s the blocker
  • keep openclaw gateway run open, then retry onboarding in another window

If openclaw gateway run crashes or prints the same trim error, paste that output here.
If doctor reports a config problem, paste that too, since status --all only shows โœ— Config without the reason.

Docs:

If you want, after you paste doctor + gateway run, Iโ€™ll narrow it down fast.

wet jungle
#

well i just did a fresh reinstall of openclaw thats why there is nothing

half spearBOT
#

yep, that explains the empty agents/sessions ๐Ÿ‘

So the reinstall explains the blank state, but not the trim crash itself. For that, I need the actual failing output, not the post-failure status snapshot.

Please paste these:

openclaw doctor

Then run the same onboarding flow that crashes, and paste the full error output from the terminal.

If youโ€™re using the dashboard/UI, do this first so we can catch the real log:

openclaw gateway run
#

Then retry onboarding and paste whatever shows up in that terminal when it blows up.

If you want, also tell me which command/path youโ€™re using to onboard:

  • openclaw onboard
  • openclaw configure
  • dashboard/control UI

Thatโ€™ll narrow this down a lot faster.

wet jungle
#

โ—‡ Select channel (QuickStart)
โ”‚ Discord (Bot API)
โ”‚
โ—‡ Discord bot token โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ โ”‚
โ”‚ 1) Discord Developer Portal -> Applications -> New Application โ”‚
โ”‚ 2) Bot -> Add Bot -> Reset Token -> copy token โ”‚
โ”‚ 3) OAuth2 -> URL Generator -> scope 'bot' -> invite to your server โ”‚
โ”‚ Tip: enable Message Content Intent if you need message text. (Bot -> Privileged Gateway โ”‚
โ”‚ Intents -> Message Content Intent) โ”‚
โ”‚ Docs: discord โ”‚
โ”‚ โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
โ”‚
โ—‡ How do you want to provide this Discord bot token?
โ”‚ Enter Discord bot token
โ”‚
โ—‡ Enter Discord bot token
โ”‚ i removed so you dont see
โ”‚
โ—‡ Configure Discord channels access?
โ”‚ Yes
โ”‚
โ—‡ Discord channels access
โ”‚ Open (allow all channels)
TypeError: Cannot read properties of undefined (reading 'trim')
PS C:\Users\unkil>

PS C:\Users\unkil> openclaw gateway run

๐Ÿฆž OpenClaw 2026.4.14 (323493f) โ€” Alexa, but with taste.

โ”‚
โ—‡
00:24:45 [gateway] loading configurationโ€ฆ
00:24:45 [gateway] resolving authenticationโ€ฆ
00:24:45 [gateway] starting...
00:25:10 [gateway] starting HTTP server...
00:25:10 [canvas] host mounted at http://127.0.0.1:18789/__openclaw__/canvas/ (root C:\Users\unkil.openclaw\canvas)
00:25:10 [health-monitor] started (interval: 300s, startup-grace: 60s, channel-connect-grace: 120s)
00:25:10 [gateway] agent model: openai/gpt-5.4
00:25:10 [gateway] ready (5 plugins: acpx, browser, device-pair, phone-control, talk-voice; 24.7s)
00:25:10 [gateway] log file: C:\Users\unkil\AppData\Local\Temp\openclaw\openclaw-2026-04-16.log
00:25:10 [gateway] starting channels and sidecars...
00:25:10 [hooks] loaded 4 internal hook handlers
00:25:10 [plugins] embedded acpx runtime backend registered (cwd: C:\Users\unkil.openclaw\workspace)
00:25:11 (node:5828) [DEP0190] DeprecationWarning: Passing args to a child process with shell option true can lead to security vulnerabilities, as the arguments are not escaped, only concatenated.
(Use node --trace-deprecation ... to show where the warning was created)
00:25:11 [browser/server] Browser control listening on http://127.0.0.1:18791/ (auth=token)
00:25:12 [heartbeat] started
00:25:13 [plugins] embedded acpx runtime backend ready
00:28:03 [ws] closed before connect conn=19c5640e-eb6d-41e7-9cba-77c0505751d2 peer=127.0.0.1:55837->127.0.0.1:18789 remote=127.0.0.1 fwd=n/a origin=n/a host=127.0.0.1:18789 ua=n/a code=1008 reason=connect failed

half spearBOT
#

yep, this looks like a wizard bug in 2026.4.14, not something wrong with your token.

Also, this line is probably a side issue, not the cause of onboarding failing:

  • code=1008 reason=connect failed

That looks like the local canvas/control UI websocket, not the Discord setup crash.

Fastest ways forward

Option 1, best bet: update and retry
There are onboarding/setup fixes in the newer codepath.

openclaw update
#

If youโ€™re okay trying beta:

openclaw update --channel beta

Then retry the Discord QuickStart.

Option 2, unblock yourself right now: skip the buggy wizard
Configure Discord manually instead of using the TUI prompt.

In your config, set:

{
  channels: {
#
    discord: {
      enabled: true,
      groupPolicy: "open",
      token: {
        source: "env",
        provider: "default",
        id: "DISCORD_BOT_TOKEN",
      },
    },
  },
}

Then locally set your env var, start the gateway, and DM the bot for pairing. Do not paste the token here.

Docs:

wet jungle
#

ok that worked, how do i set the embedding model to be this one
provider: lmstudio
model: text-embedding-embeddinggemma-300m-qat

half spearBOT
#

nice, glad that unblocked it ๐ŸŽ‰

Set it under agents.defaults.memorySearch:

{
  agents: {
    defaults: {
      memorySearch: {
        provider: "lmstudio",
        model: "text-embedding-embeddinggemma-300m-qat",
      },
    },
  },
}
#

If this fixed it, please right-click the solution message โ†’ Apps โ†’ โœ… Mark Solution so Answer Overflow can index it.

wet jungle
#

{
"gateway": {
"auth": {
"mode": "token",
"token": "i removed it"
},
"mode": "local",
"port": 18789,
"bind": "loopback",
"tailscale": {
"mode": "off",
"resetOnExit": false
},
"controlUi": {
"allowInsecureAuth": true
}
},
"wizard": {
"lastRunAt": "2026-04-16T04:45:22.299Z",
"lastRunVersion": "2026.4.15-beta.1",
"lastRunCommand": "onboard",
"lastRunMode": "local"
},
"meta": {
"lastTouchedVersion": "2026.4.15-beta.1",
"lastTouchedAt": "2026-04-16T04:45:39.992Z"
},
"agents": {
"defaults": {
"workspace": "C:\Users\unkil\.openclaw\workspace",
"models": {
"lmstudio/google/gemma-4-e4b": {}
},
"model": {
"primary": "lmstudio/google/gemma-4-e4b"
}
}
},
"update": {
"channel": "beta"
},
"session": {
"dmScope": "per-channel-peer"
},
"tools": {
"profile": "coding",
"web": {
"search": {
"provider": "ollama",
"enabled": true
}
}
},
"models": {
"mode": "merge",
"providers": {
"lmstudio": {
"baseUrl": "http://localhost:1234/v1",
"api": "openai-completions",
"auth": "api-key",
"apiKey": "LM_API_TOKEN",
"models": [
{
"id": "google/gemma-4-e4b",
"name": "Gemma 4 E4B",
"reasoning": true,
"input": [
"text",
"image"
],
"cost": {
"input": 0,
"output": 0,
"cacheRead": 0,
"cacheWrite": 0
},
"contextWindow": 131072,
"contextTokens": 64000,
"maxTokens": 8192
}
]
}
}
},
"auth": {
"profiles": {
"lmstudio:default": {
"provider": "lmstudio",
"mode": "api_key"
}
}
},
"channels": {
"discord": {
"enabled": true,
"token": "i removed it ",
"groupPolicy": "allowlist",
"guilds": {}
}
},
"plugins": {
"entries": {
"ollama": {
"enabled": true
},
"lmstudio": {
"enabled": true
}
}
},
"hooks": {
"internal": {
"enabled": true,
"entries": {
"boot-md": {
"enabled": true
},
"bootstrap-extra-files": {
"enabled": true
},
"command-logger": {
"enabled": true
},
"session-memory": {
"enabled": true
}
}
}
}
}

half spearBOT
#

yep, in your current config it should go right here under agents.defaults:

{
  "agents": {
    "defaults": {
      "workspace": "C:\\Users\\unkil\\.openclaw\\workspace",
      "models": {
        "lmstudio/google/gemma-4-e4b": {}
      },
      "model": {
        "primary": "lmstudio/google/gemma-4-e4b"
      },
      "memorySearch": {
        "provider": "lmstudio",
        "model": "text-embedding-embeddinggemma-300m-qat"
#
      }
    }
  }
}

Then restart and rebuild the index:

openclaw memory index --force

One other thing I noticed: right now you have

#
"channels": {
  "discord": {
    "enabled": true,
    "groupPolicy": "allowlist",
    "guilds": {}
  }
}

That means server channels are still blocked. If you wanted open server access, change that to:

"groupPolicy": "open"

If you want, paste the updated redacted config and Iโ€™ll sanity check it.

wet jungle
#

01:39:40 [tools] exec failed: elevated is not available right now (runtime=direct).
Failing gates: allowFrom (tools.elevated.allowFrom.<provider> / agents.list[].tools.elevated.allowFrom.<provider>)
Context: provider=discord session=agent:main:discord:direct:486637630394466342
Fix-it keys:

  • tools.elevated.enabled
  • tools.elevated.allowFrom.<provider>
  • agents.list[].tools.elevated.enabled
  • agents.list[].tools.elevated.allowFrom.<provider> raw_params={"command":"openclaw memory index","elevated":true,"pty":true}

how do i let my agent do it

half spearBOT
#

the key detail is this part:

  • runtime=direct

So your agent is already on the host. It does not need elevated mode for openclaw memory index.

Best fix

Turn elevated off for that session, then ask again:

/elevated off

Or make that permanent in config:

#
{
  agents: {
    defaults: {
      elevatedDefault: "off"
    }
  }
}

If you really want to allow elevated anyway

Add a tight Discord allowlist for your user id only:

{
  tools: {
#
    elevated: {
      enabled: true,
      allowFrom: {
        discord: ["486637630394466342"]
      }
    }
  }
}

Then restart the gateway.

A couple important notes:

  • Do not use "*" here.
  • Per-agent agents.list[].tools.elevated... is optional and only makes it more restrictive.
wet jungle
#

PS C:\Users\unkil> openclaw sandbox explain --session agent:main:discord:slash:486637630394466342

๐Ÿฆž OpenClaw 2026.4.15-beta.1 (943cb47)
I'll do the boring stuff while you dramatically stare at the logs like it's cinema.

Effective sandbox:
agentId: main
sessionKey: agent:main:discord:slash:486637630394466342
mainSessionKey: agent:main:main
runtime: direct
mode: off scope: agent
workspaceAccess: none workspaceRoot: C:\Users\unkil.openclaw\sandboxes

Sandbox tool policy:
allow (default): exec, process, read, write, edit, apply_patch, image, sessions_list, sessions_history, sessions_send, sessions_spawn, sessions_yield, subagents, session_status
deny (default): browser, canvas, nodes, cron, gateway, feishu, googlechat, nostr, msteams, mattermost, nextcloud-talk, matrix, bluebubbles, line, zalo, zalouser, synology-chat, tlon, discord, imessage, irc, qqbot, signal, slack, telegram, twitch, whatsapp

Elevated:
enabled: true
channel: (unknown)
allowedByConfig: false

Fix-it:

  • tools.sandbox.tools.allow
  • tools.sandbox.tools.alsoAllow
  • tools.sandbox.tools.deny
  • agents.list[].tools.sandbox.tools.allow
  • agents.list[].tools.sandbox.tools.alsoAllow
  • agents.list[].tools.sandbox.tools.deny
  • tools.elevated.enabled

Docs: docs.openclaw.ai/sandbox

PS C:\Users\unkil>

half spearBOT
#

yep, this confirms it:

  • Elevated.enabled: true
  • allowedByConfig: false

So the missing piece is the Discord allowlist, not the global enable flag.

Add this:

{
  tools: {
    elevated: {
      enabled: true,
      allowFrom: {
        discord: ["486637630394466342"]
#
      }
    }
  }
}

Then restart the gateway.

One important detail

openclaw sandbox explain showing channel: (unknown) for that slash session is a bit misleading here. The actual exec failure already told us the provider was discord, so tools.elevated.allowFrom.discord is still the right key.

My recommendation

Because your runtime is direct, Iโ€™d also set:

#
{
  agents: {
    defaults: {
      elevatedDefault: "off"
    }
  }
}

That stops the agent from needlessly asking for elevated on normal host exec.

So:

  • Want elevated available? add tools.elevated.allowFrom.discord
  • Want it to stop tripping over elevated at all? set agents.defaults.elevatedDefault: "off"
#

If you want, I can paste the exact merged block for your current config.

wet jungle
#

where do i do that in the dashboard

half spearBOT
#

in the Dashboard, go to the Config tab, not the Gateway Access card.

Easiest way

Use Config โ†’ Raw JSON and add/edit these two spots:

{
  tools: {
    elevated: {
      allowFrom: {
        discord: ["486637630394466342"]
      }
    }
  },
  agents: {
    defaults: {
#
      elevatedDefault: "off"
    }
  }
}

You already have tools.elevated.enabled: true, so you only need to add the discord allowlist and flip elevatedDefault.

If you want the form view instead

In Config form mode, go to:

  • tools โ†’ elevated โ†’ allowFrom โ†’ discord
  • agents โ†’ defaults โ†’ elevatedDefault

Set:

wet jungle
#

{
"gateway": {
"auth": {
"mode": "token",
"token": ""
},
"mode": "local",
"port": 18789,
"bind": "loopback",
"tailscale": {
"mode": "off",
"resetOnExit": false
},
"controlUi": {
"allowInsecureAuth": true
}
},
"wizard": {
"lastRunAt": "2026-04-16T04:45:22.299Z",
"lastRunVersion": "2026.4.15-beta.1",
"lastRunCommand": "onboard",
"lastRunMode": "local"
},
"meta": {
"lastTouchedVersion": "2026.4.15-beta.1",
"lastTouchedAt": "2026-04-16T05:46:33.663Z"
},
"agents": {
"defaults": {
"workspace": "C:\Users\unkil\.openclaw\workspace",
"models": {
"lmstudio/google/gemma-4-e4b": {}
},
"model": {
"primary": "lmstudio/google/gemma-4-e4b"
},
"memorySearch": {
"provider": "lmstudio",
"model": "text-embedding-embeddinggemma-300m-qat"
}
},
"list": [
{
"id": "main",
"tools": {
"profile": "full",
"alsoAllow": [
"browser",
"canvas",
"message",
"gateway",
"nodes",
"agents_list",
"tts"
]
}
}
]
},
"update": {
"channel": "beta"
},
"session": {
"dmScope": "per-channel-peer"
},
"tools": {
"profile": "coding",
"web": {
"search": {
"provider": "ollama",
"enabled": true
},
"fetch": {
"enabled": true
}
},
"elevated": {
"enabled": true
},
"loopDetection": {
"enabled": true
},
"experimental": {
"planTool": true
}
},
"models": {
"mode": "merge",
"providers": {
"lmstudio": {
"baseUrl": "http://localhost:1234/v1",
"api": "openai-completions",
"auth": "api-key",
"apiKey": "LM_API_TOKEN",
"models": [
{
"id": "google/gemma-4-e4b",
"name": "Gemma 4 E4B",
"reasoning": true,
"input": [
"text",
"image"
],
"cost": {
"input": 0,
"output": 0,
"cacheRead": 0,
"cacheWrite": 0
},
"contextWindow": 131072,
"contextTokens": 64000,
"maxTokens": 8192
}
]
}
}
},
"auth": {
"profiles": {
"lmstudio:default": {
"provider": "lmstudio",
"mode": "api_key"
}
}
},
"channels": {
"discord": {
"enabled": true,
"token": "",
"groupPolicy": "allowlist",
"guilds": {},
"ackReactionScope": "all"
},
"activity": "Reading TWSA",
"activityType": 3,
"agentComponents": {
"enabled": true
},
"intents": {
"guildMembers": true,
"presence": true
}
}
},
"plugins": {
"entries": {
"ollama": {
"enabled": true
},
"lmstudio": {
"enabled": true
},
"memory-core": {
"config": {
"dreaming": {
"enabled": true
}
}
},
"browser": {
"enabled": true
}
}
},
"hooks": {
"internal": {
"enabled": true,
"entries": {
"boot-md": {
"enabled": true
},
"bootstrap-extra-files": {
"enabled": true
},
"command-logger": {
"enabled": true
},
"session-memory": {
"enabled": true
}
}
}
},
"messages": {
"statusReactions": {
"enabled": true
}
}
}

half spearBOT
#

ah, I think I see a real config bug here.

Your channels.discord block is closed too early:

"ackReactionScope": "all"
},
"activity": "Reading TWSA",

That stray } makes activity, activityType, agentComponents, and intents end up outside channels.discord, which is the wrong shape.

Fix that block to this

{
  channels: {
#
    discord: {
      enabled: true,
      token: "...",
      groupPolicy: "allowlist",
      guilds: {},
      ackReactionScope: "all",
      activity: "Reading TWSA",
      activityType: 3,
      agentComponents: {
        enabled: true,
      },
      intents: {
        guildMembers: true,
        presence: true,
      },
#
    },
  },
}

And for the elevated issue, add this too

{
  tools: {
    elevated: {
      enabled: true,
      allowFrom: {
        discord: ["486637630394466342"],
      },
    },
#
  },
  agents: {
    defaults: {
      elevatedDefault: "off",
    },
  },
}

Two quick notes

  • If token: "" values are just redacted for Discord here, ignore that.
  • If they are literally empty in your real config, that is also a problem.

So yes, Iโ€™m worried the broken channels.discord object is at least part of why onboarding is falling over.

Docs for the Discord shape:

plain canyon
#

use openclaw setup instead

half spearBOT
#

yep, good catch, openclaw setup does exist on current builds and is probably the better retry here. ๐Ÿ‘

For AizenKai, Iโ€™d do this in order:

  1. Fix the malformed channels.discord block from the config you pasted, the brace is off.
  2. Then rerun:
openclaw setup

Docs: https://docs.openclaw.ai/cli/setup

If it still blows up after that, paste:

#
openclaw --version

and the next error output. Thatโ€™ll tell us pretty quickly whether this is just config-shape breakage or a separate onboarding bug.

wet jungle
#

06:02:10+00:00 error gateway connect failed: GatewayClientRequestError: pairing required
gateway connect failed: GatewayClientRequestError: pairing required
06:02:10+00:00 warn gateway/ws {"subsystem":"gateway/ws"} {"cause":"pairing-required","handshake":"failed","durationMs":27,"lastFrameType":"req","lastFrameMethod":"connect","lastFrameId":"2a45bbfe-df7c-439a-a545-211d84154c76","host":"127.0.0.1:18789","remoteAddr":"127.0.0.1","remotePort":54629,"localAddr":"127.0.0.1","localPort":18789,"endpoint":"127.0.0.1:54629->127.0.0.1:18789","deviceId":"90bff4ed72880276069a51cc70e0b293ae1555135b3726aba77c4eec03310fd8","requestId":"af4994d2-2763-460a-84d3-2dd9d6aa9c3d","reason":"scope-upgrade"} closed before connect conn=f66f466f-be34-4f17-bdff-cdb8d6f04cfc peer=127.0.0.1:54629->127.0.0.1:18789 remote=127.0.0.1 fwd=n/a origin=n/a host=127.0.0.1:18789 ua=n/a code=1008 reason=connect failed
06:02:11+00:00 warn gateway {"subsystem":"gateway"} security audit: device access upgrade requested reason=scope-upgrade device=90bff4ed72880276069a51cc70e0b293ae1555135b3726aba77c4eec03310fd8 ip=unknown-ip auth=token roleFrom=operator roleTo=operator scopesFrom=operator.read scopesTo=operator.admin,operator.approvals,operator.pairing,operator.read,operator.talk.secrets,operator.write client=cli conn=cd4a6694-e904-4e3b-a8aa-2e55156bbd2d
06:02:11+00:00 error gateway connect failed: GatewayClientRequestError: pairing required
06:02:11+00:00 error gateway connect failed: GatewayClientRequestError: pairing required
gateway connect failed: GatewayClientRequestError: pairing required

half spearBOT
#

this one is clearer now, itโ€™s a pairing / scope-upgrade problem, not just elevated mode.

Your log says:

  • reason:"scope-upgrade"
  • scopesFrom=operator.read
  • scopesTo=operator.admin,operator.approvals,operator.pairing,operator.read,operator.talk.secrets,operator.write

So the CLI is asking for more gateway permissions, and the gateway is waiting for you to approve that device.

Do this on the same machine

openclaw devices list

Then approve the current pending request ID:

#
openclaw devices approve <requestId>

Your log showed:

af4994d2-2763-460a-84d3-2dd9d6aa9c3d

but run openclaw devices list first, because if it retried, that ID may already be stale.

After approving

Retry:

wet jungle
#

PS C:\Users\unkil> openclaw devices approve af4994d2-2763-460a-84d3-2dd9d6aa9c3d

๐Ÿฆž OpenClaw 2026.4.15-beta.1 (943cb47) โ€” Your AI assistant, now without the $3,499 headset.

โ”‚
gateway connect failed: GatewayClientRequestError: pairing required
โ—‡
Direct scope access failed; using local fallback.
unknown requestId
PS C:\Users\unkil>

half spearBOT
#

yep, that means the request ID from the log is stale.

This part confirms it:

  • using local fallback โœ…
  • unknown requestId = the pending pairing request was superseded and got a new ID

Do this now

  1. Trigger the request again:
openclaw setup
  1. In another terminal, immediately run:
openclaw devices list
#
  1. Find the newest pending request, ideally the one for:
  • device 90bff4ed72880276069a51cc70e0b293ae1555135b3726aba77c4eec03310fd8
  • reason like scope-upgrade
  1. Approve that new request ID:
openclaw devices approve <new-requestId>

Important

Donโ€™t reuse af4994d2-2763-460a-84d3-2dd9d6aa9c3d, itโ€™s already obsolete.

If openclaw devices list comes back empty, paste that output next, because then weโ€™re in slightly weirder territory.

wet jungle
#

PS C:\Users\unkil> openclaw setup

๐Ÿฆž OpenClaw 2026.4.15-beta.1 (943cb47) โ€” One CLI to rule them all, and one more restart because you changed the port.

Config OK: ~.openclaw\openclaw.json
Workspace OK: ~.openclaw\workspace
Sessions OK: ~.openclaw\agents\main\sessions
PS C:\Users\unkil> openclaw devices list

๐Ÿฆž OpenClaw 2026.4.15-beta.1 (943cb47) โ€” Your config is valid, your assumptions are not.

โ”‚
โ—‡
[openclaw] Failed to start CLI: Error: gateway closed (1006 abnormal closure (no close frame)): no close reason
Gateway target: ws://127.0.0.1:18789
Source: local loopback
Config: C:\Users\unkil.openclaw\openclaw.json
Bind: loopback
at Object.onClose (file:///C:/Users/unkil/AppData/Roaming/npm/node_modules/openclaw/dist/call-DKkbbXOF.js:249:10)
at WebSocket.<anonymous> (file:///C:/Users/unkil/AppData/Roaming/npm/node_modules/openclaw/dist/client-CQUWcz_Z.js:390:23)
at WebSocket.emit (node:events:508:28)
at WebSocket.emitClose (C:\Users\unkil\AppData\Roaming\npm\node_modules\openclaw\node_modules\ws\lib\websocket.js:263:12)
at emitErrorAndClose (C:\Users\unkil\AppData\Roaming\npm\node_modules\openclaw\node_modules\ws\lib\websocket.js:1047:13)
at ClientRequest.<anonymous> (C:\Users\unkil\AppData\Roaming\npm\node_modules\openclaw\node_modules\ws\lib\websocket.js:886:5)
at ClientRequest.emit (node:events:508:28)
at emitErrorEvent (node:_http_client:108:11)
at Socket.socketErrorListener (node:_http_client:575:5)
at Socket.emit (node:events:508:28)
PS C:\Users\unkil>

half spearBOT
#

thatโ€™s frustrating, but this actually gives us a cleaner signal.

openclaw devices list is no longer complaining about the old request ID, itโ€™s failing because the gateway connection is closing abnormally:

  • gateway closed (1006 abnormal closure (no close frame))
  • target: ws://127.0.0.1:18789

So right now the next thing to inspect is the gateway/service itself, not pairing.

Please run these next

openclaw gateway status --deep
openclaw doctor

Why

1006 usually means one of these:

#
  • the gateway crashed on connect
  • the wrong/stale gateway service is listening
  • config/service mismatch
  • port conflict / multiple gateway processes

openclaw setup here only validated local files, it didnโ€™t complete a live gateway handshake.

Paste those two outputs and we can narrow it down fast.

wet jungle
#

19:50:11 [agent/embedded] Profile lmstudio:default timed out. Trying next account...
19:50:11 [agent/embedded] [llm-idle-timeout] lmstudio/qwen3.5-9b-claude-4.6-opus-reasoning-distilled produced no reply before the idle watchdog; retrying same model

is there a way to extend the time out wait or just make it do nothing instead of trying the next agent

half spearBOT
#

yep.

That log is not switching agents, itโ€™s doing two separate failovers:

  1. LLM idle timeout
  2. auth-profile rotation (Trying next account...)

To wait longer

Set:

{
  agents: {
    defaults: {
      llm: {
        idleTimeoutSeconds: 300
#
{
  auth: {
    order: {
      lmstudio: ["lmstudio:default"]
    }
  }
}

If you also want it to fail instead of falling back to another model, make sure you donโ€™t have extra entries in:

agents.defaults.model.fallbacks

Practical recommendation

#

For slow local reasoning models, Iโ€™d try this first:

{
  agents: {
    defaults: {
      llm: {
        idleTimeoutSeconds: 300
      }
    }
  },
  auth: {
    order: {
      lmstudio: ["lmstudio:default"]
    }
  }
#
}

If you want, paste your current auth + agents.defaults.model block and Iโ€™ll tell you the smallest edit.

wet jungle
#

20:03:23 [discord] discord debounce flush failed: Error [ERR_MODULE_NOT_FOUND]: Cannot find module 'C:\Users\unkil\AppData\Roaming\npm\node_modules\openclaw\dist\extensions\discord\system-events-DUVqwOle.js' imported from C:\Users\unkil\AppData\Roaming\npm\node_modules\openclaw\dist\extensions\discord\message-handler-51fAmdwx.js

half spearBOT
#

yeah, this one looks like a broken install, not a config problem.

message-handler-...js is trying to import a hashed file that simply is not present in your installed dist\extensions\discord\ bundle.

Fastest fix

Try:

openclaw update --channel beta
openclaw doctor
openclaw gateway restart

Docs: https://docs.openclaw.ai/install/updating

If openclaw update doesnโ€™t fix it

Do a clean global reinstall:

#
npm i -g openclaw@beta
openclaw doctor
openclaw gateway restart

If it still happens after reinstall

Then Iโ€™d check for multiple OpenClaw installs on PATH:

where openclaw

because mixed old/new global installs can cause exactly this kind of missing hashed chunk import.

If you want, paste the output of:

#
where openclaw
openclaw gateway status --deep

and Iโ€™ll help you verify itโ€™s using one clean install only.

wet jungle
#

Memory Wiki is not enabled
Imported Insights and Memory Palace are provided by the bundled memory-wiki plugin.
Enable plugins.entries.memory-wiki.enabled = true, then reload this tab.

half spearBOT
#

yep, that message is literal, the memory-wiki plugin isnโ€™t enabled yet.

Enable it

In Dashboard โ†’ Config โ†’ Raw JSON, add:

{
  plugins: {
    entries: {
      "memory-wiki": {
        enabled: true
      }
    }
  }
}
#

Then Save / Apply, restart the gateway if it asks, and reload that tab.

CLI equivalent

openclaw config set plugins.entries.memory-wiki.enabled true --strict-json
openclaw gateway restart

Docs: https://docs.openclaw.ai/plugins/memory-wiki

If you want, paste your current plugins.entries block and Iโ€™ll show exactly where to drop it.

wet jungle
#

in trying to connect to openclaw for a dashboard im making via websocket and i keep getting this

23:51:18 [ws] invalid handshake conn=841fe634-c42b-4564-94bd-5e2f3b7dceb9 peer=127.0.0.1:54586->127.0.0.1:18789 remote=127.0.0.1 fwd=n/a origin=n/a host=127.0.0.1:18789 ua=n/a
23:51:18 [ws] closed before connect conn=841fe634-c42b-4564-94bd-5e2f3b7dceb9 peer=127.0.0.1:54586->127.0.0.1:18789 remote=127.0.0.1 fwd=n/a origin=n/a host=127.0.0.1:18789 ua=n/a code=1008 reason=invalid request frame
23:51:18 [ws] invalid handshake conn=0acc0140-994e-4f19-bf91-e29cf3c06ecf peer=127.0.0.1:54587->127.0.0.1:18789 remote=127.0.0.1 fwd=n/a origin=n/a host=127.0.0.1:18789 ua=n/a
23:51:18 [ws] closed before connect conn=0acc0140-994e-4f19-bf91-e29cf3c06ecf peer=127.0.0.1:54587->127.0.0.1:18789 remote=127.0.0.1 fwd=n/a origin=n/a host=127.0.0.1:18789 ua=n/a code=1008 reason=invalid request frame
23:51:19 [ws] invalid handshake conn=ad2be1c3-9dc4-4317-a510-b81fb407bb99 peer=127.0.0.1:54588->127.0.0.1:18789 remote=127.0.0.1 fwd=n/a origin=n/a host=127.0.0.1:18789 ua=n/a
23:51:19 [ws] closed before connect conn=ad2be1c3-9dc4-4317-a510-b81fb407bb99 peer=127.0.0.1:54588->127.0.0.1:18789 remote=127.0.0.1 fwd=n/a origin=n/a host=127.0.0.1:18789 ua=n/a code=1008 reason=invalid request frame
23:51:20 [ws] invalid handshake conn=15e02f41-ec8d-47a2-b7ae-c682389dc9d7 peer=127.0.0.1:54589->127.0.0.1:18789 remote=127.0.0.1 fwd=n/a origin=n/a host=127.0.0.1:18789 ua=n/a
23:51:20 [ws] closed before connect conn=15e02f41-ec8d-47a2-b7ae-c682389dc9d7 peer=127.0.0.1:54589->127.0.0.1:18789 remote=127.0.0.1 fwd=n/a origin=n/a host=127.0.0.1:18789 ua=n/a code=1008 reason=invalid request frame
23:55:18 [ws] closed before connect conn=2865185f-6d5c-497c-80d8-fe492b8c4b1c peer=127.0.0.1:58109->127.0.0.1:18789 remote=127.0.0.1 fwd=n/a origin=n/a host=127.0.0.1:18789 ua=n/a code=1008 reason=invalid connect params: at /client/id: must be equal to constant; at /client/id: must match a schema in anyOf; at /clien
00:03:41 [ws] closed before connect conn=08526a67-e20b-4740-8110-25831148e7eb peer=127.0.0.1:60010->127.0.0.1:18789 remote=127.0.0.1 fwd=n/a origin=n/a host=127.0.0.1:18789 ua=n/a code=1008 reason=origin not allowed (open the Control UI from the gateway host or allow it in gateway.controlUi.allowedOrigins)
00:04:18 [ws] closed before connect conn=86a9eafe-6108-45be-954b-6c1dbf9648a1 peer=127.0.0.1:60015->127.0.0.1:18789 remote=127.0.0.1 fwd=n/a origin=n/a host=127.0.0.1:18789 ua=n/a code=1008 reason=device identity mismatch

half spearBOT
#

youโ€™re hitting 4 different checks, in order:

  1. invalid request frame
    Your first WS message must be a real gateway request frame, not raw JSON params.
    It needs to look like:

    {
      "type": "req",
      "id": "1",
      "method": "connect",
      "params": { ... }
    }
    
  2. invalid connect params
    client.id is strict, you canโ€™t invent one.

#

For a browser dashboard, use a built-in browser client shape, typically:

  • client.id: "openclaw-control-ui"
  • client.mode: "webchat"
  • client.platform: "web"
  1. origin not allowed
    Your page origin must exactly match gateway.controlUi.allowedOrigins, including port.

    Example:

    {
      gateway: {
        controlUi: {
          allowedOrigins: ["http://localhost:5173"]
        }
    
#
     }
   }
  1. device identity mismatch
    This one is the big one: device.id must equal the fingerprint of the same
    Ed25519 public key you send in device.publicKey.
    It cannot be a UUID or random string.

    In current code, itโ€™s basically:

    device.id = sha256(raw_ed25519_public_key_bytes).hex()
    

    Also, wait for connect.challenge first, then sign that nonce.