#Corruption
1 messages · Page 1 of 1 (latest)
Have you tried a fresh reinstall and removing all files?
Yes. I have. The issue persists.
Two different symptoms usually point to two different causes:
1) Replies “disappearing” (Discord)
This is very often Discord live preview streaming: the bot posts a temporary draft message and keeps editing it while generating. If something fails at the end (permissions, API error, crash), you can end up with “it was there, then it’s gone / blank”.
Quick test (recommended): disable Discord preview streaming
openclaw config set channels.discord.streaming off
openclaw gateway restart
Docs: https://docs.openclaw.ai/channels/discord#live-stream-preview
Also double-check the bot has Discord permissions for the thread/channel (especially Send Messages in Threads).
2) “Agent can’t use its tools”
Most common causes:
- Tool policy is restricting everything (e.g.
tools.profile: "minimal"or a too-tighttools.allow)
- Provider/model you picked is flaky with tool calling (you’ll see this clearly in logs)
What I need from you (redact tokens/keys):
- Version:
openclaw --version
- Health + channel/model state:
openclaw status
openclaw models status
openclaw channels status
- Your tool policy (this is the big one):
openclaw config get tools
openclaw config get agents.defaults.tools
openclaw config get agents.list
- Then reproduce once while tailing logs and paste the relevant error chunk:
openclaw logs --follow
Docs (log locations + commands): https://docs.openclaw.ai/help/faq#where-are-logs
If you paste those outputs + ~20 lines around the failure in the logs, I can tell you exactly whether it’s (a) tool allow/deny/profile, (b) auth/model/provider, or (c) Discord delivery/edit issues.
I continue to have the node/PID issue. Its back after the third time.
“node/PID issue” can mean a couple different things in OpenClaw-land, so I need the exact text you’re seeing (or a screenshot), plus one status dump.
1) Please paste these outputs (redact tokens)
openclaw --version
openclaw gateway status
openclaw gateway status --deep
openclaw doctor
doctor specifically checks PID/runtime, port collisions, and service config mismatches, which are the usual “it works after reinstall… then comes back” culprits. Runbook: https://docs.openclaw.ai/gateway/troubleshooting
2) Two common recurring causes (and the fixes)
A) Config/service mismatch (you edit one config but the service runs another)
You’ll see it in openclaw gateway status as Config (cli) vs Config (service) being different. Fix:
openclaw gateway install --force
openclaw gateway restart
B) Port already in use / “another gateway instance”
This is the gateway lock (it’s port-bind based, not a stale lockfile). Docs: https://docs.openclaw.ai/gateway/gateway-lock
Fix is: stop the other instance / free the port / or run on a different port.
3) If replies are still “disappearing” in Discord
That’s often live preview streaming. Disable it to stabilize output:
openclaw config set channels.discord.streaming off
openclaw gateway restart
Docs: https://docs.openclaw.ai/channels/discord#live-stream-preview
Send the gateway status --deep + doctor output and I’ll tell you exactly which bucket you’re in and the minimal fix.
The replies aren't dissappearing discord the dissappearing in the OC dashboard.
If it’s disappearing in the OpenClaw Control UI / dashboard, that’s usually not Discord—it’s almost always the Control UI losing its WebSocket stream (gateway restart / reconnect / auth/pairing) so the in-flight reply vanishes before it gets finalized into history.
A few quick checks that narrow this down fast:
1) When it “disappears”, does the Control UI show it disconnected/reconnecting?
Top bar often flips to something like “disconnected …”. If yes: this is a connection stability/auth problem, not the agent.
Most common remote-dashboard cause: opening the dashboard over plain HTTP on LAN/tailnet (http://<ip>:18789) or through a proxy that doesn’t keep WebSockets stable. Recommended: use local or HTTPS via Tailscale Serve:
openclaw gateway --tailscale serve
Then open the https://<magicdns>/ URL.
Docs: https://docs.openclaw.ai/web/control-ui
2) Is your gateway restarting (PID changing)?
Run this right after it happens and paste the output:
openclaw gateway status
openclaw gateway status --deep
If you see PID changing / crashes, that lines up with your “node/PID issue is back”.
3) Capture the real error from logs (this is the key)
Tail logs, reproduce once, then paste the error chunk:
openclaw logs --follow
Docs: https://docs.openclaw.ai/help/faq#where-are-logs
4) One more: what exactly is the “node/PID issue” text?
Please paste the exact message (even one line is enough). “node/PID issue” can mean a port conflict, a service/config mismatch, or a crash loop—each fix is different.
Once you paste gateway status --deep + the log snippet around the moment it disappears, I can tell you the precise fix (and whether it’s a port/duplicate gateway, service mismatch, or Control UI remote-auth/pairing).
- It doesn't dsiconnect.
Got it — if the Control UI stays connected, then “shows text while streaming → then it’s gone” is usually one of these:
- The run ends in error, and the UI drops the in-flight streamed bubble because there was never a finalized assistant message to commit to history.
- History bounding: the gateway refuses to return a huge transcript entry to the UI and replaces it with a placeholder (you’ll see:
[chat.history omitted: message too large]). Docs: https://docs.openclaw.ai/web/control-ui#chat-behavior
To pinpoint which one it is, can you grab one of these (whichever is easiest):
Option A (UI-only, easiest)
In the Control UI open the Logs view (live tail), reproduce once, then paste the first error stack / lines you see around that time (especially anything mentioning tools/tool policy/model/provider).
Option B (CLI)
Run this, reproduce once, then paste ~30 lines around the failure:
openclaw logs --follow
Also: quick “is it secretly restarting?” check
Even if the UI looks connected, a fast gateway restart can reconnect so quickly you don’t notice. Run this right after it happens and paste it:
openclaw gateway status --deep
If you can also paste the exact “node/PID” message text you mentioned earlier, I can tell you immediately whether this is a crash/restart loop, a port conflict (“another instance already listening”), or a tool allow/deny/profile misconfig.
Ther two issues..the deletions of responses and the tools not working. Also, agent keeps looping trying resolve a node/PID/Gateway issue. This has been going on for long time. This is the third. Reinstall doesn't resolve.
Reinstalling usually doesn’t fix this because it doesn’t wipe the thing that matters: your state dir (~/.openclaw*) + the running gateway service. So if you’ve got (a) a port/service mismatch, (b) a crash/restart loop, or (c) a tool allow/deny/profile problem, it’ll come right back after “reinstall”.
To get you unstuck, we need to catch the actual error once. These 3 symptoms are almost always linked:
- Tools not working → tool policy/auth/provider error (shows in logs)
- Replies “deleted” in Control UI → run ends in error OR history entry is omitted/truncated OR the UI is only showing in-flight stream
- Node/PID/Gateway loop → gateway/service/port conflict or something repeatedly failing and the agent keeps retrying
Please paste these 5 outputs (redact tokens)
openclaw --version
openclaw status
openclaw gateway status
openclaw gateway status --deep
openclaw doctor
Then reproduce the issue once while tailing logs and paste the first relevant error block:
openclaw logs --follow
Docs for the command ladder: https://docs.openclaw.ai/gateway/troubleshooting
Log locations: https://docs.openclaw.ai/help/faq#where-are-logs
Also: what exactly does “node/PID/Gateway issue” say?
Copy/paste the exact line(s) you see (even if it’s just one sentence). That phrase can correspond to totally different fixes (port conflict “another instance listening”, service config mismatch, node routing misconfig, etc.).
If you’re ready for a “nuke it from orbit” reset (optional)
Since this is the third reinstall: the real “start over” is:
openclaw reset --scope full --yes --non-interactive
openclaw onboard --install-daemon
Docs: https://docs.openclaw.ai/help/faq#how-do-i-completely-reset-openclaw-but-keep-it-installed
But I’d grab the doctor + logs error first—because it’ll usually reveal a 1-minute fix (service mismatch / port collision / tool policy) without wiping everything.
I've run doctor and its fix many times. I can give logs becuase of discords char limits.
Discord’s message limit is annoying, but you don’t need to paste logs inline — just attach a text file in this thread (drag & drop). That’s the fastest way to get this unstuck.
Here are the smallest “high-signal” captures to attach (and they’re usually enough to explain both “tools don’t work” and “dashboard replies disappear”):
1) Gateway/runtime (catches the node/PID/gateway loop cause)
openclaw gateway status --deep > gateway-status.txt
openclaw doctor > doctor.txt
2) Recent errors (catches tool failures + why UI text vanishes)
openclaw logs --limit 500 --json > openclaw-logs.jsonl
Then upload these 2–3 files here:
gateway-status.txt
doctor.txtopenclaw-logs.jsonl
Please redact secrets if they show up anywhere (gateway token/password, API keys). Logs usually don’t include raw tokens, but config/doctor output sometimes can.
If you really can’t upload files, paste just the error lines by filtering:
openclaw logs --limit 500 --json | grep -iE "error|GatewayLock|EADDRINUSE|tool|allow|deny|policy|unauthorized|pairing|device identity" | tail -n 80
Once I can see the actual error text, I can tell you which specific bucket you’re in (port conflict / service config mismatch / tool allowlist-denylist / provider tool-calling failure) and the exact fix.
there is no attach feature.
If this Discord/server has file uploads disabled for you, no problem — we can still do it with short, filtered snippets (or a paste link).
Option A (best): paste a link (unlisted paste)
- Generate a small log extract:
openclaw gateway status --deep
openclaw doctor
openclaw logs --limit 500 --json \
| grep -iE "error|GatewayLock|EADDRINUSE|pid|node|crash|restart|tool|allow|deny|policy|unauthorized|pairing|device identity" \
| tail -n 120
- Copy that output into an unlisted paste (dpaste/paste.rs/GitHub gist) and drop the link here.
Redact tokens/passwords/API keys if you see any.
Option B (no paste sites): split across a few Discord messages
Post in 2–4 chunks, labeled like:
gateway status --deep (part 1/1)doctor (part 1/2)logs (part 1/3),part 2/3, etc.
The minimum I need if you want it very short:
- From
openclaw gateway status --deep: the lines containing PID, Listening, Last gateway error, Config (cli/service). - From logs: the first error around the moment the dashboard reply disappears / tools fail.
Option C (Control UI only)
In the Control UI, go to Logs, set filter to errors, reproduce once, then copy/paste what it shows there (it’s usually already trimmed).
Once I see the exact “node/PID/gateway” error text + one tool-failure error, I can tell you the specific fix (port conflict vs service mismatch vs tool policy vs provider/tool-calling issue).
S C:\WINDOWS\system32> openclaw gateway status --deep
🦞 OpenClaw 2026.2.22-2 (45febec) — iMessage green bubble energy, but for everyone.
|
o
Service: Scheduled Task (registered)
File logs: \tmp\openclaw\openclaw-2026-02-24.log
Command: C:\Program Files\nodejs\node.exe C:\Users\deane\AppData\Roaming\npm\node_modules\openclaw\dist\index.js gateway --port 19829
Service env: OPENCLAW_GATEWAY_PORT=19829
Config (cli): ~.openclaw\openclaw.json
Config (service): ~.openclaw\openclaw.json
Gateway: bind=loopback (127.0.0.1), port=19829 (service args)
Probe target: ws://127.0.0.1:19829
Dashboard: http://127.0.0.1:19829/
Probe note: Loopback-only gateway; only local clients can connect.
Runtime: stopped (state Ready, last run time 2/24/2026 2:17:22 PM)
RPC probe: ok
Service is loaded but not running (likely exited immediately).
File logs: \tmp\openclaw\openclaw-2026-02-24.log
Logs: schtasks /Query /TN "OpenClaw Gateway" /V /FO LIST
Listening: 127.0.0.1:19829
Other gateway-like services detected (best effort):
- \OpenClaw Gateway (system, task: \OpenClaw Gateway, run: C:\Users\deane.openclaw\gateway.cmd)
- \OpenClaw Node (system, task: \OpenClaw Node, run: C:\Users\deane.openclaw\node.cmd)
Cleanup hint: schtasks /Delete /TN "OpenClaw Gateway" /F
Recommendation: run a single gateway per machine for most setups. One gateway supports multiple agents (see docs: /gateway#multiple-gateways-same-host).
If you need multiple gateways (e.g., a rescue bot on the same host), isolate ports + config/state (see docs: /gateway#multiple-gateways-same-host).
Troubles: run openclaw status
Troubleshooting: https://docs.openclaw.ai/troubleshooting
That gateway status --deep output is the smoking gun.
You currently have multiple gateway-ish services installed:
- The “official” service the CLI is reporting: Scheduled Task
OpenClaw Gateway→ Runtime: stopped - But at the same time it says Listening: 127.0.0.1:19829 and RPC probe: ok
- And it detected an extra system task:
\OpenClaw Gateway (system … run: C:\Users\deane\.openclaw\gateway.cmd)- plus
\OpenClaw Node
That combination almost always means: one gateway instance is already running (probably the SYSTEM task), and when the other task tries to start it exits immediately (port already taken). This also explains:
- the agent “looping” about PID/gateway,
- tools failing (you’re bouncing between instances / wrong runtime context),
- and the Control UI “responses disappearing” (runs ending in error / restart-y behavior).
Fix: remove the duplicate SYSTEM scheduled tasks, keep ONE gateway
Open an elevated terminal (Run as Administrator) and run:
schtasks /Delete /F /TN "\OpenClaw Gateway"
schtasks /Delete /F /TN "\OpenClaw Node"
:: also try these names in case your tasks were created without the leading folder
schtasks /Delete /F /TN "OpenClaw Gateway"
schtasks /Delete /F /TN "OpenClaw Node"
Now reinstall just the gateway cleanly (as your user):
openclaw gateway uninstall
openclaw gateway install --force --port 19829
openclaw gateway start
(And don’t reinstall the Node service unless you explicitly need a separate “node host” machine. Most people don’t.)
Verify (paste output)
openclaw gateway probe
openclaw gateway status --deep
If after this you still see more than one gateway in gateway probe, we’ll remove the remaining one(s). Once you’re down to a single gateway process, the “PID/gateway loop” and the disappearing replies usually stop immediately—and then we can tackle any remaining “tools not working” as a pure config/tool-policy issue.
PS C:\WINDOWS\system32> openclaw gateway status
🦞 OpenClaw 2026.2.22-2 (45febec) — Less clicking, more shipping, fewer "where did that file go" moments.
|
o
Service: Scheduled Task (registered)
File logs: \tmp\openclaw\openclaw-2026-02-24.log
Command: C:\Program Files\nodejs\node.exe C:\Users\deane\AppData\Roaming\npm\node_modules\openclaw\dist\index.js gateway --port 19829
Service env: OPENCLAW_GATEWAY_PORT=19829
Config (cli): ~.openclaw\openclaw.json
Config (service): ~.openclaw\openclaw.json
Gateway: bind=loopback (127.0.0.1), port=19829 (service args)
Probe target: ws://127.0.0.1:19829
Dashboard: http://127.0.0.1:19829/
Probe note: Loopback-only gateway; only local clients can connect.
Runtime: stopped (state Ready, last run time 2/24/2026 2:36:28 PM)
RPC probe: ok
Service is loaded but not running (likely exited immediately).
File logs: \tmp\openclaw\openclaw-2026-02-24.log
Logs: schtasks /Query /TN "OpenClaw Gateway" /V /FO LIST
Listening: 127.0.0.1:19829
Troubles: run openclaw status
Troubleshooting: https://docs.openclaw.ai/troubleshooting
PS C:\WINDOWS\system32>
This output actually tells us something very specific:
- RPC probe: ok + Listening: 127.0.0.1:19829 = there is a Gateway running and responding on that port.
- Runtime: stopped (Scheduled Task) = the Windows Scheduled Task “OpenClaw Gateway” is NOT the process that’s running (it likely tried to start, saw the port already taken, and exited immediately).
So we still have “two gateways” — not necessarily two tasks anymore, but one leftover gateway process + the scheduled task failing to own the port.
Next step: find what process is holding port 19829
Run these and paste the output (they’re short):
netstat -ano | findstr :19829
Take the PID from that, then:
tasklist /FI "PID eq <PID>"
Also paste the last ~40 log lines (usually shows EADDRINUSE / GatewayLockError):
Get-Content C:\tmp\openclaw\openclaw-2026-02-24.log -Tail 80
(If your log path is different, use the one shown by openclaw gateway status.)
What we’ll do once we see the PID
- If it’s a stray
node.exe … openclaw … gatewayprocess: we’ll stop it, then start the scheduled task cleanly (openclaw gateway start/restart). - If it’s still a second Scheduled Task running as SYSTEM: we’ll delete that task (your earlier
--deepshowed a system-level\OpenClaw Gateway).
Once the gateway/service situation is stable (single owner), we can tackle “tools not working” separately — right now it’s very likely failing because the service keeps exiting / the UI is talking to a different instance than you think.
I have two Powershell Windows open. The agent always says to run cmds in one window while the gateway is running. Neither u nor it tells me to shut a window or stop the gateway.
Two PowerShell windows being open is fine — what breaks things is having two Gateway processes, not two terminals.
On Windows you have two ways to run the Gateway:
Option 1 (recommended): Gateway as a Scheduled Task (service)
In this mode you should not also run openclaw gateway in a terminal. You can run openclaw status, openclaw logs, etc. from any window.
Right now your status shows: Service stopped but something else is listening on 19829. That “something else” needs to be stopped so the service can own the port.
Step A — find the process holding port 19829
Run:
netstat -ano | findstr :19829
You’ll see a PID at the far right.
Step B — kill that PID (the stray gateway)
tasklist /FI "PID eq <PID>"
Stop-Process -Id <PID> -Force
Step C — start/restart the actual service
openclaw gateway start
# or
openclaw gateway restart
Then re-check:
openclaw gateway status
Healthy = Runtime: running and RPC probe: ok.
Option 2: Gateway in the foreground (debug mode)
If you intentionally run:
openclaw gateway run --port 19829
then yes: keep that window open, and use another window for commands. To stop it: Ctrl+C.
If you paste the netstat -ano | findstr :19829 line here (just that one line), I can tell you exactly what PID to kill and whether it’s a stray node.exe or a SYSTEM task.
PS C:\WINDOWS\system32> netstat -ano | findstr :19829
TCP 127.0.0.1:19829 0.0.0.0:0 LISTENING 30364
TCP 127.0.0.1:19829 127.0.0.1:62263 ESTABLISHED 30364
TCP 127.0.0.1:62263 127.0.0.1:19829 ESTABLISHED 35528
TCP [::1]:19829 [::]:0 LISTENING 30364
PS C:\WINDOWS\system32>
Perfect — PID 30364 is the process that’s actually running the Gateway and blocking the Scheduled Task from starting.
Next 3 commands:
1) Identify what 30364 is
tasklist /FI "PID eq 30364"
2) Stop it (this is the stray gateway)
Stop-Process -Id 30364 -Force
3) Start the Scheduled Task gateway cleanly
openclaw gateway start
openclaw gateway status
Healthy target state:
Runtime: runningRPC probe: okListening: 127.0.0.1:19829
If tasklist shows it’s node.exe (it probably is), that confirms you were running the gateway in a terminal at some point and it didn’t shut down. Once you switch to “service mode”, don’t run openclaw gateway run manually anymore—use openclaw gateway start|stop|restart.
After this is stable, we’ll re-test “tools not working” (often fixed just by having one consistent gateway instance).
C:\WINDOWS\system32> openclaw gateway status
🦞 OpenClaw 2026.2.22-2 (45febec) — Meta wishes they shipped this fast.
|
o
Service: Scheduled Task (registered)
File logs: \tmp\openclaw\openclaw-2026-02-24.log
Command: C:\Program Files\nodejs\node.exe C:\Users\deane\AppData\Roaming\npm\node_modules\openclaw\dist\index.js gateway --port 19829
Service env: OPENCLAW_GATEWAY_PORT=19829
Config (cli): ~.openclaw\openclaw.json
Config (service): ~.openclaw\openclaw.json
Gateway: bind=loopback (127.0.0.1), port=19829 (service args)
Probe target: ws://127.0.0.1:19829
Dashboard: http://127.0.0.1:19829/
Probe note: Loopback-only gateway; only local clients can connect.
Runtime: stopped (state Ready, last run time 2/24/2026 2:49:35 PM)
RPC probe: ok
Service is loaded but not running (likely exited immediately).
File logs: \tmp\openclaw\openclaw-2026-02-24.log
Logs: schtasks /Query /TN "OpenClaw Gateway" /V /FO LIST
Listening: 127.0.0.1:19829
Troubles: run openclaw status
Troubleshooting: https://docs.openclaw.ai/troubleshooting
PS C:\WINDOWS\system32>
That status is still the same situation:
- RPC probe: ok + Listening: 127.0.0.1:19829 ⇒ a Gateway process is running and answering.
- Runtime: stopped (Scheduled Task) ⇒ the Scheduled Task is not the one running it (it likely tries to start, sees the port already taken, and exits).
So we need to stop the stray Gateway process, then start the Scheduled Task gateway.
Step 1 — find the current PID again (it may have changed)
netstat -ano | findstr :19829
Take the LISTENING PID (the rightmost number).
Step 2 — show what that PID actually is (command line)
PowerShell:
Get-CimInstance Win32_Process -Filter "ProcessId=<PID>" | Select-Object Name,ProcessId,CommandLine
Step 3 — stop it
If it’s clearly node.exe … openclaw … gateway …:
Stop-Process -Id <PID> -Force
(If that fails due to permissions, it’s probably running as SYSTEM — tell me and we’ll remove the SYSTEM task.)
Step 4 — start the real service
openclaw gateway start
openclaw gateway status
If it still shows “Runtime: stopped” after gateway start
Paste this (short) output:
schtasks /Query /TN "OpenClaw Gateway" /FO LIST /V
and also:
netstat -ano | findstr :19829
Once we have the gateway owned by one runner (either the service or foreground, but not both), the “responses disappear” + “tools not working” problems usually stop or at least become debuggable with one consistent log stream.
I think u r forcing me to start multiple gateways cuz u never tell me to stop the current one. U just keep starting new ones.
I’m not starting anything on your machine — only you (or the Windows Scheduled Task) can start/stop processes. What’s happening is:
- You currently have a Gateway process already listening on 19829 (
Listening: 127.0.0.1:19829,RPC probe: ok) - but the Scheduled Task “OpenClaw Gateway” is stopped
- so every time you try to “start the gateway”, the Scheduled Task tries, sees the port is already taken, and exits immediately → which feels like “it keeps starting new gateways”, but it’s really “the old one never got stopped”.
Let’s make this dead simple: pick ONE mode and stick to it.
Recommended: Service mode (Scheduled Task)
In this mode you should never run openclaw gateway / openclaw gateway run in a terminal.
Step 1 — find the running gateway PID on the port
netstat -ano | findstr :19829
Take the PID from the LISTENING line.
Step 2 — confirm it’s an OpenClaw gateway process
Get-CimInstance Win32_Process -Filter "ProcessId=<PID>" | Select Name,ProcessId,CommandLine
Step 3 — STOP that process (this is the important missing step)
Stop-Process -Id <PID> -Force
Step 4 — now start the Scheduled Task gateway
openclaw gateway start
openclaw gateway status
You want: Runtime: running and RPC probe: ok.
Alternative: Foreground mode (debug)
If you prefer this, do the opposite:
- uninstall/stop the Scheduled Task gateway
- run
openclaw gateway run --port 19829in ONE terminal - stop it with Ctrl+C when done
If you paste the output of Step 2 (the CommandLine for the PID that’s listening), I can tell you exactly what’s holding the port (stray terminal run vs SYSTEM task vs something else). Once we get to one gateway instance, the “tools not working” + “dashboard replies disappearing” issues usually either disappear or become easy to diagnose from a single consistent log.
What shuold I do?
Do this exact sequence. Goal: one Gateway process only, owned by the Scheduled Task.
Step 0 — decide the mode
Use Service mode (Scheduled Task). That means: don’t run openclaw gateway in a terminal anymore.
Step 1 — find the PID that’s currently listening on 19829
netstat -ano | findstr :19829
Copy the PID from the LISTENING line (rightmost number).
Step 2 — confirm it’s the OpenClaw gateway process
Get-CimInstance Win32_Process -Filter "ProcessId=<PID>" |
Select-Object Name,ProcessId,CommandLine
Step 3 — stop that process (this frees the port)
Stop-Process -Id <PID> -Force
Step 4 — start the real Gateway service
openclaw gateway start
openclaw gateway status
Success looks like: Runtime: running AND RPC probe: ok.
If Step 3 says “Access denied” or the PID immediately comes back, tell me and paste Step 2’s CommandLine output — that usually means the gateway is running as a SYSTEM scheduled task (\OpenClaw Gateway), and we’ll remove that duplicate task next.
How is gateway run outside a terminal? I thought that was required becaue the dashboard doesnt have full fx.
The Gateway is just a server process — it doesn’t need a terminal. On Windows it can run “headless” as a Scheduled Task (that’s what openclaw gateway status is showing you).
How it runs without a terminal (Windows service mode)
You install/start it like this:
openclaw gateway install # one-time (you already have this)
openclaw gateway start # starts in the background
openclaw gateway status # check it
openclaw gateway stop # stops it
openclaw gateway restart # restart it
Then you open the dashboard any time at:
http://127.0.0.1:19829/ (your port from the status output)
The dashboard is just a UI that connects to the running gateway — closing the browser does not stop the gateway.
“But the dashboard doesn’t have full functionality”
Correct — some things are still CLI-first (doctor, deeper logs, some admin tasks). That’s normal, and it works fine with the gateway running as a service. You can run CLI commands from any PowerShell window while the service is up, e.g.:
openclaw doctor
openclaw logs --follow
openclaw status
The key rule (this is what keeps biting you)
Pick one of these and don’t mix them:
- Service mode (recommended): use
openclaw gateway start/stop/restart(noopenclaw gateway runin a terminal) - Foreground debug mode: run
openclaw gateway run ...in one terminal and stop it with Ctrl+C — and don’t run the Scheduled Task gateway at the same time
Right now you’re in the “mixed” state: something is listening on :19829 while the Scheduled Task says stopped, which causes the looping/PID/port conflict behavior. Once you stick to one mode, the node/PID loop + “disappearing replies” usually stops.
now what?
Now we make it “single gateway, owned by the Scheduled Task” — then re-test tools.
1) Kill whatever is currently holding port 19829
Run:
netstat -ano | findstr :19829
Take the PID from the LISTENING line, then stop it:
Stop-Process -Id <PID> -Force
(If you’re in cmd.exe instead of PowerShell: taskkill /PID <PID> /F)
2) Start the Gateway service (Scheduled Task)
openclaw gateway start
openclaw gateway status
What you want to see:
Runtime: runningRPC probe: okListening: 127.0.0.1:19829
3) Sanity check: only one gateway is listening
netstat -ano | findstr :19829
You should see exactly one PID listening.
4) Then re-test your two original issues
- Open the dashboard:
http://127.0.0.1:19829/ - Try one tool action from chat (anything that triggers a tool)
If tools still don’t work after the gateway is stable, paste:
openclaw status
openclaw models status
openclaw config get tools
If Stop-Process gives Access denied, tell me (and paste the PID + the netstat line) — that usually means a leftover SYSTEM task is running the gateway, and we’ll remove that duplicate task next.
I don't know which PID to kill.
Use the PID from the line that says LISTENING.
Run this and paste the output:
netstat -ano | findstr :19829
You’ll get lines like:
TCP 127.0.0.1:19829 ... LISTENING 30364
In that example, the PID to kill is 30364 (the last number on the LISTENING line).
Then kill it:
Stop-Process -Id 30364 -Force
(or in cmd.exe: taskkill /PID 30364 /F)
If you paste your netstat output here, I’ll point at the exact PID number to use.
PS C:\WINDOWS\system32> netstat -ano | findstr :19829
PS C:\WINDOWS\system32>
Good news: that means nothing is listening on port 19829 right now, so there’s no PID to kill (the port is free).
Next do this:
1) Start the Gateway service (Scheduled Task)
openclaw gateway start
2) Verify it’s actually running
openclaw gateway status
netstat -ano | findstr 19829
You should now see a LISTENING line for 19829, and gateway status should show Runtime: running.
If gateway status STILL says Runtime: stopped
Then the task is starting and immediately crashing/exiting. Paste these two outputs:
schtasks /Query /TN "OpenClaw Gateway" /FO LIST /V
Get-Content C:\tmp\openclaw\openclaw-2026-02-24.log -Tail 80
(That \tmp\openclaw\... path in your status output corresponds to C:\tmp\openclaw\... on Windows.)
o
Service: Scheduled Task (registered)
File logs: \tmp\openclaw\openclaw-2026-02-24.log
Command: C:\Program Files\nodejs\node.exe C:\Users\deane\AppData\Roaming\npm\node_modules\openclaw\dist\index.js gateway --port 19829
Service env: OPENCLAW_GATEWAY_PORT=19829
Config (cli): ~.openclaw\openclaw.json
Config (service): ~.openclaw\openclaw.json
Gateway: bind=loopback (127.0.0.1), port=19829 (service args)
Probe target: ws://127.0.0.1:19829
Dashboard: http://127.0.0.1:19829/
Probe note: Loopback-only gateway; only local clients can connect.
Runtime: running (last run time 2/24/2026 3:03:18 PM)
RPC probe: ok
Listening: 127.0.0.1:19829
Troubles: run openclaw status
Nice — Gateway is now stable (Runtime: running + RPC probe: ok + Listening). That should stop the node/PID/gateway loop.
Now we tackle the two remaining issues (tools + “dashboard replies disappear”) with one controlled test.
Step 1: confirm tools aren’t being blocked by config
Run these and paste the output (redact any tokens/keys if they show up):
openclaw status
openclaw models status
openclaw config get tools
openclaw config get agents.defaults.tools
What I’m looking for:
tools.profileaccidentally set tominimal- a restrictive
tools.allow/tools.deny
- model/provider auth problems in
models status
Step 2: reproduce once while watching logs (so we catch the exact error)
- In one PowerShell window:
openclaw logs --follow
- In the dashboard (Control UI), do a small request that should require a tool, e.g.:
- “Search the web for …” (web_search)
- “Check my gateway status” (often triggers session_status / status-ish tools)
- or whatever tool you know is failing
- The moment a reply “disappears” or a tool fails, copy/paste just the error lines from the
logs --followwindow (usually 5–20 lines is enough).
Quick question (helps interpret “disappearing”)
When it disappears in the dashboard, do you ever see a placeholder like:
[chat.history omitted: message too large]
or does the message just vanish with no placeholder?
Reply with:
- the outputs from Step 1
- the first error snippet from Step 2
- and the answer to the placeholder question
From there we can do the exact fix (tool policy vs provider/tool-call failure vs Control UI history bounding).
I can't paste staus because it exceeds discord char limit. which line do u want from it
You don’t need the whole openclaw status — just the overview + any warnings/errors.
On Windows/PowerShell, run these and paste the outputs (each should fit under Discord limits):
1) Status (first ~60 lines)
openclaw status | Select-Object -First 60
2) Tool policy (this is usually the “tools not working” root cause)
openclaw config get tools
openclaw config get agents.defaults.tools
If either is too long:
openclaw config get tools | Select-Object -First 120
openclaw config get agents.defaults.tools | Select-Object -First 120
3) Log errors only (explains both “tools fail” + “dashboard reply disappears”)
openclaw logs --limit 400 --json |
Select-String -Pattern "error|warn|tool|allow|deny|policy|GatewayLock|EADDRINUSE|tool_use|schema|unauthorized" |
Select-Object -Last 80
Also answer this with yes/no: in the dashboard, when a reply “disappears”, do you ever see
[chat.history omitted: message too large]?
Even the overview to many chars for discord.
│ Tailscale │ off │
│ Channel │ stable (default) │
│ Update │ available · pnpm · npm update 2026.2.23 │
│ Gateway │ local · ws://127.0.0.1:19829 (local loopback) · reachable 102ms · auth password · dean (192.168.0.218) app 2026.2.22-2 windows 10.0.26100 │
│ Gateway service │ Scheduled Task installed · registered · running │
│ Node service │ Scheduled Task not installed
That snippet is enough — gateway is healthy now (Gateway service … running, RPC probe: ok, Listening: 127.0.0.1:19829). Good.
Because Discord is tight on chars, send me just these tiny outputs (each should be 1–3 lines):
A) Tool policy (this usually explains “tools not working”)
openclaw config get tools.profile
openclaw config get tools.allow
openclaw config get tools.deny
openclaw config get agents.defaults.tools.profile
openclaw config get agents.defaults.tools.allow
openclaw config get agents.defaults.tools.deny
B) The actual errors (this explains both tool failures + “reply disappears” in the dashboard)
- Reproduce once in the dashboard (ask it to do something that should use a tool).
- Then run:
Select-String -Path C:\tmp\openclaw\openclaw-2026-02-24.log `
-Pattern "error|GatewayLock|EADDRINUSE|not allowed|tool|allow|deny|policy|tool_use|schema" |
Select-Object -Last 30
C) Quick yes/no
When a reply “disappears” in the Control UI, do you ever see:
[chat.history omitted: message too large] ?
One more thing: your status says Update available → 2026.2.23. Once we’ve got the above, I’d update too (patch releases often fix exactly this kind of UI/tool edge case):
openclaw update
Send A + B + (C yes/no), and I can tell you the exact fix (it’s usually a restrictive tools.profile/allowlist or a specific “tool not allowed” log line).
PS C:\WINDOWS\system32> openclaw config get tools.profile
🦞 OpenClaw 2026.2.22-2 (45febec) — The only bot that stays out of your training set.
Config path not found: tools.profile
Config path not found: tools.profile is actually normal — it just means you haven’t set a tools profile explicitly, so OpenClaw is using the default (not restricting tools via that key).
Now we need to catch the actual reason tools are failing, but in a Discord-sized snippet.
1) First: check whether you have any tool restrictions at all
Run these and paste the output (each should be short — either a small block or “path not found”):
openclaw config get tools
openclaw config get agents.defaults.tools
2) Then: reproduce a tool failure once + paste the last tool-related log lines
- In the dashboard, ask it something that must use a tool (e.g. “search the web for X”).
- Immediately after it fails, run:
Get-Content C:\tmp\openclaw\openclaw-2026-02-24.log -Tail 500 |
Select-String -Pattern "tool|deny|allow|policy|Unknown tool|tool_use|schema|No credentials|unauthorized|timeout|rate_limit|error" |
Select-Object -Last 30
That output is the “money shot” — it will say things like:
- tool not allowed / policy deny
- provider/model auth missing
- schema/tool_use validation error
- etc.
3) Quick check for the “disappearing replies” part
When it disappears in the dashboard, do you ever see:
[chat.history omitted: message too large] (yes/no)
Paste (1) + (2) + (3), and we can fix the tools + disappearing replies without needing the full status dump.
PS C:\WINDOWS\system32> openclaw config get tools.profile
🦞 OpenClaw 2026.2.22-2 (45febec) — The only bot that stays out of your training set.
Config path not found: tools.profile
PS C:\WINDOWS\system32> openclaw config get tools
🦞 OpenClaw 2026.2.22-2 (45febec) — Your messages, your servers, your control.
{
"web": {
"search": {
"enabled": true,
"apiKey": "OPENCLAW_REDACTED"
}
}
}
PS C:\WINDOWS\system32>
Cool — that tools block means you did not globally disable tools. You only configured the web search tool’s API key, which is fine.
So “tools not working” is almost certainly one of these:
- the agent has a restrictive tools policy (per-agent
agents.defaults.tools/agents.list[].tools) - the model/provider request is failing (auth/rate-limit/schema), so the run errors out and the Control UI “reply” vanishes
Here are the smallest next things to paste.
1) Check per-agent tool policy (usually short)
openclaw config get agents.defaults.tools
If that’s long:
openclaw config get agents.defaults.tools | Select-Object -First 80
2) Check model/provider health (paste only error-ish lines)
openclaw models status |
Select-String -Pattern "No credentials|No API key|unauth|disabled|cooldown|unusable|rate|error" |
Select-Object -First 40
3) “Money shot”: reproduce one failure, then paste the last relevant log lines
Run right after a tool attempt fails / a reply disappears in the dashboard:
Get-Content C:\tmp\openclaw\openclaw-2026-02-24.log -Tail 400 |
Select-String -Pattern "tool|deny|allow|policy|Unknown tool|tool_use|schema|No credentials|unauthorized|timeout|rate_limit|error" |
Select-Object -Last 40
4) Quick yes/no
When it disappears in the Control UI, do you ever see:
[chat.history omitted: message too large] ?
Paste (1) + (2) + (3) + (4) and we can pin the exact fix.
One extra: your status earlier showed Update available 2026.2.23 — after we identify the error, updating is worth doing (patch releases often fix Control UI / tool-stream edge cases):
openclaw update
openclaw gateway restart
PS C:\WINDOWS\system32> openclaw config get agents.defaults.tools
🦞 OpenClaw 2026.2.22-2 (45febec) — I'm the reason your shell history looks like a hacker-movie montage.
Config path not found: agents.defaults.tools
Config path not found: agents.defaults.tools is fine — it just means you haven’t set any per-agent tool restrictions there (so it should be using the default tool policy).
That means “tools not working” is almost certainly coming from either:
- a tool policy set on a specific agent under
agents.list[...], or - the run is erroring (model/auth/tool schema/etc.) and the Control UI is only showing partial streaming before the error.
Let’s pull the smallest possible snippets.
1) What model is your agent using?
openclaw config get agents.defaults.model
2) Do you have per-agent tool restrictions in agents.list?
This prints only the lines containing tool config (so it fits Discord):
openclaw config get agents | findstr /I "tools allow deny profile byProvider sandbox"
3) Reproduce one tool failure, then paste the last 40 matching log lines
Right after it fails / the reply disappears in the dashboard:
Get-Content C:\tmp\openclaw\openclaw-2026-02-24.log -Tail 500 |
Select-String -Pattern "tool|deny|allow|policy|Unknown tool|tool_use|schema|No credentials|unauthorized|timeout|rate_limit|error" |
Select-Object -Last 40
4) Quick yes/no
When it disappears in the Control UI, do you ever see:
[chat.history omitted: message too large] ?
Paste outputs for (1), (2), (3), and your yes/no for (4). With those, we can pinpoint the exact fix (it’ll usually be an explicit deny, a provider auth error, or a tool schema/tool_use validation error in the log).
google fash lite
Yep — “Google Flash Lite” explains a lot.
Two key points:
- Tool use is model-dependent. The “lite” tiers are often the first ones to not reliably call tools (they’ll describe what they would do instead of emitting real tool calls).
- In the Control UI, when a run errors mid-stream (often provider/schema/tool-call issues), you can see text start to appear and then it “disappears” because it never got finalized into history.
Quick confirm (takes 30 seconds)
In the dashboard, when you ask “do a web search…”, do you ever see a tool card appear (web_search/web_fetch), or is it only plain text?
- No tool card ever → model isn’t calling tools (most likely with Flash Lite)
- Tool card appears then errors → tool/provider error (we need 10–20 log lines)
What to do next
- Update first (you’re on 2026.2.22-2 and status showed 2026.2.23 available):
openclaw update
openclaw gateway restart
- Temporarily switch to a non‑lite / more capable model (just for debugging tool calls).
Easiest: run the config wizard and pick a non‑lite option:
openclaw configure --section models
openclaw gateway restart
(If you want “which exact model”, ask in the #models channel — folks will give the current best picks.)
- If tools still fail after that, paste the last tool/error lines (this should fit Discord):
Get-Content C:\tmp\openclaw\openclaw-2026-02-24.log -Tail 400 |
Select-String -Pattern "tool|tool_use|schema|No credentials|unauthorized|timeout|rate_limit|error" |
Select-Object -Last 30
Reply with: (a) whether you see tool cards, and (b) that 30-line log snippet after one failed attempt.
When I say tools...I mean like to work internally...not externally.
Got it — by “tools” you mean the internal OpenClaw tools (exec/read/write/browser/nodes/message/session_status etc.), not web search.
Two things to know:
- Those internal tools still depend on the model actually emitting tool calls. If you’re on “Google Flash Lite”, it may simply not tool-call reliably (it’ll chat about what it would do, or half-call tools and error).
- Some internal tools also require you to explicitly allow them via tool policy (but your config so far doesn’t show a global deny).
Quick test (no external tools involved)
In the dashboard, ask your agent exactly this:
“Call
session_statusand tell me what it returns.”
That’s the simplest internal tool.
- If it doesn’t show a tool card for
session_status→ model isn’t tool-calling (very likely the “lite” model). - If it shows the tool card but errors → we need the log snippet.
Next steps
- Update (you have 2026.2.23 available):
openclaw update
openclaw gateway restart
- Switch off the “lite” model just for debugging internal tools:
openclaw configure --section models
openclaw gateway restart
Pick a non‑lite / more capable model.
- If it still fails, paste only the internal-tool error lines:
Get-Content C:\tmp\openclaw\openclaw-2026-02-24.log -Tail 400 |
Select-String -Pattern "session_status|exec|read|write|browser|nodes|tool|tool_use|schema|unauthorized|No credentials|error" |
Select-Object -Last 30
Reply with:
- whether you saw a
session_statustool card (yes/no) - the 30-line log snippet (if there’s an error)
That will tell us immediately if this is “model can’t tool-call” vs “policy/auth/runtime error”.
Respone:
The session_status information is returned. This shows current token usage, time, and running model, but it does NOT provide the operational status of the external OpenClaw Gateway Service.
The primary issue we are diagnosing is the Gateway service failing to start (stopped (state Ready)), which is why I cannot guarantee tool reliability or response visibility.
To confirm if the openclaw gateway start command we executed just before this request succeeded, we need the full status output again.
Please execute openclaw status one more time so we can see if the Gateway Service is now running or if it remains stopped.
Your agent’s reply is stale/misleading: your Gateway is running now (you already showed Runtime: running, RPC probe: ok, Listening: 127.0.0.1:19829). So don’t keep chasing “gateway stopped” inside the chat — that’s exactly the kind of loop a weaker model will get stuck in.
1) Prove gateway is running (paste just 3 lines)
openclaw gateway status | findstr /R "Runtime:|RPC probe:|Listening:"
2) Stop the loop: start a fresh session in the dashboard
In the Control UI chat, send:
/new
Then try a simple internal-tool prompt again (like “call session_status”). This clears the “gateway is stopped” narrative from the session context.
3) Why your tools feel broken: you’re on “google flash lite”
That model often doesn’t reliably tool-call beyond the simplest cases. If you want internal tools (exec/read/write/browser/nodes) to work consistently, switch to a more tool-reliable model (non‑lite). Easiest path:
openclaw configure --section models
openclaw gateway restart
(If you want the community’s current best pick for “tool calling + stable”, ask in #models; the exact best option changes.)
4) To fix the “responses disappear” in the dashboard: we need the error line
Right after a message disappears, run this and paste the output (it should fit Discord):
Get-Content C:\tmp\openclaw\openclaw-2026-02-24.log -Tail 400 |
Select-String -Pattern "error|tool|tool_use|schema|timeout|rate_limit|unauthorized|deny|allow|policy" |
Select-Object -Last 20
Once you paste (1) + (4), we’ll know if the dashboard is dropping the response because the run ends in a provider/tool error (most common) vs. history truncation.
My agent is still having zillion issues and has been looping for days. I need to delete every remanant of OC and reinstrall. The nodes th e PIDS all of its hiden content that uses to corrupt future installations.
If you want a true “nuke from orbit” on Windows (remove every remnant that can poison the next install), do this checklist. It’s destructive (wipes config, sessions, workspace, auth), so only do it if you’re okay re-onboarding from scratch.
0) Optional backup (only if you care)
Copy these somewhere safe first:
%USERPROFILE%\.openclaw\openclaw.json%USERPROFILE%\.openclaw\workspace\(if you want your agent files/memory)
1) Stop anything OpenClaw that’s running
In PowerShell:
openclaw gateway stop 2>$null
openclaw node stop 2>$null
If something is still listening on your gateway port (you were on 19829):
netstat -ano | findstr :19829
# take the LISTENING PID and kill it:
taskkill /PID <PID> /F
2) Delete Scheduled Tasks (this is the big “hidden corruption” source)
Run PowerShell as Administrator and delete both possible task name styles:
schtasks /Delete /F /TN "OpenClaw Gateway" 2>$null
schtasks /Delete /F /TN "\OpenClaw Gateway" 2>$null
schtasks /Delete /F /TN "OpenClaw Node" 2>$null
schtasks /Delete /F /TN "\OpenClaw Node" 2>$null
(If you want to verify what exists first: schtasks /Query | findstr /I openclaw)
3) Delete state/config/workspace directories
Remove-Item -Recurse -Force "$env:USERPROFILE\.openclaw" -ErrorAction SilentlyContinue
Remove-Item -Recurse -Force "$env:USERPROFILE\.openclaw-*" -ErrorAction SilentlyContinue
4) Uninstall the global CLI package
npm rm -g openclaw
(If you installed with pnpm instead: pnpm remove -g openclaw)
5) Reboot
This clears any stuck background node.exe processes and releases ports cleanly.
6) Reinstall + re-onboard
After reboot:
npm install -g openclaw@latest
openclaw onboard --install-daemon
Then immediately sanity check you only have one gateway:
openclaw gateway status --deep
If you paste the output of schtasks /Query | findstr /I openclaw before deleting, I can tell you exactly which tasks you have (user vs SYSTEM) so we don’t miss the “hidden” one again.
I even reblasted my laptop once. returned it to factory settings yet the issues still persist.
If it survives a full factory reset, it’s almost never “hidden corruption in OpenClaw binaries” — it’s usually one of these getting reintroduced every time:
- You’re restoring the same state/config via sync (OneDrive/backup), so the same bad files/tasks come back.
- You keep running into the same workflow trap (service gateway + manual
openclaw gateway run⇒ port/PID loops). - Your chosen model (“google flash lite”) doesn’t reliably tool-call, so “internal tools don’t work” + the agent starts looping in text.
- A workspace file is forcing bootstrapping/loops (classic: a stray
BOOTSTRAP.mdin the agent workspace).
Here’s the fastest way to confirm which one you have, without pasting huge output:
A) Check if anything is being restored (state folder)
Run:
dir $env:USERPROFILE\.openclaw* -Force
If you see .openclaw appear again right after you delete/reset, that’s a sync/restore issue (OneDrive is the usual culprit).
B) Check the “BOOTSTRAP.md keeps me stuck” problem
Run:
dir $env:USERPROFILE\.openclaw\workspace -Recurse -Filter BOOTSTRAP.md -ErrorAction SilentlyContinue
If that finds a BOOTSTRAP.md, move/delete it, then:
openclaw gateway restart
C) Stop the service-vs-terminal gateway loop forever
Pick one mode:
- Service mode: only use
openclaw gateway start|stop|restart(neveropenclaw gateway run) - Foreground mode: only
openclaw gateway run ...(and no Scheduled Task installed)
Right now, since you do have the Scheduled Task service, stick to service mode.
D) Tools reliability: switch off “flash lite” for debugging
Even if everything else is perfect, “lite” models are notorious for not tool-calling consistently. For a sanity test, switch to a non‑lite model:
openclaw configure --section models
openclaw gateway restart
(For which exact model to pick today, ask in #models — it changes.)
If you paste the output of A and B (they’re short), I can tell you immediately whether you’re fighting a restored .openclaw state / BOOTSTRAP loop vs. purely model/tool-calling issues.
I start with "openclaw gateway"
That’s the root of your PID/port chaos.
openclaw gateway starts a foreground gateway in that terminal. On Windows you also have the Scheduled Task gateway service installed. If you run both, you get exactly what you saw: one process is listening, the other says “stopped/exited immediately”, agents loop, tools get flaky, UI replies vanish mid-run, etc.
Do this from now on (pick ONE mode)
Option A (recommended): Service mode (Scheduled Task)
- Stop using
openclaw gateway/openclaw gateway runin terminals. - Control it like this instead:
openclaw gateway restart
openclaw gateway status
- Open the dashboard at the URL shown in status.
If you currently have a foreground gateway running, stop it with Ctrl+C in that terminal, then run:
openclaw gateway start
Option B: Foreground debug mode (no service)
Only if you want it attached to a terminal:
openclaw gateway uninstall
openclaw gateway run --port 19829
(stop with Ctrl+C)
One-liner rule
If openclaw gateway status says Scheduled Task installed, then you should never run openclaw gateway manually.
If you tell me which one you want (A or B), I’ll give you the exact “clean switch” steps for your current state.
I use "openclaw gateway" per my AI.
Yeah — your AI is giving you the generic dev instruction, but on your machine it’s actively hurting you because you have the Gateway Scheduled Task installed.
On Windows there are two valid ways to run OpenClaw:
A) Normal/reliable (recommended): Gateway as a service (Scheduled Task)
Use this if you want “always on” + fewer PID/port issues.
Use these commands (not openclaw gateway):
openclaw gateway start
openclaw gateway restart
openclaw gateway status
openclaw logs --follow
Dashboard stays at: http://127.0.0.1:<port>/
B) Dev/debug: Gateway in a terminal
Use this only if you do not have the service installed.
If you insist on running in a terminal, first uninstall the service so you don’t get two gateways:
openclaw gateway stop
openclaw gateway uninstall
openclaw gateway run --port 19829
(stop with Ctrl+C)
What you should do right now
Since your gateway status showed Scheduled Task installed, you should switch to Option A:
- Stop the terminal gateway (Ctrl+C in the window where you ran
openclaw gateway). - Then run:
openclaw gateway restart
openclaw gateway status
And tell your AI: “On Windows with the Scheduled Task installed, use openclaw gateway start/restart, not openclaw gateway.”
If you want, paste your openclaw gateway status after switching and we’ll verify you have exactly one gateway running.
why is the gatway scheduled task installed. what does it do? How did get installed. I didn't choose it and reisntalled recently
On Windows, OpenClaw runs the Gateway (the server that hosts the dashboard + routes messages + runs agents/tools) in the background using a Scheduled Task. That’s the Windows equivalent of a daemon/service (macOS uses launchd, Linux uses systemd).
What the “OpenClaw Gateway” Scheduled Task does
- Starts the gateway without a terminal (so it can run 24/7)
- Restarts it if it crashes
- Runs the same command you’d run manually, basically:
node ... openclaw ... gateway --port <port> - Uses a small script in your state dir (often:
C:\Users\<you>\.openclaw\gateway.cmd)
How it got installed (even if you didn’t notice)
Usually one of these:
- You ran onboarding with daemon install (common default):
openclaw onboard --install-daemon - You ran:
openclaw gateway install - Or
openclaw doctoroffered a “repair” and (re)installed/rewrote the task.
Also important: reinstalling OpenClaw does not remove the Scheduled Task. The task and ~\.openclaw\... state survive unless you explicitly uninstall/reset them.
See the task details (shows triggers + “run as” user)
schtasks /Query /TN "OpenClaw Gateway" /FO LIST /V
If you don’t want the background service
Use foreground mode only (terminal), and uninstall the task:
openclaw gateway stop
openclaw gateway uninstall
After that, you’d run it manually with:
openclaw gateway run --port 19829
If you paste the schtasks /Query ... /V output lines for “Run As User” + “Task To Run”, I can tell you whether you’ve got the normal user task or a leftover SYSTEM task from an older install.
alright...its installed and running as its intended. whats the problem?
If the Scheduled Task gateway is installed and running, the main problem is that you (and your other AI) kept starting another gateway with openclaw gateway in a terminal. That creates the exact “PID/node/gateway loop”, tool flakiness, and “responses disappear” behavior you’ve been fighting.
So the “fix” is mostly behavioral + one cleanup check:
1) Rule going forward (prevents the whole mess)
Since you’re in service mode now:
- Use only:
openclaw gateway status|restart|stop|logs - Do not run
openclaw gateway/openclaw gateway runin a terminal.
If you need to restart: openclaw gateway restart.
2) Verify you truly have only ONE gateway
Run:
openclaw gateway probe
If it shows more than one gateway reachable (or multiple ports), that’s still a problem.
Also:
schtasks /Query | findstr /I "OpenClaw"
You should not have multiple “Gateway” tasks (especially a \OpenClaw Gateway SYSTEM one).
3) The remaining two symptoms
A) “Tools not working internally”
You’re on google flash lite, which is commonly bad at tool-calling. Even with a perfect gateway, it may just not emit tool calls consistently.
Fix: switch to a more tool-reliable model (non‑lite), then restart:
openclaw configure --section models
openclaw gateway restart
B) “Dashboard replies disappear”
Now that the gateway is stable, this should either stop or the logs will clearly show why (tool/provider error). Reproduce once, then paste just the last 20 error-ish lines:
Get-Content C:\tmp\openclaw\openclaw-2026-02-24.log -Tail 300 |
Select-String -Pattern "error|tool_use|schema|timeout|rate_limit|unauthorized" |
Select-Object -Last 20
If you run (2) and tell me what gateway probe shows (one gateway or multiple) + paste the 20 log lines after a “disappearing” event, we can close the loop fully.
Reachable: yes
Probe budget: 3000ms
Discovery (this machine)
Found 0 gateways via Bonjour (local.)
Tip: if the gateway is remote, mDNS won’t cross networks; use Wide-Area Bonjour (split DNS) or SSH tunnels.
Targets
Local loopback ws://127.0.0.1:19829
Connect: ok (200ms) · RPC: ok
Gateway: dean (192.168.0.218) · windows 10.0.26100 · app 2026.2.22-2
Wide-area discovery: unknown
Great — that gateway probe output is exactly what we wanted:
- Only one gateway target:
ws://127.0.0.1:19829 Connect: okandRPC: ok
So the node/PID/gateway loop is solved. You’re back to normal.
Now the remaining issues are almost certainly:
1) “Tools not working” (internal tools)
You’re using google flash lite. That’s very likely the culprit: it often won’t reliably emit tool calls (even though the gateway/tooling is fine).
Action: switch to a more tool-reliable (non‑lite) model, then restart:
openclaw configure --section models
openclaw gateway restart
(If you’re unsure what to pick, ask in #models — the “best tool caller” changes and people there have fresh data.)
2) “Dashboard responses disappear”
Now that the gateway is stable, if this still happens it should show an error in logs. Let’s capture only the relevant lines (fits Discord):
- Reproduce once in the dashboard.
- Immediately run:
Get-Content C:\tmp\openclaw\openclaw-2026-02-24.log -Tail 300 |
Select-String -Pattern "error|tool_use|schema|timeout|rate_limit|unauthorized" |
Select-Object -Last 25
Paste those 25 lines here.
3) Update (recommended)
You had an update available. Do it now that your gateway is stable:
openclaw update
openclaw gateway restart
If you do just two things—switch off flash lite + paste the 25 log lines after a “disappearing” event—we’ll get you to a stable setup.
What is the cmd to change models not thu the config wizard
Use openclaw config set to change the default agent model directly (no wizard), then restart the gateway.
1) Set the default model
openclaw config set agents.defaults.model "<provider>/<model>"
openclaw gateway restart
Example format (you pick the model string you want):
openclaw config set agents.defaults.model "google/gemini-3-flash-preview"
openclaw gateway restart
2) Verify what it’s set to
openclaw config get agents.defaults.model
If you have multiple agents
Set a specific one by index:
openclaw config set agents.list[0].model "<provider>/<model>"
openclaw gateway restart
If you tell me what model name you want to switch to (and what provider you’re using), I can give you the exact config set line.
openrouter/google/gemini-3-flash-preview
Set it like this, then restart:
openclaw config set agents.defaults.model "openrouter/google/gemini-3-flash-preview"
openclaw gateway restart
Verify:
openclaw config get agents.defaults.model
After switching models, also do /new in the dashboard chat to clear the old “gateway/PID” loop context.
Y do I restart if its not stopped?
Because changing the model is a config change, and the running Gateway process won’t necessarily reload that change for existing sessions until it restarts.
So:
- Gateway running ≠it has picked up your new
agents.defaults.modelvalue. - Restart is the simplest way to guarantee the new model is used for the next runs.
Minimal safe sequence
openclaw config set agents.defaults.model "openrouter/google/gemini-3-flash-preview"
openclaw gateway restart
Also do this in the dashboard
Send:
/new
That starts a fresh session so you’re not stuck in the old “gateway/PID” loop context and ensures the next run uses the new model cleanly.
That cmd generated an error. I've seen it b4.
⚠️ Agent failed before reply: No API key found for provider "anthropic". Auth store: C:\Users\deane.openclaw\agents\main\agent\auth-profiles.json (agentDir: C:\Users\deane.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
That error is very specific: the Gateway is still trying to run the agent on provider anthropic, but you don’t have Anthropic credentials configured. So it fails before any reply/tools happen.
This usually happens when your configured model (or its fallbacks) still points at Anthropic.
1) Check what your default model is actually set to
openclaw config get agents.defaults.model
openclaw config get agents.defaults.model.primary
openclaw config get agents.defaults.model.fallbacks
2) Set the primary model correctly (and stop Anthropic fallbacks for now)
Use the primary field (model config is an object):
openclaw config set agents.defaults.model.primary "openrouter/google/gemini-3-flash-preview"
openclaw config set agents.defaults.model.fallbacks '[]' --strict-json
openclaw gateway restart
Then in the dashboard, do:
/new
(to clear the old looping context)
3) Make sure OpenRouter auth exists (otherwise you’ll just fail on openrouter next)
You need OPENROUTER_API_KEY on the gateway host. Easiest is C:\Users\deane\.openclaw\.env containing:
OPENROUTER_API_KEY=sk-or-...
Then:
openclaw gateway restart
OpenRouter docs: https://docs.openclaw.ai/providers/openrouter
If you paste the output of step (1), I can tell you exactly where Anthropic is still being referenced (primary vs fallbacks).
No anthropic models are in openclaw.json. They OR key is in profiles.
Even if you don’t see Anthropic in openclaw.json, OpenClaw can still end up trying it because of (a) a session-level model override, (b) a fallback chain, or (c) your “OpenRouter key is in your shell profile” but the Scheduled Task gateway can’t see it, so the OpenRouter model fails and it falls back to something else.
Two concrete things to do on Windows (service mode):
1) Make sure the Scheduled Task gateway can actually see your OpenRouter key
If your OPENROUTER_API_KEY is only in PowerShell profile / environment of one terminal, the Scheduled Task won’t inherit it.
Put it here instead:
- File:
C:\Users\deane\.openclaw\.env - Contents:
OPENROUTER_API_KEY=sk-or-...
Then:
openclaw gateway restart
(OpenRouter docs: https://docs.openclaw.ai/providers/openrouter)
2) Set the model in the right config field (and clear fallbacks for now)
OpenClaw model config is usually an object. Do this:
openclaw config set agents.defaults.model.primary "openrouter/google/gemini-3-flash-preview"
openclaw config set agents.defaults.model.fallbacks '[]' --strict-json
openclaw gateway restart
Then in the dashboard chat:
/new
3) Quick verification (paste these)
openclaw config get agents.defaults.model
openclaw models status | Select-String -Pattern "openrouter|anthropic|No API key|No credentials|unusable|cooldown|error"
If Anthropic still gets attempted after (1)+(2), it’s almost certainly a session override. In the Control UI, open Sessions and check whether that session has a pinned model override—clear it, then /new.
I just checked everything again. No refs to anthropic. Everything looks right. Error persists.
That Anthropic error can still happen even if your config doesn’t mention Anthropic, because your OpenRouter key isn’t actually available to the Gateway service (Scheduled Task), so your intended model can’t run and OpenClaw falls back / re-resolves to something else (often Anthropic defaults).
On Windows, env vars in your PowerShell profile do not get inherited by the Scheduled Task. You need the key in ~\.openclaw\.env (or stored via onboarding).
Fix (service-safe, no wizard)
1) Put the OpenRouter key where the service will read it
Create/edit this file:
C:\Users\deane\.openclaw\.env
Add:
OPENROUTER_API_KEY=sk-or-...
Then:
openclaw gateway restart
Docs: https://docs.openclaw.ai/help/faq#i-started-the-gateway-via-the-service-and-my-env-vars-disappeared-what-now
OpenRouter: https://docs.openclaw.ai/providers/openrouter
2) Set the model using the canonical “primary” field + remove fallbacks (for now)
This avoids any silent fallback to Anthropic while we’re stabilizing:
openclaw config set agents.defaults.model.primary "openrouter/google/gemini-3-flash-preview"
openclaw config set agents.defaults.model.fallbacks '[]' --strict-json
openclaw gateway restart
3) Start a fresh session (clears the old loop)
In the dashboard chat:
/new
Tiny verification (pasteable)
Please paste these two outputs:
openclaw config get agents.defaults.model
openclaw models status | Select-String -Pattern "openrouter|anthropic|No API key|No credentials"
If it still mentions Anthropic after step (1), that models status snippet will tell us exactly where it’s coming from (auth order / unusable profiles / fallback resolution).
Anthropic key is not in the registry. The file that you provided does not exist. Where is the application pulling anthropic from?
OpenClaw is not pulling an Anthropic key from the registry (it doesn’t use the Windows registry for API keys). That error means something is trying to run an Anthropic model, and OpenClaw can’t find Anthropic creds for it — even if you never intended to use Anthropic.
Why it’s trying Anthropic (most common causes)
- The active model for the session is still
anthropic/...(session override / pinned model). - Your configured model can’t run (e.g. missing OpenRouter key for the service), so it falls back to a default that happens to be Anthropic.
- You set the model in config, but not in the exact field OpenClaw is using (
agents.defaults.model.primaryvs something else).
About the .env file
C:\Users\deane\.openclaw\.env usually does not exist until you create it. That’s expected.
Also important: since you run the gateway as a Scheduled Task, it often won’t see env vars from your PowerShell profile. Putting the key in .env (or in openclaw.json under env) is the reliable path.
Do this (no wizard)
- Set OpenRouter API key in config (no .env needed):
openclaw config set env.OPENROUTER_API_KEY "sk-or-REPLACE_ME"
- Force the default model to OpenRouter Gemini + disable fallbacks temporarily:
openclaw config set agents.defaults.model.primary "openrouter/google/gemini-3-flash-preview"
openclaw config set agents.defaults.model.fallbacks "[]" --strict-json
openclaw gateway restart
- In the dashboard chat, send:
/new
To show exactly where Anthropic is coming from (pasteable)
Run and paste the output:
openclaw config get agents.defaults.model
And check if the session is pinned in the Control UI: Sessions → (your session) → Model override. If there’s an override set, clear it and /new.
If you paste openclaw config get agents.defaults.model, I can point to the exact line that’s causing the Anthropic selection.
I'm telling u everything is fine.
- Another process is listening on this port.
Gateway restart timed out after 60s waiting for health checks.
PS C:\WINDOWS\system32> openclaw config get agents.defaults.model
🦞 OpenClaw 2026.2.23 (b817600) — I'm like tmux: confusing at first, then suddenly you can't live without me.
openrouter/google/gemini-3-flash-preview
PS C:\WINDOWS\system32>
Your model config is fine (openrouter/google/gemini-3-flash-preview). The problem you’re hitting right now is purely OS-level:
“Another process is listening on this port”
That means you still have a stray Gateway process (or a second Scheduled Task) holding the port, soopenclaw gateway restartcan’t take over and then times out.
Do this exactly:
1) Find which port the Gateway service is supposed to use
openclaw gateway status | findstr /R "Gateway:|Listening:|Runtime:"
Note the port number (you’ve been on 19829 before).
2) Find the PID that’s listening on that port
(Replace 19829 if your status shows a different port)
netstat -ano | findstr :19829
Take the PID from the LISTENING line (last column).
3) Kill that PID (it’s the “other process”)
tasklist /FI "PID eq <PID>"
taskkill /PID <PID> /F
4) Start/restart the service gateway
openclaw gateway start
# or
openclaw gateway restart
5) Verify you’re back to exactly one gateway
openclaw gateway probe
If step (3) says Access denied, paste the tasklist line (just the one line). That usually means the listener is a SYSTEM scheduled task (\OpenClaw Gateway) and we’ll remove that duplicate task.
Tell me where antrhopic is hidden so I can delte it.
There isn’t a “hidden Anthropic install” to delete. That error means something is selecting provider anthropic for a run, and since you don’t have Anthropic creds configured, it fails.
On Windows, the only places that can come from are:
1) A session-level model override (most common)
In the Control UI → Sessions, click the active session and look for Model override / pinned model. If it’s set to an Anthropic model, clear it, then in chat do:
/new
2) Your config contains Anthropic via fallback/alias (even if not obvious)
Run these searches (they’re short):
findstr /I anthropic %USERPROFILE%\.openclaw\openclaw.json
findstr /S /I anthropic %USERPROFILE%\.openclaw\agents\main\agent\*.json
3) The Anthropic “auth store” file (not a key, just profiles/order)
This is the path your earlier error referenced:
%USERPROFILE%\.openclaw\agents\main\agent\auth-profiles.json
If you want to “delete Anthropic from the auth store”, that’s the file to inspect/edit/remove (it won’t break OpenClaw; it just removes Anthropic profile metadata). But again: the real fix is stopping anything from choosing an Anthropic model.
Separate issue you hit right now
“Another process is listening on this port / restart timed out” is not Anthropic — it’s a second gateway process holding the port. Fix that with netstat -ano | findstr :<port> + taskkill /PID <pid> /F.
If you paste the result of:
findstr /I anthropic %USERPROFILE%\.openclaw\openclaw.json
and tell me whether you see a Model override in the Sessions UI, I can point to the exact source of the Anthropic selection.
ur cmd brought back the node/PID issue again. It wasn't my fault after all.
Restarted Scheduled Task: OpenClaw Gateway
Timed out after 60s waiting for gateway port 19829 to become healthy.
Service runtime: status=stopped, state=Ready
Port 19829 is already in use.
- pid 49004: node.exe (127.0.0.1:19829)
- Another process is listening on this port.
Gateway restart timed out after 60s waiting for health checks.
That output means the “node/PID issue” is simply back to the same root cause as before: something else is already running node.exe on port 19829 (pid 49004), so the Scheduled Task gateway can’t start and times out.
openclaw gateway restart didn’t create that process — it just noticed the port was already taken.
Fix it right now (2 minutes)
1) Identify exactly what PID 49004 is running
Get-CimInstance Win32_Process -Filter "ProcessId=49004" | Select Name,ProcessId,CommandLine
2) Kill it (frees the port)
taskkill /PID 49004 /F
3) Start the Gateway service again
openclaw gateway start
openclaw gateway status
If PID 49004 comes back immediately after you kill it
Then something is respawning it (usually a second Scheduled Task, often the SYSTEM one you saw earlier, or a terminal where openclaw gateway is still running).
Run:
schtasks /Query | findstr /I "OpenClaw"
If you see a second gateway task like \OpenClaw Gateway (or anything that looks like a duplicate), delete the duplicate from an Admin PowerShell:
schtasks /Delete /F /TN "\OpenClaw Gateway"
Also: make sure you do not have any terminal still running openclaw gateway (foreground). If you do, stop it with Ctrl+C.
Reply with the CommandLine from step (1) and I’ll tell you exactly what’s spawning that node.exe so we can stop it permanently.
Y are we back her again. This issue never gets resolved day after day after day.
You’re back here because something keeps auto-starting a “stray” Gateway process that grabs port 19829 (node.exe pid 49004), and then the Scheduled Task gateway can’t start and times out.
Until we identify what is spawning pid 49004, this will keep repeating forever.
Step 1 — identify who started the process (this is the key)
Run this while the port is blocked (i.e. while you’re seeing the error):
Get-CimInstance Win32_Process -Filter "ProcessId=49004" |
Select Name,ProcessId,ParentProcessId,CommandLine
Then run (replace <PPID> with the ParentProcessId it prints):
Get-CimInstance Win32_Process -Filter "ProcessId=<PPID>" |
Select Name,ProcessId,CommandLine
Paste those two outputs. That will tell us whether it’s:
- a second Scheduled Task (often a SYSTEM one like
\OpenClaw Gateway), or - a leftover background
node.exelaunched some other way.
Step 2 — quick permanent cleanup check (duplicate tasks)
Run:
schtasks /Query | findstr /I "OpenClaw"
If you see more than one gateway-ish task (especially anything under \OpenClaw Gateway), delete the duplicate from an Administrator PowerShell:
schtasks /Delete /F /TN "\OpenClaw Gateway"
schtasks /Delete /F /TN "\OpenClaw Node"
Step 3 — get stable again (once you’ve killed the blocker)
taskkill /PID 49004 /F
openclaw gateway start
openclaw gateway status
Once it’s stable: do not run openclaw gateway in a terminal anymore if you’re using the Scheduled Task mode—use openclaw gateway start|stop|restart.
If you paste the output from Step 1, I can tell you exactly what keeps respawning that node.exe and how to remove it permanently.
I restarted the gateway they way you told me. The issue persits.
⚠️ Agent failed before reply: No API key found for provider "anthropic". Auth store: C:\Users\deane.openclaw\agents\main\agent\auth-profiles.json (agentDir: C:\Users\deane.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
Its trying to force me to use anthropic
If you’re still getting:
No API key found for provider "anthropic"
there is no “hidden Anthropic key” to delete. What’s happening is: a run is still being routed to an Anthropic model (via an override or failover), and since you have no Anthropic creds, it dies.
The two common reasons it keeps happening even when your agents.defaults.model looks right:
1) Your OpenRouter key is not visible to the Scheduled Task gateway
On Windows, keys in your PowerShell profile/terminal env often do not exist for the Scheduled Task.
Fix it by storing the key in OpenClaw config (no .env file needed):
openclaw config set env.OPENROUTER_API_KEY "sk-or-REPLACE_ME"
openclaw gateway restart
Then confirm the gateway can see it:
openclaw config get env.OPENROUTER_API_KEY
If that prints “path not found” (or empty), the service still won’t be able to use OpenRouter.
2) Your current session is pinned to an Anthropic model (session override)
In the Control UI go to Sessions → select the session you’re chatting in → look for Model override / pinned model and clear it.
Then in chat:
/new
Quick “where is Anthropic coming from” proof (small + pasteable)
Run:
openclaw models status --json | Select-String -Pattern "openrouter|anthropic|No API key|No credentials|unusable|cooldown|not allowed" | Select-Object -First 80
That will show whether OpenRouter is actually usable, and why it’s falling through to Anthropic.
If you paste the output of:
openclaw config get env.OPENROUTER_API_KEY- and the
models status --json | Select-String ...snippet
…I can tell you exactly which of the two cases you’re in and what single change fixes it.
It’s not “forcing” Anthropic — it only tries Anthropic if the active run is still pointed at an Anthropic model (usually via a session override) or if your intended provider isn’t usable and it falls back.
Do these two checks (both are quick and don’t require pasting huge output):
1) Make sure the Gateway service can actually use OpenRouter
On Windows Scheduled Task, keys in your terminal profile often don’t exist for the service.
Run:
openclaw config get env.OPENROUTER_API_KEY
- If it says path not found (or empty), set it in config (this is the most reliable on Windows services):
openclaw config set env.OPENROUTER_API_KEY "sk-or-REPLACE_ME"
openclaw gateway restart
2) Clear any session-level “pinned model” override
In the Control UI: Sessions → select your active session → Model override (clear it if set), then in chat:
/new
If it still throws the Anthropic error after those
Run this and paste the output (it should fit Discord):
openclaw logs --limit 200 --json |
Select-String -Pattern "selected|model|openrouter|anthropic|No API key|No credentials" |
Select-Object -Last 30
That will show what model/provider it actually selected for the run and why.
Give me the cmd to stop it asking for anthropic key or give the file loction to delete the anthopic ref. It is NOT in opeclaw or prof.
You don’t need to “delete a hidden Anthropic key”. What you want is: stop OpenClaw from ever selecting an Anthropic model (so it stops asking for Anthropic creds).
A) One command that hard-disables Anthropic fallback (recommended)
Right now your agents.defaults.model is a string, so you can’t set fallbacks under it. Replace it with an explicit object that has no fallbacks:
openclaw config set agents.defaults.model '{ "primary": "openrouter/google/gemini-3-flash-preview", "fallbacks": [] }' --strict-json
openclaw gateway restart
Now, if OpenRouter isn’t configured correctly, you’ll get an OpenRouter auth error (which is correct), not Anthropic.
B) Make OpenRouter auth exist for the Gateway service (no PowerShell profile tricks)
Best (stores it in the agent auth store, works for Scheduled Task too):
openclaw models auth paste-token --provider openrouter
Paste your sk-or-... key when prompted, then:
openclaw gateway restart
(Alt: store it in config: openclaw config set env.OPENROUTER_API_KEY "sk-or-...")
C) If you still want “where is Anthropic referenced on disk?”
These are the only usual places:
- Config:
C:\Users\deane\.openclaw\openclaw.json - Auth store (per-agent):
C:\Users\deane\.openclaw\agents\main\agent\auth-profiles.json
- Session transcripts (can contain pinned/old model decisions):
C:\Users\deane\.openclaw\agents\main\sessions\*.jsonl
Search all of them at once:
findstr /S /I anthropic "%USERPROFILE%\.openclaw\openclaw.json" "%USERPROFILE%\.openclaw\agents\main\agent\auth-profiles.json" "%USERPROFILE%\.openclaw\agents\main\sessions\*.jsonl"
If Anthropic only shows up in sessions\*.jsonl, don’t hand-edit/delete first—just do /new in the Control UI chat to start a fresh session.
If you run A + B and it still errors on Anthropic, paste the output of:
openclaw config get agents.defaults.model
and we’ll pinpoint what’s still selecting Anthropic.
Iv told you that its not opeclaw or prof.
Are u aware ur resolution just caused another problem?
There isn’t an “Anthropic ref file” you can just delete to make this stop. The only reason it asks for an Anthropic key is: some run is still selecting an anthropic/... model (via a session override, channel pin, or fallback).
Here’s how to force it to never pick Anthropic and to find where it’s coming from.
1) Force “no fallbacks” (so it can’t silently jump to Anthropic)
Run this (replaces the simple string with an explicit model object):
openclaw config set agents.defaults.model '{ "primary": "openrouter/google/gemini-3-flash-preview", "fallbacks": [] }' --strict-json
openclaw gateway restart
Now if OpenRouter isn’t usable, the error will be about OpenRouter, not Anthropic.
2) Make sure OpenRouter auth is actually available to the Gateway service
Don’t rely on PowerShell profile env vars. Store it in OpenClaw’s auth store:
openclaw models auth paste-token --provider openrouter
openclaw gateway restart
(You paste your sk-or-... key when prompted.)
3) Clear session/channel pins that can override your defaults
A) Session override (most common)
In the Control UI chat, do:
/new
If you ever used /model opus or similar in that session earlier, /new clears that history.
B) Channel model pin
Check if your config pins that channel to Anthropic:
openclaw config get channels.modelByChannel
If that prints anything with anthropic/..., remove/replace it.
4) If you still see the Anthropic error after (1)-(3)
Then it’s coming from the session store. Search it:
findstr /S /I anthropic "%USERPROFILE%\.openclaw\agents\main\sessions\*.jsonl"
If you paste the output of (4) (even 1–2 lines), I can tell you exactly what’s pinning Anthropic (session override vs channel pin vs something else).
Yeah — it’s totally possible. Changing model/fallback settings can surface the real underlying issue (usually missing OpenRouter auth for the Windows Scheduled Task), and that can look like “a new problem”.
But I need the exact new error text to be sure.
Please paste just the single line(s) that changed — ideally the output of:
openclaw gateway status | findstr /R "Runtime:|RPC probe:|Listening:"
and the new failure message (the ⚠️ line).
Most likely outcomes:
- If it now complains about OpenRouter → good, we’ve stopped the Anthropic fallback; now we just need to make OpenRouter auth visible to the service (
openclaw models auth paste-token --provider openrouterorenv.OPENROUTER_API_KEYin config). - If it still complains about Anthropic → there’s still a session/channel pin; we’ll locate it with one
findstrin the sessions directory.
Paste the new error text and we’ll fix it.
This is an ongoing proboem with OC. Even using the config wizard will force anthropic. Why don't you know cause and resoution?
It looks like “OpenClaw forces Anthropic” because the run is still getting routed to an Anthropic model somewhere, and when Anthropic creds aren’t present you get that exact error.
That can only happen from one of these three places (and the config wizard can’t “override reality” — it just edits config; it doesn’t clear existing session/channel pins):
1) Session-level model override (most common)
Even if your global default model is OpenRouter/Gemini, a session can be pinned to something else.
What to do:
- In the Control UI: Sessions → click the active session → Model override → clear it.
- Then in chat:
/new
2) Channel-level model pin (channels.modelByChannel)
This can silently force Anthropic for a specific channel/session key.
Run and paste:
openclaw config get channels.modelByChannel
3) Your OpenRouter key isn’t actually available to the Gateway service
On Windows Scheduled Task, env vars in your PowerShell profile often do not exist for the service. When OpenRouter can’t run, you end up on fallback/other selection paths and it can land on Anthropic.
The “no drama, service-safe” fix is to store the key in OpenClaw config (not in a terminal profile):
openclaw config set env.OPENROUTER_API_KEY "sk-or-REPLACE_ME"
openclaw gateway restart
Then verify the service can see it:
openclaw config get env.OPENROUTER_API_KEY
Minimal proof so we stop guessing
Please paste outputs of these 3 (they’re short enough for Discord):
openclaw config get agents.defaults.model
openclaw config get channels.modelByChannel
openclaw models status | findstr /I "openrouter anthropic key credential"
Once we see those, I can tell you exactly which of the 3 is causing the Anthropic selection and the one-step fix.
Changing sessions dS C:\WINDOWS\system32> openclaw config get channels.modelByChannel
🦞 OpenClaw 2026.2.23 (b817600) — OpenAI-compatible, not OpenAI-dependent.
Config path not found: channels.modelByChannel
PS C:\WINDOWS\system32>idin't work.
Good — channels.modelByChannel is not what’s forcing Anthropic.
So we’re down to the other two causes:
1) Session override (still the #1 culprit)
/new resets the chat session, but the Control UI also has a Sessions panel where a session can be pinned to a model. Please check this UI path:
Control UI → Sessions → (select your active session) → Model override
If you see anything set there (even if it’s blank-looking), clear it and then do /new again.
2) OpenRouter key not visible to the Gateway service
If the gateway can’t actually use OpenRouter, you’ll keep “falling through” and hitting Anthropic errors.
Run these two commands and paste the output:
openclaw config get env.OPENROUTER_API_KEY
openclaw models status | findstr /I "openrouter anthropic key credential"
If env.OPENROUTER_API_KEY is missing, set it (this is the most reliable fix on Windows Scheduled Task):
openclaw config set env.OPENROUTER_API_KEY "sk-or-REPLACE_ME"
openclaw gateway restart
Then do /new in the dashboard.
If after setting env.OPENROUTER_API_KEY it still asks for Anthropic, paste the single most useful thing:
openclaw logs --limit 200 --json | findstr /I "selected model openrouter anthropic"
That will show what model/provider it actually selected for the run.
I told you that my OR config is FINE that has not changed. Ur cmd is caused this.
If Anthropic “isn’t in openclaw.json or your profile”, the only remaining place it can be coming from is the session store (a pinned/remembered model for that chat/session). That’s the “hidden” bit that survives reinstalls unless you wipe ~/.openclaw.
Where the “Anthropic ref” lives (Windows)
Session transcripts + session metadata:
%USERPROFILE%\.openclaw\agents\main\sessions\*.jsonl
Auth profiles live here (do not delete this unless you want to wipe creds too):
%USERPROFILE%\.openclaw\agents\main\agent\auth-profiles.json
Cmd to find the Anthropic reference (prints the file path)
findstr /S /I "anthropic/" "%USERPROFILE%\.openclaw\agents\main\sessions\*.jsonl"
Cmd to stop it without deleting files (preferred)
In the Control UI chat, send:
/new
And in Control UI → Sessions, make sure there is no Model override set for the active session.
If you want the “nuke the hidden refs” option
This deletes session history/metadata for the main agent (it’s safe, but you lose chat history):
openclaw gateway stop
Remove-Item -Recurse -Force "%USERPROFILE%\.openclaw\agents\main\sessions"
openclaw gateway start
After that, it can’t “remember” an Anthropic-pinned session anymore.
If you paste the output of the findstr command (even 1–2 matching lines), I can tell you exactly which session file is pinning Anthropic so you can delete just that one instead of wiping everything.
I have told you over and over and over anthropic is not referenced in those file. No file .openclaw. U know its the other files.
I believe you that you’re not intentionally referencing Anthropic in openclaw.json or your “profile”. The Anthropic error still only happens when the run ends up selecting an anthropic/... model anyway — usually because the intended provider (OpenRouter) isn’t actually usable for the Gateway Scheduled Task and it falls back.
Instead of hunting “hidden files”, force OpenClaw into a state where it cannot fall back to Anthropic:
1) Hard-pin your model + disable all fallbacks (so Anthropic can’t be selected)
openclaw config set agents.defaults.model '{ "primary": "openrouter/google/gemini-3-flash-preview", "fallbacks": [] }' --strict-json
2) Make sure the Gateway service has OpenRouter auth (don’t rely on terminal env)
Recommended (stores in OpenClaw auth store; works with Scheduled Task):
openclaw models auth paste-token --provider openrouter
(paste your sk-or-... when prompted)
3) Restart the gateway (so it re-reads config/auth)
openclaw gateway restart
If restart says the port is in use, kill the blocking PID first:
netstat -ano | findstr :19829
taskkill /PID <LISTENING_PID> /F
openclaw gateway start
4) Clear any session pin
In the Control UI chat:
/new
(and in Sessions, make sure there’s no “Model override” set for that session)