I have the dashboard working all for one thing, claw wont accept my api key. Its the same key i put into the setup and in the json file. idk how to fix it and i cant code. im getting this error.
Agent failed before reply: No API key found for provider "openai". Auth store: C:\Users\estro.openclaw\agents\main\agent\auth-profiles.json (agentDir: C:\Users\estro.openclaw\agents\main\agent). Configure auth for this agent (openclaw agents add <id>) or copy auth-profiles.json from the main agentDir. | No API key found for provider "openai". Auth store: C:\Users\estro.openclaw\agents\main\agent\auth-profiles.json (agentDir: C:\Users\estro.openclaw\agents\main\agent). Configure auth for this agent (openclaw agents add <id>) or copy auth-profiles.json from the main agentDir. Logs: openclaw logs --follow
#Api key troubles
1 messages Β· Page 1 of 1 (latest)
This usually means OpenClaw is reading a different auth store or environment than the one you edited, not that your key is necessarily wrong.
You do not need to code for this. First, please run these and paste the output:
openclaw --version
openclaw gateway status
openclaw models status
Also, donβt paste the actual API key.
Most likely fixes on Windows:
- Put the key in:
%USERPROFILE%\.openclaw\.env
with exactly:
OPENAI_API_KEY=your_key_here
- Restart OpenClaw:
openclaw gateway restart
- Check that OpenClaw is using the main agent auth store from the error:
~/.openclaw/agents/main/agent/auth-profiles.json
- If you are using ChatGPT/Codex login instead of a Platform API key, use this instead of API-key auth:
openclaw models auth login --provider openai-codex
Relevant docs:
- https://docs.openclaw.ai/help/faq
- https://docs.openclaw.ai/gateway/authentication
- https://docs.openclaw.ai/providers/openai
Paste those 3 command outputs and Iβll tell you the exact next step.
Service: Scheduled Task (registered)
File logs: ~\AppData\Local\Temp\openclaw\openclaw-2026-04-23.log
Command: C:\Program Files\nodejs\node.exe C:\Users\estro\AppData\Roaming\npm\node_modules\openclaw\dist\index.js gateway --port 18789
Service file: ~.openclaw\gateway.cmd
Service env: OPENCLAW_GATEWAY_PORT=18789
Config (cli): ~.openclaw\openclaw.json
Config (service): ~.openclaw\openclaw.json
Gateway: bind=loopback (127.0.0.1), port=18789 (service args)
Probe target: ws://127.0.0.1:18789
Dashboard: http://127.0.0.1:18789/
Probe note: Loopback-only gateway; only local clients can connect.
Runtime: running (last run 267009, last run time 4/23/2026 4:18:06 PM)
Connectivity probe: ok
Capability: read-only
Listening: 127.0.0.1:18789
Troubles: run openclaw status
Config : ~.openclaw\openclaw.json
Agent dir : ~.openclaw\agents\main\agent
Default : openai/gpt-5.4
Fallbacks (0) : -
Image model : -
Image fallbacks (0): -
Aliases (0) : -
Configured models (0): all
Auth overview
Auth store : ~.openclaw\agents\main\agent\auth-profiles.json
Shell env : off
Providers w/ OAuth/tokens (0): -
- openai effective=profiles:~.openclaw\agents\main\agent\auth-profiles.json | profiles=1 (oauth=0, token=0, api_key=1) | openai:default=(ApiKey)
OAuth/token status
- none
Nice, this helps a lot.
What your output says is:
- OpenClaw is looking at the right agent dir
- it does see an OpenAI profile
- but that profile likely has no usable secret inside it right now
So this is probably not βwrong keyβ, itβs more like βsaved in a way the gateway canβt actually useβ.
Easiest fix on Windows
- Create this file:
C:\Users\estro\.openclaw\.env
- Put exactly this in it:
OPENAI_API_KEY=your_actual_key_here
- Restart the gateway:
openclaw gateway restart
- Then run:
openclaw models status --probe --probe-provider openai
That probe should tell us if itβs fixed, or if the stored profile is broken (missing_credential / unresolved_ref).
Also paste this too
openclaw --version
Version mismatch causes a lot of weird auth issues.
If the .env fix still doesnβt do it, next clean step is to re-add OpenAI auth instead of hand-editing JSON.
Docs:
Paste the probe output and version, and Iβll narrow it down from there.
how do i put that in the .env folder
[agent/embedded] embedded run agent end: runId=60079504-ae99-4f92-b199-9f2b35c595fa isError=true model=gpt-5.4 provider=openai error=401 Incorrect API key provided: sk-proj-******************************************************************************************************************************************************cPoA. You can find your API key at https://platform.openai.com/account/api-keys. rawError=401 Incorrect API key provided: sk-proj-******************************************************************************************************************************************************cPoA. You β¦
17:45:30 [agent/embedded] auth profile failure state updated: runId=60079504-ae99-4f92-b199-9f2b35c595fa profile=sha256:a0ebe3f799a6 provider=openai reason=auth window=cooldown reused=false
17:45:30 [agent/embedded] embedded run failover decision: runId=60079504-ae99-4f92-b199-9f2b35c595fa stage=assistant decision=surface_error reason=auth from=openai/gpt-5.4 profile=sha256:a0ebe3f799a6
Good, this narrows it down a lot.
OpenClaw is reading a key now. The new error is from OpenAI itself:
- before: βno API key foundβ
- now: 401 Incorrect API key provided
So the problem is now the stored OpenAI credential is invalid/stale, not that OpenClaw canβt see one.
Best fix
If you want normal OpenAI API usage, do this:
- Make a fresh OpenAI Platform API key here: https://platform.openai.com/api-keys
- Re-run onboarding so it replaces the stored OpenAI auth profile:
openclaw onboard --auth-choice openai-api-key
- Restart the gateway:
openclaw gateway restart - Verify:
openclaw models status --probe --probe-provider openai
Important note
Because OpenClaw already has an openai auth profile in auth-profiles.json, just adding OPENAI_API_KEY to .env may not override the bad stored key. Re-running onboarding is the cleaner fix here.
If you meant ChatGPT/Codex login instead
If youβre trying to use a ChatGPT subscription instead of API billing, use this path instead:
openclaw models auth login --provider openai-codex
That is a different auth route from OpenAI API keys.
If you run the probe command above and paste the output, plus:
openclaw --version
I can tell you the exact next step. Docs: https://docs.openclaw.ai/providers/openai β’ https://docs.openclaw.ai/gateway/authentication β’ https://docs.openclaw.ai/help/faq
o Model configured --------------------+
| |
| Default model set to openai/gpt-5.4 |
| |
+---------------------------------------+
Error: Cannot find module '@larksuiteoapi/node-sdk'
Require stack:
- C:\Users\estro\AppData\Roaming\npm\node_modules\openclaw\dist\extensions\feishu\client-yWGpoGkZ.js
Ah, okay, this is a different problem now.
Your API key is not the immediate blocker in this message. OpenClaw is crashing because a bundled plugin dependency is missing:
Cannot find module '@larksuiteoapi/node-sdk'
Thatβs the Feishu/Lark plugin runtime dep. Docs say the fix is:
openclaw --version
openclaw doctor --fix
openclaw gateway restart
openclaw status
Then try sending one test message again.
If openclaw doctor --fix still fails, paste its full output here. That command is specifically supposed to repair missing bundled plugin runtime deps.
Relevant docs:
- https://docs.openclaw.ai/gateway/doctor
- https://docs.openclaw.ai/help/faq
- https://docs.openclaw.ai/platforms/windows
Small note: native Windows works, but WSL2 is still the more stable path if Windows keeps throwing weird install/runtime issues.
If this fixes it, please right-click the solution message β Apps β β Mark Solution so Answer Overflow can index it.
[bonjour] watchdog detected non-announced service; attempting re-advertise (gateway fqdn=Knee-Gear (OpenClaw)._openclaw-gw._tcp.local. host=openclaw.local. port=18789 state=probing)
17:58:12 [ws] closed before connect conn=adcafa2c-199f-47e2-af63-309d61c4c4fd peer=127.0.0.1:52430->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=1006 reason=n/a
17:58:12 [ws] closed before connect conn=8c51a3f4-a53b-45aa-8c83-c54736dbe7ba peer=127.0.0.1:52429->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=1006 reason=n/a
17:58:12 [ws] closed before connect conn=3d000125-30fc-4c7c-a140-f27983f72715 peer=127.0.0.1:52428->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=1006 reason=n/a
17:58:12 [ws] closed before connect conn=d9a1703d-bf5d-460e-90a4-3b8703a89948 peer=127.0.0.1:52427->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=1006 reason=n/a
17:58:12 [ws] closed before connect conn=0a6caa24-c548-495f-9ec8-9c4cb77c0be2 peer=127.0.0.1:52426->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=1006 reason=n/a
17:58:12 [ws] closed before connect conn=6f8299df-8374-44aa-95ce-51f2fec77f3b peer=127.0.0.1:52424->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
17:58:12 [plugins] embedded acpx runtime backend ready
17:58:12 [ws] closed before connect conn=a80d7b89-5b46-434d-9d6c-fba3651e68cb peer=127.0.0.1:52432->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
17:58:13 [ws] closed before connect conn=479bafcb-acf9-4aad-bb3f-2f9fded2842e peer=127.0.0.1:52434->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
Those ws closed before connect lines are mostly symptoms, not the root cause.
The real blocker is still the earlier one:
Cannot find module '@larksuiteoapi/node-sdk'
That means the gateway is trying to start, pieces reconnect, then it falls over because a bundled plugin dependency is missing. So Iβd do this in order:
openclaw --version
openclaw doctor --fix
openclaw gateway restart
openclaw status --all
openclaw models status --probe --probe-provider openai
A few notes:
- Please paste all 5 outputs
- Do not paste your API key
- The
doctor --fixstep is the one that should repair missing bundled plugin runtime deps - The
1006/1008 connect failedwebsocket logs can happen while the gateway is half-started/restarting
If doctor --fix completes, but models status --probe --probe-provider openai still shows a 401 Incorrect API key, then the next step is to generate a fresh OpenAI Platform API key and re-run:
openclaw onboard --auth-choice openai-api-key
Docs:
Paste the outputs and Iβll tell you exactly which of the two issues is still left.
π¦ OpenClaw 2026.4.21 (f788c88) β Your AI assistant, now without the $3,499 headset.
|
o
Config : ~.openclaw\openclaw.json
Agent dir : ~.openclaw\agents\main\agent
Default : openai/gpt-5.4
Fallbacks (0) : -
Image model : -
Image fallbacks (0): -
Aliases (0) : -
Configured models (0): all
Auth overview
Auth store : ~.openclaw\agents\main\agent\auth-profiles.json
Shell env : off
Providers w/ OAuth/tokens (0): -
- openai effective=profiles:~.openclaw\agents\main\agent\auth-profiles.json | profiles=1 (oauth=0, token=0, api_key=1) | openai:default=sk-proj-...uyMyoMcA
OAuth/token status
- none
Auth probes
+------------------+--------------------------+------------+
| Model | Profile | Status |
+------------------+--------------------------+------------+
| openai/gpt-5.4 | openai:default (api_key) | ok Β· 27.3s |
+------------------+--------------------------+------------+
Probed 1 target in 76s
Good news, your API key is working now.
This line is the important one:
| openai/gpt-5.4 | openai:default (api_key) | ok |
That means OpenClaw successfully made a real OpenAI auth/model probe with your stored key. So the original βwonβt accept my API keyβ problem is basically solved.
Whatβs left is likely a separate runtime issue, probably the earlier missing bundled-plugin dependency on Windows.
Next step
Run these exactly:
openclaw doctor --fix
openclaw gateway restart
openclaw status --all
Then send one simple test prompt in chat.
Important
If you still see this:
Cannot find module '@larksuiteoapi/node-sdk'
then the remaining problem is not your OpenAI key, itβs the missing Feishu/Lark bundled plugin runtime dep.
Youβre also on 2026.4.21, so if that module error comes back after doctor --fix, Iβd update OpenClaw to the current build using the update docs, then rerun doctor:
- https://docs.openclaw.ai/install/updating
- https://docs.openclaw.ai/gateway/doctor
- https://docs.openclaw.ai/help/faq
Paste the output of openclaw doctor --fix if it complains again, and Iβll help you pin down the last issue.
π¦ OpenClaw 2026.4.21 (f788c88) β I'm like tmux: confusing at first, then suddenly you can't live without me.
ββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββ
π¦ OPENCLAW π¦
T OpenClaw doctor
|
o State integrity -------------------------------------------------------------------------+
| |
| - OAuth dir not present (~.openclaw\credentials). Skipping create because no |
| WhatsApp/pairing channel config is active. |
| - Found 1 orphan transcript file in ~.openclaw\agents\main\sessions. |
| These .jsonl files are no longer referenced by sessions.json, so they are not part of |
| any active session history. |
| Doctor can archive them safely by renaming each file to *.deleted.<timestamp>. |
| Examples: probe-openai-92e55362-298d-4d28-b848-185e6d9964d6.jsonl |
| |
+-------------------------------------------------------------------------------------------+
|
o Doctor changes ----------------------------------------------------------------------+
| |
| - Archived 1 orphan transcript file in ~.openclaw\agents\main\sessions as .deleted |
| timestamped backups. |
| |
+---------------------------------------------------------------------------------------+
|
o Security ---------------------------------+
| |
| - No channel security warnings detected. |
| - Run: openclaw security audit --deep |
| |
+--------------------------------------------+
|
o Skills status ------------+
| |
| Eligible: 6 |
| Missing requirements: 46 |
| Blocked by allowlist: 0 |
| |
+----------------------------+
|
o Plugins ------+
| |
| Loaded: 58 |
| Imported: 58 |
| Disabled: 41 |
| Errors: 0 |
| |
+----------------+
|
o
Agents: main (default)
Heartbeat interval: 30m (main)
Session store (main): C:\Users\estro.openclaw\agents\main\sessions\sessions.json (1 entries)
- agent:main:main (24m ago)
gateway connect failed: GatewayClientRequestError: scope upgrade pending approval (requestId: 95cdfd11-071b-4063-a69d-683f6af90d3c)
|
o Device pairing ---------------------------------------------------------------------------+
| |
| - Pending scope upgrade 95cdfd11-071b-4063-a69d-683f6af90d3c for |
| gateway:device.pair.list |
| (492e802ba3d2fe6905ddeef2ad6f07b5d2cc0e81584acdd81a07005f2b6817ba): approved scopes |
| [operator.read], requested scopes [operator.pairing]. Review with openclaw devices |
| list, then approve with openclaw devices approve 95cdfd11-071b-4063-a69d-683f6af90d3c. |
| |
+--------------------------------------------------------------------------------------------+
|
β Doctor complete.
This is actually good news, your OpenAI key is working now.
The proof is this line:
| openai/gpt-5.4 | openai:default (api_key) | ok |
So the API key problem is basically gone. You do not need to keep re-entering the key.
What Doctor is showing now is a different issue: a pending device scope upgrade.
Run these:
openclaw devices list
openclaw devices approve 95cdfd11-071b-4063-a69d-683f6af90d3c
openclaw gateway restart
Then try the assistant again.
A couple notes:
gateway connect failed: scope upgrade pending approvalis not an OpenAI key error- the orphan transcript cleanup is harmless
- if the old API-key error still shows after restart, send
openclaw status --all
Since you're on 2026.4.21, if weird module/plugin errors come back after this, I'd update next:
If this fixed it, please right-click the solution message β Apps β β Mark Solution so Answer Overflow can index it.
π¦ OpenClaw 2026.4.21 (f788c88) β WhatsApp automation without the "please accept our new privacy policy".
|
o
[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\estro.openclaw\openclaw.json
Bind: loopback
Possible causes:
- Gateway not yet ready to accept connections (retry after a moment)
- TLS mismatch (connecting with ws:// to a wss:// gateway, or vice versa)
- Gateway crashed or was terminated unexpectedly
Runopenclaw doctorfor diagnostics.
at Object.onClose (file:///C:/Users/estro/AppData/Roaming/npm/node_modules/openclaw/dist/call-Cl0YkVGh.js:251:10)
at WebSocket.<anonymous> (file:///C:/Users/estro/AppData/Roaming/npm/node_modules/openclaw/dist/client-D-67f4NF.js:314:23)
at WebSocket.emit (node:events:509:28)
at WebSocket.emitClose (C:\Users\estro\AppData\Roaming\npm\node_modules\openclaw\node_modules\ws\lib\websocket.js:263:12)
at emitErrorAndClose (C:\Users\estro\AppData\Roaming\npm\node_modules\openclaw\node_modules\ws\lib\websocket.js:1047:13)
at ClientRequest.<anonymous> (C:\Users\estro\AppData\Roaming\npm\node_modules\openclaw\node_modules\ws\lib\websocket.js:886:5)
at ClientRequest.emit (node:events:509:28)
at emitErrorEvent (node:_http_client:109:11)
at Socket.socketErrorListener (node:_http_client:593:5)
at Socket.emit (node:events:509:28)
Yep, this is no longer an API key issue.
Your earlier probe showed OpenAI auth is ok. This new error means the gateway itself is closing/crashing before the CLI can talk to it:
gateway closed (1006 abnormal closure)
Gateway target: ws://127.0.0.1:18789
Try this exact sequence:
openclaw gateway status
openclaw gateway restart
openclaw gateway status
openclaw logs --follow
Then, after restart, try one simple command like:
openclaw status
What Iβm looking for
- If
gateway statussays stopped or unhealthy, the gateway is the blocker - If
logs --followshows the old Feishu/Lark error again:
then that missing bundled-plugin dep is still the crash causeCannot find module '@larksuiteoapi/node-sdk' - The
1006line itself is just βthe gateway disappearedβ, not the root cause
Important note
Youβre on 2026.4.21, which is a bit behind current. If restart still crashes, Iβd update next, then rerun doctor:
- https://docs.openclaw.ai/install/updating
- https://docs.openclaw.ai/gateway/troubleshooting
- https://docs.openclaw.ai/gateway/doctor
Paste:
openclaw gateway status- the first real error from
openclaw logs --follow
and Iβll help you pin the crash down.
π¦ OpenClaw 2026.4.21 (f788c88) β Automation with claws: minimal fuss, maximal pinch.
|
gateway connect failed: GatewayClientRequestError: scope upgrade pending approval (requestId: 26637641-69e2-4f82-ab73-3ee7c9fb4c3d)
o
Direct scope access failed; using local fallback.
Pending (1)
+--------------------------------------+-----------+---------------+----------------+----------+-----------------------+
| Request | Device | Requested | Approved | Age | Status |
+--------------------------------------+-----------+---------------+----------------+----------+-----------------------+
| 26637641-69e2-4f82-ab73-3ee7c9fb4c3d | 492e802ba | roles: | roles: | just now | scope upgrade, repair |
| | 3d2fe6905 | operator; | operator; | | |
| | ddeef2ad6 | scopes: | scopes: | | |
| | f07b5d2cc | operator. | operator.read | | |
| | 0e81584ac | admin, | | | |
| | dd81a0700 | operator. | | | |
| | 5f2b6817b | approvals, | | | |
| | a | operator. | | | |
| | | pairing, | | | |
| | | operator. | | | |
| | | read, | | | |
| | | operator. | | | |
| | | talk. | | | |
| | | secrets, | | | |
| | | operator. | | | |
| | | write | | | |
+--------------------------------------+-----------+---------------+----------------+----------+-----------------------+
Paired (2)
+------------------------------+------------+------------------------------------------------+------------+------------+
| Device | Roles | Scopes | Tokens | IP |
+------------------------------+------------+------------------------------------------------+------------+------------+
| gateway:doctor.memory.status | operator | operator.read | operator | |
| ec940f41f781a36edb09c6582ccb | operator | operator.admin, operator.read, operator. | operator | |
| 9b4bb1d54ae38d7d6591a89503b3 | | write, operator.approvals, operator.pairing | | |
| fd319a23 | | | | |
+------------------------------+------------+------------------------------------------------+------------+------------+
Yep, this is the blocker now.
Your OpenAI auth is fine. The CLI is being blocked because this device only has operator.read, and itβs asking for a scope upgrade.
If this is your own machine/device, approve the pending request:
openclaw devices approve 26637641-69e2-4f82-ab73-3ee7c9fb4c3d
openclaw gateway restart
openclaw status
Why: the output shows a pending scope upgrade from operator.read to the broader operator scopes OpenClaw needs.
If it still fails after approval, run:
openclaw devices list
openclaw gateway status
and paste that.
Docs:
- https://docs.openclaw.ai/cli/devices
- https://docs.openclaw.ai/gateway/troubleshooting
- https://docs.openclaw.ai/help/faq
If this fixed it, please right-click the solution message β Apps β β Mark Solution.
[bonjour] watchdog detected non-announced service; attempting re-advertise (gateway fqdn=Knee-Gear (OpenClaw)._openclaw-gw._tcp.local. host=openclaw.local. port=18789 state=probing)
18:19:02 [ws] closed before connect conn=4c8790e1-f33f-4610-ace0-2c871060dc52 peer=127.0.0.1:52514->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=1006 reason=n/a
18:19:02 [ws] closed before connect conn=546bc835-d804-4f3e-b911-298aa542b0df peer=127.0.0.1:52513->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=1006 reason=n/a
18:19:02 [ws] closed before connect conn=f0445555-8951-46b9-808f-f379629fa19f peer=127.0.0.1:52512->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=1006 reason=n/a
18:19:02 [ws] closed before connect conn=dcdad4a8-f2ad-4448-9ff8-8a0b8cc503e0 peer=127.0.0.1:52511->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=1006 reason=n/a
18:19:02 [ws] closed before connect conn=5c527786-0d66-45c9-b6cb-e4d484a48827 peer=127.0.0.1:52510->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=1006 reason=n/a
18:19:02 [ws] closed before connect conn=60042984-6ef4-4711-8213-3576fe26e490 peer=127.0.0.1:52508->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
18:19:02 [plugins] embedded acpx runtime backend ready
18:19:03 [ws] closed before connect conn=d025304f-6243-4d4a-9315-41fb2d5bcae4 peer=127.0.0.1:52516->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
18:19:04 [ws] closed before connect conn=049c86df-e616-406f-9223-fd6ec8395181 peer=127.0.0.1:52518->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
Youβre still blocked by the pending device scope upgrade.
This line shows itβs not approved yet:
Pending (1)
26637641-69e2-4f82-ab73-3ee7c9fb4c3d
Do this first:
openclaw devices approve 26637641-69e2-4f82-ab73-3ee7c9fb4c3d
openclaw gateway restart
openclaw status --all
Two important notes:
- those
1006/1008websocket lines are mostly symptoms while connect/auth is failing - if
approvesays the request was replaced/superseded, run:
then approve the newest request ID insteadopenclaw devices list
Youβre also past the API-key issue, your earlier probe already showed OpenAI auth as ok.
If status --all still fails after approval, paste that output. That should include the real gateway error without the websocket spam.
Docs:
|
o
[openclaw] Failed to start CLI: GatewayClientRequestError: unknown requestId
at GatewayClient.handleMessage (file:///C:/Users/estro/AppData/Roaming/npm/node_modules/openclaw/dist/client-D-67f4NF.js:604:25)
at WebSocket.<anonymous> (file:///C:/Users/estro/AppData/Roaming/npm/node_modules/openclaw/dist/client-D-67f4NF.js:287:35)
at WebSocket.emit (node:events:509:28)
at Receiver.receiverOnMessage (C:\Users\estro\AppData\Roaming\npm\node_modules\openclaw\node_modules\ws\lib\websocket.js:1225:20)
at Receiver.emit (node:events:509:28)
at Receiver.dataMessage (C:\Users\estro\AppData\Roaming\npm\node_modules\openclaw\node_modules\ws\lib\receiver.js:596:14)
at Receiver.getData (C:\Users\estro\AppData\Roaming\npm\node_modules\openclaw\node_modules\ws\lib\receiver.js:496:10)
at Receiver.startLoop (C:\Users\estro\AppData\Roaming\npm\node_modules\openclaw\node_modules\ws\lib\receiver.js:167:16)
at Receiver._write (C:\Users\estro\AppData\Roaming\npm\node_modules\openclaw\node_modules\ws\lib\receiver.js:94:10)
at writeOrBuffer (node:internal/streams/writable:570:12)
That error means the request ID you tried to approve is stale.
OpenClaw replaces pending pairing requests when the device retries with changed auth details, so the old requestId becomes invalid, and you get:
GatewayClientRequestError: unknown requestId
Do this:
openclaw devices list
Then approve the new request ID it shows:
openclaw devices approve <new-request-id>
openclaw gateway restart
openclaw status
One small gotcha:
openclaw devices approve --latest
only previews the latest request, it does not approve it. You still need the exact ID.
Also, your OpenAI API key is already working from the earlier probe, so this is now just a device-pairing/scope issue, not an API-key issue.
Docs:
- https://docs.openclaw.ai/cli/devices
- https://docs.openclaw.ai/gateway/troubleshooting
- https://docs.openclaw.ai/help/faq
If devices list shows a new pending ID, paste that table and Iβll tell you exactly which command to run.
OpenClaw status --all
Overview
+-----------------+----------------------------------------------------------------------------------------------------+
| Item | Value |
+-----------------+----------------------------------------------------------------------------------------------------+
| Version | 2026.4.21 |
| OS | windows 10.0.26200 (x64) |
| Node | 24.15.0 |
| Config | ~.openclaw\openclaw.json |
| Dashboard | http://127.0.0.1:18789/ |
| Tailscale | off |
| Channel | stable (default) |
| Update | pnpm Β· npm update 2026.4.22 |
| Gateway | local Β· ws://127.0.0.1:18789 (local loopback) Β· reachable 37ms Β· auth token Β· Knee-Gear (10.34. |
| | 235.60) app 2026.4.21 windows 10.0.26200 |
| Security | Run: openclaw security audit --deep |
| Gateway self | unknown |
| Gateway service | Scheduled Task installed Β· registered Β· running |
| Node service | Scheduled Task not installed |
| Agents | 1 total Β· 1 bootstrapping Β· 0 active Β· 1 sessions |
| Secrets | none |
Channels
| Channel | Enabled | State | Detail |
+----------+---------+--------+----------------------------------------------------------------------------------------+
+----------+---------+--------+----------------------------------------------------------------------------------------+
Agents
+------------+----------------+----------+----------+------------------------------------------------------------------+
| Agent | Bootstrap file | Sessions | Active | Store |
+------------+----------------+----------+----------+------------------------------------------------------------------+
| main | PRESENT | 1 | 44m ago | ~.openclaw\agents\main\sessions\sessions.json |
+------------+----------------+----------+----------+------------------------------------------------------------------+
Diagnosis (read-only)
Gateway connection details:
Gateway target: ws://127.0.0.1:18789
Source: local loopback
Config: C:\Users\estro.openclaw\openclaw.json
Bind: loopback
β Config: C:\Users\estro.openclaw\openclaw.json
β Secret diagnostics (0)
β Restart sentinel: none
! Port 18789
Port 18789 is already in use.
- pid 4408: node.exe (127.0.0.1:18789)
- Another process is listening on this port.
! Tailscale: off Β· unknown
β Skills: 6 eligible Β· 0 missing Β· C:\Users\estro.openclaw\workspace
β Plugin compatibility (none)
β Channel issues (none)
Pasteable debug report. Auth tokens redacted.
Troubleshooting: https://docs.openclaw.ai/troubleshooting
o
I think we finally have the real blocker.
Your status says:
- gateway is reachable
- port
18789being in use is probably just OpenClaw itself - your OpenAI key already probed ok
- but the only weird thing left is this:
Agents: 1 total Β· 1 bootstrapping Β· 0 active
Bootstrap file: PRESENT
That usually means the agent is stuck in first-run bootstrap because BOOTSTRAP.md is still sitting in the workspace.
Try this
Open this folder in File Explorer:
C:\Users\estro\.openclaw\workspace
If you see:
BOOTSTRAP.md
rename it to:
BOOTSTRAP.md.bak
Then run:
openclaw gateway restart
openclaw status --all
Then try chatting with OpenClaw again.
Why
Docs say BOOTSTRAP.md is supposed to be removed after first-run bootstrap finishes. If it stays there, the agent can stay stuck in bootstrapping instead of becoming active.
Docs:
Also, once youβre unstuck, Iβd update from 2026.4.21 to 2026.4.22, since youβre one version behind.
If you want, paste the contents of C:\Users\estro\.openclaw\workspace and Iβll sanity check it.
OpenClaw status --all
Overview
| Item | Value |
| Version | 2026.4.21
| OS | windows 10.0.26200 (x64)
| Node | 24.15.0
| Config | ~.openclaw\openclaw.json
| Dashboard | http://127.0.0.1:18789/
| Tailscale | off
| Channel | stable (default)
| Update | pnpm Β· npm update 2026.4.22
| Gateway | local Β· ws://127.0.0.1:18789 (local loopback) Β· reachable 40ms Β· auth token Β· Knee-Gear (10.34. |
| | 235.60) app 2026.4.21 windows 10.0.26200
| Security | Run: openclaw security audit --deep
| Gateway self | unknown
| Gateway service | Scheduled Task installed Β· registered Β· running
| Node service | Scheduled Task not installed
| Agents | 1 total Β· 0 bootstrapping Β· 0 active Β· 1 sessions
| Secrets | none
Channels
| Channel | Enabled | State | Detail
Agents
| Agent | Bootstrap file | Sessions | Active | Store
| main | ABSENT | 1 | 54m ago | ~.openclaw\agents\main\sessions\sessions.json
Diagnosis (read-only)
Gateway connection details:
Gateway target: ws://127.0.0.1:18789
Source: local loopback
Config: C:\Users\estro.openclaw\openclaw.json
Bind: loopback
β Config: C:\Users\estro.openclaw\openclaw.json
β Secret diagnostics (0)
β Restart sentinel: none
! Port 18789
Port 18789 is already in use.
- pid 25220: node.exe (127.0.0.1:18789)
- Another process is listening on this port.
! Tailscale: off Β· unknown
β Skills: 6 eligible Β· 0 missing Β· C:\Users\estro.openclaw\workspace
β Plugin compatibility (none)
β Channel issues (none)
Pasteable debug report. Auth tokens redacted.
Troubleshooting: https://docs.openclaw.ai/troubleshooting
Nice, this looks a lot healthier now.
What your status says:
- OpenClaw is running
- bootstrap is no longer stuck (
0 bootstrapping) - port 18789 being in use is normal here, that is probably your running gateway
- your API key is already fixed from the earlier successful OpenAI probe
So at this point I would stop changing the API key.
Next step
Start a fresh chat session, because the old one is probably stale:
/new
Send that as a standalone message in the dashboard/chat.
0 active is also fine when idle, it just means nothing is currently mid-run.
If /new still fails
You are one patch behind, and youβve hit a bunch of pairing/session weirdness, so Iβd update next:
openclaw update
openclaw gateway restart
Docs: