#Open claw API key swap issue

1 messages · Page 1 of 1 (latest)

amber kindleBOT
#

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

winter anvil
#

It says this on discord:

⚠️ Agent failed before reply: Unknown model: anthropic/claude-4.6-opus.
Logs: openclaw logs --follow

#

[diagnostic] lane task error: lane=cron durationMs=2 error="Error: Unknown model: anthropic/claude-4.6-opus"
20:32:47 [diagnostic] lane task error: lane=session:agent:main:cron:7463640b-ed3d-42df-b279-532c6ddcd893 durationMs=4 error="Error: Unknown model: anthropic/claude-4.6-opus"
20:32:47 [ws] webchat connected conn=a930eb53-7e34-4f1b-a5c5-1cd0d47c21df remote=127.0.0.1 client=openclaw-control-ui webchat vdev
20:32:49 [discord] [default] Discord Message Content Intent is limited; bots under 100 servers can use it without verification.
20:32:49 [discord] [default] starting provider (@Axiom OC Bot)
20:32:49 [discord] channels unresolved: 1470713152227250218/1470713153246728266, 1470713152227250218/1470713286335926272
20:32:50 [discord] logged in to discord as 1471771799854518417
20:33:11 [diagnostic] lane task error: lane=main durationMs=1 error="Error: Unknown model: anthropic/claude-4.6-opus"
20:33:11 [diagnostic] lane task error: lane=session:agent:main:main durationMs=3 error="Error: Unknown model: anthropic/claude-4.6-opus"
14:33:11 Embedded agent failed before reply: Unknown model: anthropic/claude-4.6-opus

Then says this on powershell

sinful crestBOT
#

Most “swapped OpenAI key → Claude” startup breaks boil down to (a) Anthropic creds not actually loaded by the Gateway process or (b) the default/fallback model still points at a provider you no longer have creds for.

Can you paste:

  1. openclaw --version
  2. the exact startup error (full stack/log line)
  3. openclaw status --all (it’s designed to be safe to share; tokens get redacted)
  4. openclaw models status

While you grab that, here’s the quick fix checklist that usually resolves it:

1) Confirm Anthropic auth is present on the gateway host

If you run the Gateway via a service (systemd/launchd), it often does not inherit your shell env vars. So setting ANTHROPIC_API_KEY in your terminal won’t help unless the service imports it.

Options:

  • Put ANTHROPIC_API_KEY=... into ~/.openclaw/.env (on the gateway machine), then:
    • openclaw gateway restart
#
  • Or use the built-in auth storage:
    • openclaw models auth add (or openclaw models auth setup-token if you’re using a Claude subscription setup-token)

2) Make sure your selected model name is a real OpenClaw model ref

OpenClaw expects model refs like provider/model (no spaces). If you set something like “claude 4.6 opus” in config, that’ll fail.

Use:

  • openclaw models list (see what model IDs OpenClaw recognizes)
  • openclaw models set <model-or-alias> (set it to something from the list)

3) Check fallbacks aren’t still pointing at OpenAI (or other providers)

Even if your primary model is Anthropic, a fallback can trigger “No API key found…” errors.

openclaw models status will show the resolved primary + fallbacks and which providers are authenticated.

If you paste the outputs above, I can tell you exactly which of these you’re hitting and what one line to change.

#

That error is purely model name / model registry — OpenClaw doesn’t recognize anthropic/claude-4.6-opus as a valid model ID, so the agent dies before it can reply (and you see it in lane=main / lane=cron too).

Fix

On the machine running the Gateway, run:

openclaw --version
openclaw models list

Pick the Anthropic Opus model exactly as it appears in that list, then set it:

openclaw models set <paste-the-exact-model-id-from-models-list>
openclaw gateway restart
#

Notes:

  • The naming is usually not claude-4.6-opus (that “4.6” format is what’s tripping you up). It’s typically more like ...-opus-4-6 (order + dashes matter).
  • If openclaw models list doesn’t show the Opus 4.6-style model at all, you’re probably on an older OpenClaw version that doesn’t know about it yet → paste your openclaw --version and we’ll tell you the least-painful path (update vs pick a different available model).

If you paste the output of openclaw --version + the one line from openclaw models list you want to use, I can tell you the exact openclaw models set ... command.

winter anvil
#

It said this when i tried running those commands
PS C:\Users\openclaw-agent.openclaw> openclaw --version
openclaw : The term 'openclaw' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1

  • openclaw --version
  •   + CategoryInfo          : ObjectNotFound: (openclaw:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
    
    

PS C:\Users\openclaw-agent.openclaw> openclaw models list
openclaw : The term 'openclaw' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1

  • openclaw models list
  •   + CategoryInfo          : ObjectNotFound: (openclaw:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
    
    

PS C:\Users\openclaw-agent.openclaw>

#

I think i might be on an old openclaw version

sinful crestBOT
#

You’ve got two separate issues now:

  1. The agent error: Unknown model: anthropic/claude-4.6-opus
  2. Your CLI isn’t on PATH: openclaw : The term 'openclaw' is not recognized…

Let’s fix the CLI first, then set the model.

1) Get openclaw working in PowerShell (PATH)

Run this in PowerShell:

npm -v
npm bin -g

npm bin -g prints the folder where global commands (like openclaw.cmd) live (often something like C:\Users\<you>\AppData\Roaming\npm).

#
  • Add that exact folder to your PATH
  • Close all PowerShell windows
  • Re-open PowerShell
  • Verify:
where openclaw
openclaw --version

This is the FAQ item here: https://docs.openclaw.ai/help/faq#windows-install-says-git-not-found-or-openclaw-not-recognized

If you installed OpenClaw in WSL2

Then openclaw will not exist in Windows PowerShell; you must run it inside WSL (Ubuntu terminal). (Windows support is recommended via WSL2): https://docs.openclaw.ai/platforms/windows

2) Fix the “unknown model” immediately

Once openclaw runs, the fastest unbrick is to switch to the built-in shorthand alias:

#
openclaw models set opus
openclaw gateway restart

(opus is a built-in shortcut; your anthropic/claude-4.6-opus string is just not a valid model ID in OpenClaw.)

3) If it still doesn’t start, paste these outputs

After you do the above, paste:

openclaw --version
openclaw models status

and we’ll get you fully stable.

#

Yeah, that’s very possible — but there are two separate things going on:

  1. Your Gateway is trying to use a model ID that OpenClaw doesn’t recognize:
    anthropic/claude-4.6-opus (that string is not a valid OpenClaw model ref)

  2. On your Windows PowerShell, openclaw isn’t even available (CommandNotFound), so you can’t easily check version / switch models from the CLI yet.

Step 1: Figure out what version you’re actually running (even without openclaw)

In PowerShell, run:

npm list -g openclaw --depth=0
node -v
npm config get prefix
  • If npm list -g openclaw shows nothing, you probably installed/running OpenClaw inside WSL2, and Windows PowerShell won’t have the openclaw command.
#
where openclaw
openclaw --version

If you’re actually using WSL2, do this in Ubuntu instead (Windows install is recommended via WSL2):
https://docs.openclaw.ai/platforms/windows

Step 3: Unbreak the “unknown model” immediately

Once openclaw works (PowerShell or WSL), run:

openclaw models set opus
openclaw gateway restart

That uses the built-in opus shortcut (instead of the invalid anthropic/claude-4.6-opus string).

#

Paste the output of npm list -g openclaw --depth=0 (and tell me if you’re using WSL2), and I’ll tell you the exact “update to latest” command for your install method.

winter anvil
#

PS C:\Users\openclaw-agent.openclaw> npm list -g openclaw --depth=0
C:\Users\openclaw-agent\AppData\Roaming\npm
`-- openclaw@2026.2.12

PS C:\Users\openclaw-agent.openclaw>

this was the output

sinful crestBOT
#

Yep — openclaw@2026.2.12 is old enough that it likely doesn’t know the newer Claude model IDs, so anthropic/claude-4.6-opus will hard-fail at startup.

1) Update OpenClaw (Windows / npm install)

In PowerShell:

npm i -g openclaw@latest
# (or, if you want beta)
# npm i -g openclaw@beta

Then open a new PowerShell window and check:

openclaw --version
#

2) If openclaw still isn’t recognized, it’s just PATH

Your global npm bin folder is typically:

$env:APPDATA\npm

Quick checks:

dir "$env:APPDATA\npm\openclaw*"

If you see openclaw.cmd, you can run it directly even before fixing PATH:

& "$env:APPDATA\npm\openclaw.cmd" --version
#

(And then add $env:APPDATA\npm to PATH permanently.)

3) Fix the model name

After updating, don’t use anthropic/claude-4.6-opus. Use the model ID OpenClaw expects:

  • easiest:
    openclaw models set opus
    
  • or run openclaw models list and pick the exact Anthropic Opus entry from that list.

Finally:

openclaw gateway restart
#

If you paste the new openclaw --version after the update + whether openclaw models list shows Opus, I can tell you the exact model string to set (but openclaw models set opus should be the fastest).

winter anvil
#

I ran openclaw version on another power shell this popped up :
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

Install the latest PowerShell for new features and improvements! https://aka.ms/PSWindows

PS C:\Windows\system32> openclaw --version
openclaw : The term 'openclaw' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1

  • openclaw --version
  •   + CategoryInfo          : ObjectNotFound: (openclaw:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
    
    

PS C:\Windows\system32>

for )1 this appeared after i ran the first step

PS C:\Users\openclaw-agent.openclaw> npm list -g openclaw --depth=0
C:\Users\openclaw-agent\AppData\Roaming\npm
`-- openclaw@2026.2.12

PS C:\Users\openclaw-agent.openclaw> npm i -g openclaw@latest
npm warn deprecated npmlog@6.0.2: This package is no longer supported.
npm warn deprecated are-we-there-yet@3.0.1: This package is no longer supported.
npm warn deprecated gauge@4.0.4: This package is no longer supported.
npm warn deprecated tar@6.2.1: Old versions of tar are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn deprecated node-domexception@1.0.0: Use your platform's native DOMException instead
npm warn deprecated glob@10.5.0: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me

changed 674 packages in 39s

126 packages are looking for funding
run npm fund for details
PS C:\Users\openclaw-agent.openclaw>

sinful crestBOT
#

Those npm warnings are fine — the important part is that the update did run (“changed 674 packages”).

What’s happening now is simply: the openclaw executable isn’t on PATH in that other PowerShell window (the one in C:\Windows\system32>). On Windows, the global npm binaries usually live in:

C:\Users\<you>\AppData\Roaming\npm

1) Confirm you actually updated OpenClaw

In the same PowerShell where you ran npm i -g openclaw@latest, run:

npm list -g openclaw --depth=0

You should see a version newer than 2026.2.12 now. Paste that line.

2) Find the actual OpenClaw command and run it directly (no PATH needed)

Run:

#
dir "$env:APPDATA\npm\openclaw*"

If you see openclaw.cmd, run:

& "$env:APPDATA\npm\openclaw.cmd" --version

3) Unbreak the model config (fixes the Discord “Unknown model” crash)

Once the command above works, run:

& "$env:APPDATA\npm\openclaw.cmd" models set opus
& "$env:APPDATA\npm\openclaw.cmd" gateway restart
#

That avoids the invalid anthropic/claude-4.6-opus string and uses the built-in alias (opus → anthropic/claude-opus-4-6).

4) Fix it permanently (PATH)

If you want openclaw to work in any PowerShell window, add this to your user PATH:

%APPDATA%\npm

Then close/reopen PowerShell and openclaw --version should work.

If you paste the output of:

  • npm list -g openclaw --depth=0 (after the update)
  • dir "$env:APPDATA\npm\openclaw*"

…I’ll tell you exactly which step you’re stuck on.

winter anvil
#

Alright i did all this

PS C:\Users\openclaw-agent.openclaw> npm list -g openclaw --depth=0
C:\Users\openclaw-agent\AppData\Roaming\npm
`-- openclaw@2026.2.13

PS C:\Users\openclaw-agent.openclaw> dir "$env:APPDATA\npm\openclaw*"

Directory: C:\Users\openclaw-agent\AppData\Roaming\npm

Mode LastWriteTime Length Name


-a---- 2/14/2026 2:49 PM 411 openclaw
-a---- 2/14/2026 2:49 PM 336 openclaw.cmd
-a---- 2/14/2026 2:49 PM 849 openclaw.ps1

PS C:\Users\openclaw-agent.openclaw> & "$env:APPDATA\npm\openclaw.cmd" --version
2026.2.13
PS C:\Users\openclaw-agent.openclaw> & "$env:APPDATA\npm\openclaw.cmd" models set opus

🦞 OpenClaw 2026.2.13 (203b5bd) — Chat APIs that don't require a Senate hearing.

Config overwrite: C:\Users\openclaw-agent.openclaw\openclaw.json (sha256 5b8c9b7c25371de71d94cae30f93fd974e563e4f11716866b9d6126b91342615 -> 8cf8c77c90dcf507f12e0d2c4a3a3efad4d5d3f3fce4aba8f540954e0dc1aa94, backup=C:\Users\openclaw-agent.openclaw\openclaw.json.bak)
Updated ~.openclaw\openclaw.json
Default model: anthropic/opus
PS C:\Users\openclaw-agent.openclaw> & "$env:APPDATA\npm\openclaw.cmd" gateway restart

🦞 OpenClaw 2026.2.13 (203b5bd) — Gateway online—please keep hands, feet, and appendages inside the shell at all times.

Gateway service missing.
Start with: openclaw gateway install
Start with: openclaw gateway
Start with: schtasks /Run /TN "OpenClaw Gateway"
PS C:\Users\openclaw-agent.openclaw>

am i good or whats next

sinful crestBOT
#

You’re good on the model side now:

  • You updated to 2026.2.13
  • You switched away from the invalid anthropic/claude-4.6-opus
  • Default model is now set (so the “Unknown model …” crash should stop)

What’s left is just the Gateway service part.

What that “Gateway service missing” means

openclaw gateway restart tries to restart the installed background service (on Windows that’s typically a Scheduled Task). You don’t have that installed yet, so it can’t “restart” it.

Next step (pick one)

Option A — Run the Gateway in the foreground (quickest)

In the same PowerShell:

#
& "$env:APPDATA\npm\openclaw.cmd" gateway

Keep that window open. Then test in Discord (send a message). Also useful:

& "$env:APPDATA\npm\openclaw.cmd" status
& "$env:APPDATA\npm\openclaw.cmd" logs --follow

Option B — Install the background service (what you want long-term)

& "$env:APPDATA\npm\openclaw.cmd" gateway install

Then you can start it with either:

#
& "$env:APPDATA\npm\openclaw.cmd" gateway restart

or the Windows task command it suggested:

schtasks /Run /TN "OpenClaw Gateway"

Optional but recommended: fix your PATH

So you can type openclaw anywhere (like in C:\Windows\system32), add this to your user PATH:

%APPDATA%\npm

Then open a fresh PowerShell and openclaw --version should work.

#

If you tell me whether you want Option A (foreground) or Option B (service), I can give you the exact “verify it’s running” command sequence for that path.

If this fixed it, please mark the solution message (right-click → Apps → ✅ Mark Solution) so Answer Overflow indexes it.

winter anvil
#

Ok prob option B

sinful crestBOT
#

Cool — option B is the right call if you want it always-on.

Run this in PowerShell:

& "$env:APPDATA\npm\openclaw.cmd" gateway install

Then start/restart it:

& "$env:APPDATA\npm\openclaw.cmd" gateway restart

Verify it’s actually up:

#
& "$env:APPDATA\npm\openclaw.cmd" gateway status
& "$env:APPDATA\npm\openclaw.cmd" status

And if Discord still doesn’t reply, tail logs while sending a test message:

& "$env:APPDATA\npm\openclaw.cmd" logs --follow

If gateway install errors (permissions / schtasks), paste that output and we’ll fix it quickly.

(And once it’s working: right-click the solution message → Apps → ✅ Mark Solution so Answer Overflow indexes it.)

winter anvil
#

Should i restart as admin it said this

PS C:\Users\openclaw-agent.openclaw> & "$env:APPDATA\npm\openclaw.cmd" gateway install

🦞 OpenClaw 2026.2.13 (203b5bd) — Say "stop" and I'll stop—say "ship" and we'll both learn a lesson.

Gateway install failed: Error: schtasks create failed: ERROR: Access is denied.
Run PowerShell as Administrator or rerun without installing the daemon.
PS C:\Users\openclaw-agent.openclaw>

sinful crestBOT
#

Yep — for the Windows “service” install (it uses Task Scheduler / schtasks), you need Administrator.

Do this:

  1. Close that window.
  2. Open PowerShell → Run as Administrator.
  3. Run:
& "$env:APPDATA\npm\openclaw.cmd" gateway install
& "$env:APPDATA\npm\openclaw.cmd" gateway restart
& "$env:APPDATA\npm\openclaw.cmd" gateway status

If you don’t want to run as admin, your fallback is Option A (run openclaw gateway in a normal terminal and keep it open), but for “always on”, admin + scheduled task is the right route.

Once it installs successfully, you should be able to start it anytime with:

#
schtasks /Run /TN "OpenClaw Gateway"
winter anvil
#

Install the latest PowerShell for new features and improvements! https://aka.ms/PSWindows

PS C:\Windows\system32> & "$env:APPDATA\npm\openclaw.cmd" gateway install
& : The term 'C:\Users\emirg\AppData\Roaming\npm\openclaw.cmd' is not recognized as the name of a cmdlet, function,
script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is
correct and try again.
At line:1 char:3

  • & "$env:APPDATA\npm\openclaw.cmd" gateway install
  • + CategoryInfo          : ObjectNotFound: (C:\Users\emirg\...pm\openclaw.cmd:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
    
    

PS C:\Windows\system32>
'

sinful crestBOT
#

That failure is just your command getting split across lines and (probably) you’re running the Admin shell as a different Windows user (emirg vs openclaw-agent).

1) In the Admin PowerShell, first check which user you are

whoami
$env:APPDATA

If that shows C:\Users\emirg\... then you’re not running as openclaw-agent, and you’ll be looking in the wrong npm global bin folder.

2) Run it without line-break issues (recommended)

Copy/paste these exactly (single block):

$oc = Join-Path $env:APPDATA "npm\openclaw.cmd"
$oc
#
Test-Path $oc
& $oc --version
& $oc gateway install

3) If Test-Path $oc is False

You’re in the wrong user profile. Two options:

Option A (best): open an Administrator PowerShell as the same user that has the OpenClaw config (openclaw-agent). Then rerun step (2).

Option B (quick try): call the path from the user that actually has OpenClaw installed:

& "C:\Users\openclaw-agent\AppData\Roaming\npm\openclaw.cmd" gateway install

After install succeeds, you can:

#
& $oc gateway restart
& $oc gateway status
winter anvil
#

That worked but gateway didnt work

PS C:\Windows\system32> & "C:\Users\openclaw-agent\AppData\Roaming\npm\openclaw.cmd" gateway install

🦞 OpenClaw 2026.2.13 (203b5bd) — Your AI assistant, now without the $3,499 headset.

No gateway token found. Auto-generated one and saving to config.

Installed Scheduled Task: OpenClaw Gateway
Task script: C:\Users\emirg.openclaw\gateway.cmd
PS C:\Windows\system32> & $oc gateway restart

& $oc gateway status
& : The term 'C:\Users\emirg\AppData\Roaming\npm\openclaw.cmd' is not recognized as the name of a cmdlet, function,
script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is
correct and try again.
At line:1 char:3

  • & $oc gateway restart
  • + CategoryInfo          : ObjectNotFound: (C:\Users\emirg\...pm\openclaw.cmd:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
    
    

& : The term 'C:\Users\emirg\AppData\Roaming\npm\openclaw.cmd' is not recognized as the name of a cmdlet, function,
script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is
correct and try again.
At line:2 char:3

  • & $oc gateway status
  • + CategoryInfo          : ObjectNotFound: (C:\Users\emirg\...pm\openclaw.cmd:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
    
    

PS C:\Windows\system32> & $oc gateway restart
& : The term 'C:\Users\emirg\AppData\Roaming\npm\openclaw.cmd' is not recognized as the name of a cmdlet, function,
script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is
correct and try again.
At line:1 char:3

  • & $oc gateway restart
  • + CategoryInfo          : ObjectNotFound: (C:\Users\emirg\...pm\openclaw.cmd:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
sinful crestBOT
#

You’re very close — the install actually succeeded. Two things bit you:

  1. You ran the Admin shell as user emirg, so the installer wrote the task script to that user’s state dir:
    Task script: C:\Users\emirg\.openclaw\gateway.cmd

…but all your real config/model changes were under:
C:\Users\openclaw-agent\.openclaw\...

  1. In the admin shell you then ran & $oc ... but $oc wasn’t set in that window, so PowerShell tried to run a non-existent path and failed.

Fix: reinstall the Scheduled Task, but force it to use the openclaw-agent state dir

Open PowerShell as Administrator and paste this as one block:

$oc = "C:\Users\openclaw-agent\AppData\Roaming\npm\openclaw.cmd"
$env:OPENCLAW_STATE_DIR  = "C:\Users\openclaw-agent\.openclaw"
#
$env:OPENCLAW_CONFIG_PATH = Join-Path $env:OPENCLAW_STATE_DIR "openclaw.json"

& $oc gateway install --force
& $oc gateway restart
& $oc gateway status

After that, the “Task script:” line should point at C:\Users\openclaw-agent\.openclaw\gateway.cmd (not emirg).

If it still won’t start

Run:

schtasks /Query /TN "OpenClaw Gateway" /V /FO LIST
& $oc logs --follow
#

…and paste the gateway status output + the first error you see in the log tail.

(Also: your path in Discord shows a line break between Roaming and npm — make sure the command path is on one line, like in the block above.)

winter anvil
#

PS C:\Windows\system32> $oc = "C:\Users\openclaw-agent\AppData\Roaming\npm\openclaw.cmd"

$env:OPENCLAW_STATE_DIR = "C:\Users\openclaw-agent.openclaw"
PS C:\Windows\system32> $env:OPENCLAW_CONFIG_PATH = Join-Path $env:OPENCLAW_STATE_DIR "openclaw.json"

& $oc gateway install --force
& $oc gateway restart
& $oc gateway status

🦞 OpenClaw 2026.2.13 (203b5bd) — Claws out, commit in—let's ship something mildly responsible.

Gateway service already registered.
Reinstall with: openclaw gateway install --force

🦞 OpenClaw 2026.2.13 (203b5bd) — Shell yeah—I'm here to pinch the toil and leave you the glory.

Restarted Scheduled Task: OpenClaw Gateway

🦞 OpenClaw 2026.2.13 (203b5bd) — Shell yeah—I'm here to pinch the toil and leave you the glory.

(node:16664) [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)
|
o
Service: Scheduled Task (registered)
File logs: ~\AppData\Local\Temp\openclaw\openclaw-2026-02-14.log
Command: C:\Program Files\nodejs\node.exe C:\Users\openclaw-agent\AppData\Roaming\npm\node_modules\openclaw\dist\index.js gateway --port 18789
Service env: OPENCLAW_GATEWAY_PORT=18789

Config (cli): C:\Users\openclaw-agent.openclaw\openclaw.json
Config (service): C:\Users\openclaw-agent.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: stopped (state Ready, last run time 2/14/2026 3:06:28 PM)
RPC probe: failed
RPC target: ws://127.0.0.1:18789
gateway closed (1006 abnormal closure (no close frame)): no close reason

sinful crestBOT
#

Nice — that output means the service wiring is correct now (Config cli/service both point at C:\Users\openclaw-agent\.openclaw\openclaw.json), but the Gateway process is crashing immediately, so the Scheduled Task ends up:

  • Runtime: stopped
  • RPC probe: failed (1006) (because nothing is listening anymore)

Next step is: look at the file log for the actual crash reason.

1) Tail the Gateway log while you start the task

In your elevated (Admin) PowerShell, run:

$oc = 'C:\Users\openclaw-agent\AppData\Roaming\npm\openclaw.cmd'
& $oc logs --follow

Leave that running.

#

Open a second PowerShell (Admin or normal) and run:

schtasks /Run /TN "OpenClaw Gateway"

Wait ~5–10 seconds. The first window should print the startup + the error. Paste the first error/stack trace you see.

2) Also paste the Scheduled Task “Last Run Result”

This often shows a helpful Windows error code:

schtasks /Query /TN "OpenClaw Gateway" /V /FO LIST

Copy/paste:

  • Last Run Result
#
  • Task To Run
  • Run As User

3) Quick sanity check: does the gateway run in the foreground?

This bypasses Task Scheduler and will show the crash immediately:

& $oc gateway run --verbose

Paste whatever error it prints.

Once we see the log error, it’s usually one of:

  • still an unknown model string somewhere (old config / fallback)
  • missing Anthropic auth
  • a bad config parse after edits
  • or a channel plugin error on startup
#

Send the log snippet and we’ll pin it down fast.

winter anvil
#

I mean nothing happened

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

Install the latest PowerShell for new features and improvements! https://aka.ms/PSWindows

PS C:\Windows\system32> schtasks /Run /TN "OpenClaw Gateway"
SUCCESS: Attempted to run the scheduled task "OpenClaw Gateway".
PS C:\Windows\system32>

#

Hello?

winter anvil
#

Are u working now

sinful crestBOT
#

Not yet — based on the openclaw gateway status you pasted, the Gateway is stopping immediately:

  • Runtime: stopped
  • RPC probe: failed (1006)

So the Discord bot won’t reply until we catch the crash reason.

Run these and paste the first real error line you see:

$oc = 'C:\Users\openclaw-agent\AppData\Roaming\npm\openclaw.cmd'

# 1) Watch logs
& $oc logs --follow

In a second PowerShell window:

#
schtasks /Run /TN "OpenClaw Gateway"

Also paste this (shows “Last Run Result”):

schtasks /Query /TN "OpenClaw Gateway" /V /FO LIST

Once we have the log error + last run result, we can fix the actual cause in one step.

winter anvil
#

Wait let me give u a recent update

i tried running the setup again and it seems to be working now but when i talk to the bot it does this

HTTP 429: rate_limit_error: This request would exceed your organization's rate limit of 30,000 input tokens per minute (org: 35b13238-edc7-4186-9ea3-a48762e3f030, model: claude-opus-4-6). For details, refer to: https://docs.claude.com/en/api/rate-limits. You can see the response headers for current usage. Please reduce the prompt length or the maximum tokens requested, or try again later. You may also contact sales at https://www.anthropic.com/contact-sales to discuss your options for a rate limit increase. (request_id: req_011CY8fq2rEtDp8cYihTDVGm)

and i do have api credits i have $19.59 so t hats weird

sinful crestBOT
#

That’s actually consistent: credits ≠ rate limit.

Anthropic can happily let you have $19.59 balance, but still cap your org at 30,000 input tokens/min on claude-opus-4-6. If a single request is huge (big Discord thread context + pasted logs), it can trip that limit immediately, or you can hit it by sending a few messages quickly.

What to do:

  1. Wait ~60 seconds and try a short message (rate limits are per-minute windows).

  2. Reset the Discord session context (this is the #1 fix if you pasted logs):

  • In the Discord chat with the bot, send:
    /new
    
    Then try again with a small prompt.
  1. Switch off Opus for normal chatting (Opus hits limits faster). On your gateway host (PowerShell):