#sessions and previous memories gone. permissions and tools also gone
1 messages ยท Page 1 of 1 (latest)
First thing: please paste openclaw --version.
Also, donโt reinstall or rerun setup yet โ if sessions/memory/tools all vanished together, it usually means OpenClaw started with a different state/config/workspace path, not necessarily that data was deleted.
Please run:
openclaw --version
openclaw status --all
openclaw gateway status
echo "OPENCLAW_STATE_DIR=$OPENCLAW_STATE_DIR"
echo "OPENCLAW_PROFILE=$OPENCLAW_PROFILE"
echo "OPENCLAW_CONFIG_PATH=$OPENCLAW_CONFIG_PATH"
find ~/.openclaw -maxdepth 4 -type f \( -name sessions.json -o -name MEMORY.md -o -name openclaw.json -o -name auth-profiles.json \) -print
Normally:
- sessions live at
~/.openclaw/agents/<agentId>/sessions/ - memory files live in the agent workspace, usually
~/.openclaw/workspace/ - tools/permissions come from config + agent/tool policy
If all three disappeared, Iโd first suspect: different Linux/macOS user, different OPENCLAW_STATE_DIR, different OPENCLAW_PROFILE, Docker/Podman volume not mounted, or a split install/path issue after update.
Docs:
https://docs.openclaw.ai/help/faq
https://docs.openclaw.ai/concepts/session
https://docs.openclaw.ai/concepts/memory
test@test-VirtualBox:~$ openclaw --version
openclaw status --all
openclaw gateway status
echo "OPENCLAW_STATE_DIR=$OPENCLAW_STATE_DIR"
echo "OPENCLAW_PROFILE=$OPENCLAW_PROFILE"
echo "OPENCLAW_CONFIG_PATH=$OPENCLAW_CONFIG_PATH"
find ~/.openclaw -maxdepth 4 -type f ( -name sessions.json -o -name MEMORY.md -o -name openclaw.json -o -name auth-profiles.json ) -print
OpenClaw 2026.4.23 (a979721)
[1]+ Exit 127 nohup /home/test/.openclaw/workspace/scripts/auto_spawn_ui.sh > /dev/null 2>&1
๐ฆ OpenClaw 2026.4.23 (a979721)
I've read more man pages than any human shouldโso you don't have to.
โ
OpenClaw status --all
Overview
โโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Item โ Value โ
โโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Version โ 2026.4.23 โ
โ OS โ linux 6.17.0-22-generic (x64) โ
โ Node โ 24.14.1 โ
โ Config โ ~/.openclaw/openclaw.json โ
โ Dashboard โ http://127.0.0.1:18789/ โ
โ Tailscale โ off โ
โ Channel โ stable (default) โ
โ Update โ pnpm ยท npm update 2026.4.26 โ
โ Gateway โ local ยท ws://127.0.0.1:18789 (local loopback) ยท โ
โ โ unreachable (connect ECONNREFUSED 127.0.0.1:18789) โ
โ Security โ Run: openclaw security audit --deep โ
โ Gateway self โ unknown โ
โ Gateway service โ systemd installed ยท enabled ยท stopped (state activating) โ
โ Node service โ systemd not installed โ
โ Agents โ 1 total ยท 0 bootstrapping ยท 0 active ยท 2 sessions โ
โ Secrets โ none โ
โโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Channels
โโโโโโโโโโโโฌโโโโโโโโโโฌโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Channel โ Enabled โ State โ Detail โ
โโโโโโโโโโโโผโโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โโโโโโโโโโโโดโโโโโโโโโโดโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Agents
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโฌโโโโโโโโโโโฌโโโโโโโโโโโโ
โ Agent โ Bootstrap file โ Sessions โ Active โ Store โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโผโโโโโโโโโโโผโโโโโโโโโโโผโโโโโโโโโโโโค
โ main (Research Assistant) โ ABSENT โ 2 โ 9h ago โ ~/. โ
โ โ โ โ โ openclaw/ โ
โ โ โ โ โ agents/ โ
โ โ โ โ โ main/ โ
โ โ โ โ โ sessions/ โ
โ โ โ โ โ sessions. โ
โ โ โ โ โ json โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโดโโโโโโโโโโโดโโโโโโโโโโโดโโโโโโโโโโโโ
Diagnosis (read-only)
Gateway connection details:
Gateway target: ws://127.0.0.1:18789
Source: local loopback
Config: /home/test/.openclaw/openclaw.json
Bind: loopback
โ Config: /home/test/.openclaw/openclaw.json
โ Secret diagnostics (0)
โ Restart sentinel: none
โ Port 18789
! Tailscale: off ยท unknown
โ Skills: 10 eligible ยท 0 missing ยท /home/test/.openclaw/workspace
โ Plugin compatibility (none)
! Channel issues skipped (gateway unreachable)
Gateway health:
connect ECONNREFUSED 127.0.0.1:18789
Pasteable debug report. Auth tokens redacted.
Troubleshooting: https://docs.openclaw.ai/troubleshooting
โ
๐ฆ OpenClaw 2026.4.23 (a979721)
I've seen your commit messages. We'll work on that together.
โ
โ
Service: systemd (enabled)
File logs: /tmp/openclaw/openclaw-2026-04-28.log
Command: /usr/bin/node /home/test/.npm-global/lib/node_modules/openclaw/dist/index.js gateway --port 18789
Service file: ~/.config/systemd/user/openclaw-gateway.service
Service env: OPENCLAW_GATEWAY_PORT=18789
Config (cli): ~/.openclaw/openclaw.json
Config (service): ~/.openclaw/openclaw.json
Gateway: bind=loopback (127.0.0.1), port=18789 (service args)
Probe target: ws://127.0.0.1:18789
Dashboard: http://127.0.0.1:18789/
Probe note: Loopback-only gateway; only local clients can connect.
Runtime: stopped (state failed, sub failed, last exit 0, reason 0)
Connectivity probe: failed
Probe target: ws://127.0.0.1:18789
connect ECONNREFUSED 127.0.0.1:18789
Capability: unknown
Service is loaded but not running (likely exited immediately).
File logs: /tmp/openclaw/openclaw-2026-04-28.log
Logs: journalctl --user -u openclaw-gateway.service -n 200 --no-pager
Restart attempts: /home/test/.openclaw/logs/gateway-restart.log
Troubles: run openclaw status
Troubleshooting: https://docs.openclaw.ai/troubleshooting
OPENCLAW_STATE_DIR=
OPENCLAW_PROFILE=
OPENCLAW_CONFIG_PATH=
/home/test/.openclaw/openclaw.json
/home/test/.openclaw/agents/research-assistant/agent/auth-profiles.json
/home/test/.openclaw/agents/research-assistant/sessions/sessions.json
/home/test/.openclaw/agents/main/agent/auth-profiles.json
/home/test/.openclaw/agents/main/sessions/sessions.json
test@test-VirtualBox:~$
That output is cut off right before the important part โ especially the find results.
Most likely this is not deleted data, but OpenClaw starting with a different state dir / profile / workspace. Sessions live under:
~/.openclaw/agents/<agentId>/sessions/sessions.json
Memory lives in the workspace, usually:
~/.openclaw/workspace/MEMORY.md
Docs: https://docs.openclaw.ai/help/faq#where-things-live-on-disk
Please donโt run openclaw reset.
Can you paste the rest, plus this?
openclaw config file
openclaw config get agents.defaults.workspace
openclaw config get tools --json
openclaw config get agents.list --json
openclaw sessions --all-agents
find ~ -maxdepth 1 -type d -name '.openclaw*' -print
find ~/.openclaw ~/.openclaw-* -maxdepth 5 -type f \( -name sessions.json -o -name MEMORY.md -o -name openclaw.json -o -name auth-profiles.json \) -print 2>/dev/null
openclaw doctor
Also: youโre on 2026.4.23 and status says 2026.4.26 is available, so after we confirm where your files are, Iโd update + doctor/restart. But first letโs locate the old state so we donโt accidentally โfixโ the wrong empty profile. ๐ฆ
Good, this narrows it down: your Gateway is not reachable, not necessarily โeverything deletedโ.
Key line:
unreachable (connect ECONNREFUSED 127.0.0.1:18789)
Gateway service: systemd installed ยท enabled ยท stopped (state activating)
So the UI/client may look empty because the Gateway isnโt actually listening. Also, OpenClaw still sees:
Agents: 1 total ยท ... ยท 2 sessions
Store: ~/.openclaw/agents/main/sessions/sessions.json
Next, please run/paste:
openclaw gateway status --deep
openclaw logs --lines 120
openclaw config validate
openclaw doctor
If openclaw logs canโt connect, use systemd logs:
journalctl --user -u openclaw-gateway -n 160 --no-pager
Do not reset yet. We need the startup error first โ likely config/service/startup failure, and your sessions file still exists. Docs: https://docs.openclaw.ai/gateway/troubleshooting
Yep โ this still points to Gateway startup failure, not wiped sessions.
The important bits:
File logs: /tmp/openclaw/openclaw-2026-04-28.log
Gateway health: connect ECONNREFUSED
Service: enabled, but not listening
Please paste the startup error from:
tail -n 200 /tmp/openclaw/openclaw-2026-04-28.log
journalctl --user -u openclaw-gateway -n 200 --no-pager
systemctl --user status openclaw-gateway --no-pager
Before running repairs, make a local backup:
cp -a ~/.openclaw ~/.openclaw.backup-$(date +%F-%H%M%S)
Then, if the logs donโt show an obvious config error, the next safe repair path is:
openclaw update
openclaw doctor --fix
openclaw gateway restart
But paste the logs first if you can โ the exact crash line will tell us why the gateway never binds to 127.0.0.1:18789.
Aha โ this confirms two useful things:
- No profile/env mismatch: those env vars are empty, so youโre on the normal
~/.openclaw. - Your session stores still exist:
~/.openclaw/agents/research-assistant/sessions/sessions.json ~/.openclaw/agents/main/sessions/sessions.json
So donโt reset. The current blocker is still: Gateway exits immediately and never binds to port 18789.
Please paste this next โ especially the actual error lines:
tail -n 200 /tmp/openclaw/openclaw-2026-04-28.log
tail -n 200 ~/.openclaw/logs/gateway-restart.log
journalctl --user -u openclaw-gateway.service -n 200 --no-pager
openclaw config validate
openclaw sessions --all-agents
openclaw config get agents.defaults.workspace
find ~/.openclaw/workspace -maxdepth 3 -type f \( -name MEMORY.md -o -name AGENTS.md -o -name USER.md -o -name SOUL.md \) -print
Also: the research-assistant vs main split may explain the โold sessions missingโ part. Your old data might be under research-assistant, while the current config/UI is looking at main. But first we need the Gateway crash line. ๐ฆ
test@test-VirtualBox:~$ tail -n 200 /tmp/openclaw/openclaw-2026-04-28.log
tail: cannot open '/tmp/openclaw/openclaw-2026-04-28.log' for reading: No such file or directory
test@test-VirtualBox:~$ journalctl --user -u openclaw-gateway.service -n 200 --no-pager
openclaw config validate
openclaw sessions --all-agents
openclaw config get agents.defaults.workspace
find ~/.openclaw/workspace -maxdepth 3 -type f ( -name MEMORY.md -o -name AGENTS.md -o -name USER.md -o -name SOUL.md ) -print
Apr 28 08:57:08 test-VirtualBox systemd[1267]: openclaw-gateway.service: Scheduled restart job, restart counter is at 4.
Apr 28 08:57:08 test-VirtualBox systemd[1267]: Starting openclaw-gateway.service - OpenClaw Gateway (v2026.4.23)...
Apr 28 08:57:08 test-VirtualBox xhost[4711]: Invalid MIT-MAGIC-COOKIE-1 key
Apr 28 08:57:08 test-VirtualBox xhost[4711]: /usr/bin/xhost: unable to open display ":0"
Apr 28 08:57:08 test-VirtualBox systemd[1267]: openclaw-gateway.service: Control process exited, code=exited, status=1/FAILURE
Apr 28 08:57:08 test-VirtualBox systemd[1267]: openclaw-gateway.service: Failed with result 'exit-code'.
Apr 28 08:57:08 test-VirtualBox systemd[1267]: Failed to start openclaw-gateway.service - OpenClaw Gateway (v2026.4.23).
Apr 28 08:57:14 test-VirtualBox systemd[1267]: openclaw-gateway.service: Scheduled restart job, restart counter is at 5.
Apr 28 08:57:14 test-VirtualBox systemd[1267]: openclaw-g
ateway.service: Start request repeated too quickly.
Apr 28 08:57:14 test-VirtualBox systemd[1267]: openclaw-gateway.service: Failed with result 'exit-code'.
Apr 28 08:57:14 test-VirtualBox systemd[1267]: Failed to start openclaw-gateway.service - OpenClaw Gateway (v2026.4.23).
Apr 28 09:12:26 test-VirtualBox systemd[1267]: Starting openclaw-gateway.service - OpenClaw Gateway (v2026.4.23)...
Apr 28 09:12:26 test-VirtualBox xhost[5083]: Invalid MIT-MAGIC-COOKIE-1 key
Apr 28 09:12:26 test-VirtualBox xhost[5083]: /usr/bin/xhost: unable to open display ":0"
Apr 28 09:12:26 test-VirtualBox systemd[1267]: openclaw-gateway.service: Control process exited, code=exited, status=1/FAILURE
Smoking gun found:
xhost: Invalid MIT-MAGIC-COOKIE-1 key
/usr/bin/xhost: unable to open display ":0"
Control process exited ... status=1/FAILURE
That means systemd is failing in a pre-start/control step before OpenClaw even starts. So the Gateway never binds to 18789, and the UI looks empty/broken. Your sessions are still on disk.
Please run:
systemctl --user cat openclaw-gateway.service
systemctl --user show openclaw-gateway.service -p ExecStartPre -p ExecStart
If you see an ExecStartPre=/usr/bin/xhost ... line, remove/regenerate the service:
cp ~/.config/systemd/user/openclaw-gateway.service ~/openclaw-gateway.service.backup
openclaw gateway install --force
systemctl --user daemon-reload
openclaw gateway restart
openclaw gateway status
After it starts, check the โmissingโ data with:
openclaw sessions --all-agents
openclaw config get agents.defaults.workspace
find ~/.openclaw/workspace -maxdepth 3 -type f \( -name MEMORY.md -o -name AGENTS.md -o -name USER.md -o -name SOUL.md \) -print
Also note you have both research-assistant and main agent session stores, so the old sessions may simply be under the other agent. First get the gateway booting again, then we can fix the agent/workspace selection if needed. ๐ฆ
Yep, same root cause. The Gateway isnโt crashing from OpenClaw config โ systemd is failing on xhost before Gateway starts.
Run this first so we can see where the bad pre-start comes from:
systemctl --user cat openclaw-gateway.service
systemctl --user show openclaw-gateway.service -p ExecStartPre -p ExecStart
Likely fix:
cp ~/.config/systemd/user/openclaw-gateway.service ~/openclaw-gateway.service.backup
openclaw gateway install --force
systemctl --user daemon-reload
systemctl --user reset-failed openclaw-gateway.service
openclaw gateway restart
openclaw gateway status
If systemctl --user cat shows the xhost line in a drop-in override under openclaw-gateway.service.d/, install --force may not remove it. In that case paste the systemctl --user cat output and weโll remove just that override safely.
Still: donโt reset. Your session files exist. This is a service startup issue.
test@test-VirtualBox:~$ systemctl --user cat openclaw-gateway.service
systemctl --user show openclaw-gateway.service -p ExecStartPre -p ExecStart
[Unit]
Description=OpenClaw Gateway (v2026.4.23)
After=network-online.target
Wants=network-online.target
StartLimitBurst=5
StartLimitIntervalSec=60
[Service]
ExecStart=/usr/bin/node /home/test/.npm-global/lib/node_modules/openclaw/dist/index.js gateway --port 18789
Restart=always
RestartSec=5
RestartPreventExitStatus=78
TimeoutStopSec=30
TimeoutStartSec=30
SuccessExitStatus=0 143
KillMode=control-group
Environment=HOME=/home/test
Environment=TMPDIR=/tmp
Environment=NODE_EXTRA_CA_CERTS=/etc/ssl/certs/ca-certificates.crt
Environment=PATH=/usr/bin:/home/test/.nvm/current/bin:/home/test/.local/bin:/home/test/.npm-global/bin:/home/test/bin:/hom>
Environment=OPENCLAW_GATEWAY_PORT=18789
Environment=OPENCLAW_SYSTEMD_UNIT=openclaw-gateway.service
Environment="OPENCLAW_WINDOWS_TASK_NAME=OpenClaw Gateway"
Environment=OPENCLAW_SERVICE_MARKER=openclaw
Environment=OPENCLAW_SERVICE_KIND=gateway
Environment=OPENCLAW_SERVICE_VERSION=2026.4.23
Environment=DISPLAY=:0
Environment=XAUTHORITY=/home/test/.Xauthority
ExecStartPre=/usr/bin/xhost +local:test
[Install]
WantedBy=default.target
lines 1-35
Found it. This line is the breaker:
ExecStartPre=/usr/bin/xhost +local:test
ExecStartPre must succeed or systemd refuses to start OpenClaw. Your xhost command is failing, so the Gateway never launches.
Use a systemd override to clear just that pre-start line:
cp ~/.config/systemd/user/openclaw-gateway.service ~/openclaw-gateway.service.backup
mkdir -p ~/.config/systemd/user/openclaw-gateway.service.d
cat > ~/.config/systemd/user/openclaw-gateway.service.d/no-xhost.conf <<'EOF'
[Service]
ExecStartPre=
EOF
systemctl --user daemon-reload
systemctl --user reset-failed openclaw-gateway.service
systemctl --user restart openclaw-gateway.service
openclaw gateway status
If that starts cleanly, then check the โmissingโ stuff:
openclaw sessions --all-agents
openclaw config get agents.defaults.workspace
find ~/.openclaw/workspace -maxdepth 3 -type f \( -name MEMORY.md -o -name AGENTS.md -o -name USER.md -o -name SOUL.md \) -print
The data still looks present; the gateway was just being killed before startup.
test@test-VirtualBox:~$ cp ~/.config/systemd/user/openclaw-gateway.service ~/openclaw-gateway.service.backup
mkdir -p ~/.config/systemd/user/openclaw-gateway.service.d
cat > ~/.config/systemd/user/openclaw-gateway.service.d/no-xhost.conf <<'EOF'
[Service]
ExecStartPre=
EOF
systemctl --user daemon-reload
systemctl --user reset-failed openclaw-gateway.service
systemctl --user restart openclaw-gateway.service
openclaw gateway status
๐ฆ OpenClaw 2026.4.23 (a979721) โ I speak fluent bash, mild sarcasm, and aggressive tab-completion energy.
โ
โ
Service: systemd (enabled)
File logs: /tmp/openclaw/openclaw-2026-04-28.log
Command: /usr/bin/node /home/test/.npm-global/lib/node_modules/openclaw/dist/index.js gateway --port 18789
Service file: ~/.config/systemd/user/openclaw-gateway.service
Service env: OPENCLAW_GATEWAY_PORT=18789
Config (cli): ~/.openclaw/openclaw.json
Config (service): ~/.openclaw/openclaw.json
Gateway: bind=loopback (127.0.0.1), port=18789 (service args)
Probe target: ws://127.0.0.1:18789
Dashboard: http://127.0.0.1:18789/
Probe note: Loopback-only gateway; only local clients can connect.
Runtime: running (pid 3145, state active, sub running, last exit 0, reason 0)
Warm-up: launch agents can take a few seconds. Try again shortly.
Connectivity probe: failed
Probe target: ws://127.0.0.1:18789
connect ECONNREFUSED 127.0.0.1:18789
Capability: unknown
Gateway port 18789 is not listening (service appears running).
Logs: journalctl --user -u openclaw-gateway.service -n 200 --no-pager
Restart log: ~/.openclaw/logs/gateway-restart.log
Troubles: run openclaw status
Troubleshooting: https://docs.openclaw.ai/troubleshooting
Nice, that fixed the systemd pre-start failure. Now weโre past xhost; OpenClawโs Node process is running, but it still hasnโt opened port 18789.
Give it ~10 seconds, then run:
sleep 10
openclaw gateway status
ss -ltnp | grep 18789 || true
ps -fp 3145
tail -n 200 /tmp/openclaw/openclaw-2026-04-28.log
tail -n 200 ~/.openclaw/logs/gateway-restart.log
journalctl --user -u openclaw-gateway.service -n 200 --no-pager
Paste the log output. We need to see whether the gateway is hanging during startup or crashing/restarting silently.
Good news: this is still not pointing to deleted sessions/memory. Weโve moved from โservice canโt startโ to โservice process starts but gateway doesnโt listen yet.โ ๐ฆ
sleep 10
openclaw gateway status
ss -ltnp | grep 18789 || true
ps -fp 3145
tail -n 200 /tmp/openclaw/openclaw-2026-04-28.log
tail -n 200 ~/.openclaw/logs/gateway-restart.log
journalctl --user -u openclaw-gateway.service -n 200 --no-pager
Looks like only the commands came through, not the output.
Please run them and paste what prints after:
sleep 10
openclaw gateway status
ss -ltnp | grep 18789 || true
ps -fp 3145 || true
tail -n 200 /tmp/openclaw/openclaw-2026-04-28.log 2>&1
tail -n 200 ~/.openclaw/logs/gateway-restart.log 2>&1
journalctl --user -u openclaw-gateway.service -n 200 --no-pager
If Discord is eating/truncating it, save it to a file:
{
sleep 10
openclaw gateway status
ss -ltnp | grep 18789 || true
ps -fp 3145 || true
tail -n 200 /tmp/openclaw/openclaw-2026-04-28.log 2>&1
tail -n 200 ~/.openclaw/logs/gateway-restart.log 2>&1
journalctl --user -u openclaw-gateway.service -n 200 --no-pager
} > ~/openclaw-debug.txt 2>&1
cat ~/openclaw-debug.txt
Weโre looking for the first real gateway startup error now.
test@test-VirtualBox:~$ sleep 10
openclaw gateway status
ss -ltnp | grep 18789 || true
ps -fp 3145
tail -n 200 /tmp/openclaw/openclaw-2026-04-28.log
tail -n 200 ~/.openclaw/logs/gateway-restart.log
journalctl --user -u openclaw-gateway.service -n 200 --no-pager
๐ฆ OpenClaw 2026.4.23 (a979721) โ Like having a senior engineer on call, except I don't bill hourly or sigh audibly.
โ
โ
Service: systemd (enabled)
File logs: /tmp/openclaw/openclaw-2026-04-28.log
Command: /usr/bin/node /home/test/.npm-global/lib/node_modules/openclaw/dist/index.js gateway --port 18789
Service file: ~/.config/systemd/user/openclaw-gateway.service
Service env: OPENCLAW_GATEWAY_PORT=18789
Config (cli): ~/.openclaw/openclaw.json
Config (service): ~/.openclaw/openclaw.json
Gateway: bind=loopback (127.0.0.1), port=18789 (service args)
Probe target: ws://127.0.0.1:18789
Dashboard: http://127.0.0.1:18789/
Probe note: Loopback-only gateway; only local clients can connect.
Runtime: running (pid 3145, state active, sub running, last exit 0, reason 0)
Connectivity probe: ok
Capability: admin-capable
Listening: 127.0.0.1:18789
Troubles: run openclaw status
Troubleshooting: https://docs.openclaw.ai/troubleshooting
LISTEN 0 511 127.0.0.1:18789 0.0.0.0:* users:(("openclaw-gatewa",pid=3145,fd=29))
LISTEN 0 511 [::1]:18789 [::]:* users:(("openclaw-gatewa",pid=3145,fd=30))
UID PID PPID C STIME TTY TIME CMD
test 3145 1045 7 18:10 ? 00:00:28 openclaw-gateway
{"0":"\u001b[38;2;47;191;113mConfig valid: ~/.openclaw/openclaw.json\u001b[39m","_meta":{"runtime":"node","runtimeVersion":"24.14.1","hostname":"unknown","name":"openclaw","date":"2026-04-28T08:05:32.241Z","logLevelId":3,"logLevelName":"INFO","path":{"fullFilePath":"file:///home/test/.npm-global/lib/node_modules/openclaw/dist/subsystem-bmJ5rL4Q.js:160:46","fileName":"subsystem-bmJ5rL4Q.js","fileNameWithLine":"subsystem-
Great โ Gateway is healthy now ๐
Connectivity probe: ok
Listening: 127.0.0.1:18789
Now check/restore the โmissingโ sessions + memory:
openclaw sessions --all-agents
openclaw config get agents.defaults.workspace
find ~/.openclaw/workspace -maxdepth 3 -type f \( -name MEMORY.md -o -name AGENTS.md -o -name USER.md -o -name SOUL.md \) -print
openclaw status --all
Likely next issue: you have two agent stores:
~/.openclaw/agents/research-assistant/...
~/.openclaw/agents/main/...
So if the UI is now pointed at main but your older work was in research-assistant, itโll look like sessions/memory vanished even though the files are still there.
Also keep the no-xhost.conf override for now. If openclaw gateway install --force re-adds the broken xhost line later, thatโs worth filing as a GitHub issue with your service file + the xhost error: https://github.com/openclaw/openclaw/issues
test@test-VirtualBox:~$ openclaw sessions --all-agents
openclaw config get agents.defaults.workspace
find ~/.openclaw/workspace -maxdepth 3 -type f ( -name MEMORY.md -o -name AGENTS.md -o -name USER.md -o -name SOUL.md ) -print
openclaw status --all
๐ฆ OpenClaw 2026.4.23 (a979721) โ Powered by open source, sustained by spite and good documentation.
Session stores: 1 (main)
Sessions listed: 2
Agent Kind Key Age Model Tokens (ctx %) Flags
main direct agent:main:tui-2...4fa1c8 9h ago gemini-3-flash-preview 14k/200k (7%) system id:0f314b7f-1e54-4f98-8b81-9634866882a3
main direct agent:main:main 9h ago gemini-3-flash-preview 167k/200k (83%) think:medium system id:98ec73a5-a3b5-4af7-b05a-a6f6ea9d8c24
๐ฆ OpenClaw 2026.4.23 (a979721) โ The only open-source project where the mascot could eat the competition.
/home/test/.openclaw/workspace
/home/test/.openclaw/workspace/SOUL.md
/home/test/.openclaw/workspace/AGENTS.md
/home/test/.openclaw/workspace/USER.md
๐ฆ OpenClaw 2026.4.23 (a979721) โ Your terminal just grew clawsโtype something and let the bot pinch the busywork.
โ
OpenClaw status --all
Overview
โ Item โ Value โ
โ Version โ 2026.4.23 โ
โ OS โ linux 6.17.0-22-generic (x64) โ
โ Node โ 24.14.1 โ
โ Config โ ~/.openclaw/openclaw.json โ
โ Dashboard โ http://127.0.0.1:18789/ โ
โ Tailscale โ off โ
โ Channel โ stable (default) โ
โ Update โ pnpm ยท npm update 2026.4.26 โ
โ Gateway โ local ยท ws://127.0.0.1:18789 (local loopback) ยท reachable 64ms ยท auth token ยท test-VirtualBox (10.0. โ
โ โ 2.15) app 2026.4.23 linux 6.17.0-22-generic โ
โ Security โ Run: openclaw security audit --deep โ
โ Gateway self โ unknown โ
โ Gateway service โ systemd installed ยท enabled ยท running (pid 3145, state active) โ
โ Node service โ systemd not installed โ
โ Agents โ 1 total ยท 0 bootstrapping ยท 0 active ยท 2 sessions โ
โ Secrets โ none
Channels
โ Channel โ Enabled โ State โ Detail
Agents
โ Agent โ Bootstrap file โ Sessions โ Active โ Store โ
โ main (Research Assistant) โ ABSENT โ 2 โ 9h ago โ ~/.openclaw/agents/main/sessions/sessions.json โ
Diagnosis (read-only)
Gateway connection details:
Gateway target: ws://127.0.0.1:18789
Source: local loopback
Config: /home/test/.openclaw/openclaw.json
Bind: loopback
โ Config: /home/test/.openclaw/openclaw.json
โ Secret diagnostics (0)
โ Restart sentinel: none
! Port 18789
Port 18789 is already in use.
- pid 3145 test: openclaw-gateway (127.0.0.1:18789)
- Gateway already running locally. Stop it (openclaw gateway stop) or use a different port.
! Tailscale: off ยท unknown
โ Skills: 10 eligible ยท 0 missing ยท /home/test/.openclaw/workspace
โ Plugin compatibility (none)
โ Channel issues (none)
Pasteable debug report. Auth tokens redacted.
Troubleshooting: https://docs.openclaw.ai/troubleshooting
โ
test@test-VirtualBox:~$
Good: Gateway is fixed, and OpenClaw sees 2 sessions again.
Now the remaining issue is likely agent/workspace mismatch, plus no MEMORY.md in the current workspace.
Run these:
openclaw config get agents.list --json
openclaw config get tools --json
openclaw sessions --store ~/.openclaw/agents/research-assistant/sessions/sessions.json
find ~/.openclaw ~/.openclaw-* -maxdepth 6 -type f \( -name MEMORY.md -o -name memory.md \) -print 2>/dev/null
find ~/.openclaw ~/.openclaw-* -maxdepth 6 -type f \( -name AGENTS.md -o -name USER.md -o -name SOUL.md \) -print 2>/dev/null
What we know:
- Current configured workspace is:
~/.openclaw/workspace - It has:
SOUL.md AGENTS.md USER.md - It does not currently have
MEMORY.md. - Earlier, disk showed a
research-assistantagent store, butopenclaw sessions --all-agentsonly lists configuredmain.
So if your old sessions/memory were under research-assistant, we need to either re-add/switch to that agent or copy the right workspace files back โ but donโt move/delete anything until we see those command outputs.
Perfect โ core service is healthy now:
Gateway reachable
Gateway service running
Agents: 1 total ยท 2 sessions
So the original โeverything goneโ was caused by the Gateway not starting because of the broken xhost pre-start line.
For the remaining โmissing memory/tools/permissionsโ part, run the checks from above:
openclaw config get agents.list --json
openclaw config get tools --json
openclaw sessions --store ~/.openclaw/agents/research-assistant/sessions/sessions.json
find ~/.openclaw ~/.openclaw-* -maxdepth 6 -type f \( -name MEMORY.md -o -name memory.md \) -print 2>/dev/null
find ~/.openclaw ~/.openclaw-* -maxdepth 6 -type f \( -name AGENTS.md -o -name USER.md -o -name SOUL.md \) -print 2>/dev/null
If that old research-assistant store has the missing sessions, weโll point OpenClaw back at the right agent/store instead of guessing.
That โPort 18789 already in useโ is okay here โ itโs just the now-running Gateway:
pid 3145 test: openclaw-gateway
Gateway already running locally
Donโt stop it unless youโre restarting intentionally.
Current state:
- Gateway fixed โ
- 2 sessions visible โ
- Current agent is
main, display name โResearch Assistantโ - Current workspace is
~/.openclaw/workspace - No channels configured
- No
MEMORY.mdfound in that workspace yet
To finish tracking the missing memory/tools, paste:
openclaw config get agents.list --json
openclaw config get tools --json
openclaw sessions --store ~/.openclaw/agents/research-assistant/sessions/sessions.json
find ~/.openclaw ~/.openclaw-* -maxdepth 6 -type f \( -name MEMORY.md -o -name memory.md \) -print 2>/dev/null
If research-assistant/sessions.json has your old sessions, weโll restore that agent/store selection. If no MEMORY.md exists anywhere, then memory wasnโt written to durable memory yet โ only the session context existed.
test@test-VirtualBox:~$ openclaw config get agents.list --json
openclaw config get tools --json
openclaw sessions --store ~/.openclaw/agents/research-assistant/sessions/sessions.json
find ~/.openclaw ~/.openclaw-* -maxdepth 6 -type f ( -name MEMORY.md -o -name memory.md ) -print 2>/dev/null
[
{
"id": "main",
"default": true,
"name": "Research Assistant",
"workspace": "/home/test/.openclaw/workspace",
"agentDir": "/home/test/.openclaw/agents/research-assistant/agent",
"model": "openrouter/google/gemini-3-flash-preview"
}
]
{
"profile": "minimal"
}
๐ฆ OpenClaw 2026.4.23 (a979721) โ Hot reload for config, cold sweat for deploys.
Session store: /home/test/.openclaw/agents/research-assistant/sessions/sessions.json
Sessions listed: 1
Kind Key Age Model Tokens (ctx %) Flags
direct agent:research-a...t:main 30h ago gemini-3-flash-preview 6.6k/1049k (1%) system id:e4eb96ed-209a-43c1-a347-c1ff12690207
test@test-VirtualBox:~$
Good, we found both remaining causes.
1) Tools/permissions โgoneโ
Your config says:
{ "profile": "minimal" }
minimal only exposes session_status, so that explains missing tools.
Restore a normal local tool set with:
openclaw config set tools.profile coding
openclaw config validate
openclaw gateway restart
If you intentionally want the broadest tool surface, use full instead of coding.
2) Old session exists, but under old agent id
Current agent id is main, but old session store is:
~/.openclaw/agents/research-assistant/sessions/sessions.json
and it has 1 older session from 30h ago.
If research-assistant was your original agent id and you want that back active:
cp -a ~/.openclaw ~/.openclaw.backup-$(date +%F-%H%M%S)
openclaw config set agents.list[0].id research-assistant
openclaw config validate
openclaw gateway restart
openclaw sessions --all-agents
3) Memory file
Your find returned no MEMORY.md, so there doesnโt seem to be a durable memory file under ~/.openclaw. Future durable memory needs to be written to:
~/.openclaw/workspace/MEMORY.md
Gateway is fixed; now itโs config cleanup. ๐ฆ
test@test-VirtualBox:~$ ~/.openclaw/workspace/MEMORY.md
bash: /home/test/.openclaw/workspace/MEMORY.md: No such file or directory
Right โ that was a path, not a command. Bash tried to execute it.
To check it:
ls -la ~/.openclaw/workspace/
cat ~/.openclaw/workspace/MEMORY.md
But in your case it probably doesnโt exist yet. To create it:
cat > ~/.openclaw/workspace/MEMORY.md <<'EOF'
# MEMORY.md
## Notes
EOF
Then restart or just ask the agent to remember something durable.
The bigger fixes are still these:
openclaw config set tools.profile coding
openclaw config validate
openclaw gateway restart
And only if you want the old research-assistant session to become active again:
cp -a ~/.openclaw ~/.openclaw.backup-$(date +%F-%H%M%S)
openclaw config set agents.list[0].id research-assistant
openclaw config validate
openclaw gateway restart
it still has its memory as its latest session and not previous session
Yeah โ that means youโre seeing session context, not durable MEMORY.md.
OpenClaw has two different things:
- Session history: previous chat transcript/context. It only appears when you resume that exact session key.
- Durable memory:
~/.openclaw/workspace/MEMORY.md. You donโt have that file yet, so nothing durable was written there.
Your old session is here:
agent:research-assistant:main
To view/resume it in TUI:
openclaw
/session agent:research-assistant:main
If that session is the one with the โmemoryโ you want, ask the agent inside that session:
Summarize the important durable facts from this session and write them to MEMORY.md.
Then check:
cat ~/.openclaw/workspace/MEMORY.md
For tools, youโre still on minimal mode. Fix that separately:
openclaw config set tools.profile coding
openclaw config validate
openclaw gateway restart
Docs: https://docs.openclaw.ai/help/faq#where-should-agentsmd--soulmd--usermd--memorymd-live
can i make it to be able to see and edit files outsoide of the shared workspace
Yes โ but be careful. There are two separate gates:
- Tool access: your current config is
tools.profile: "minimal", so file tools are mostly hidden. - Sandbox/workspace access: workspace is the default cwd, but if sandboxing is enabled, outside paths may be blocked unless mounted.
Start with this:
openclaw config set tools.profile coding
openclaw config validate
openclaw gateway restart
coding includes file tools: read, write, edit, apply_patch.
Then check whether youโre sandboxed:
openclaw sandbox explain
If sandboxing is off, the agent can usually use absolute paths like /home/test/projects/foo once file tools are allowed.
If sandboxing is on, bind the folder explicitly, preferably only the folder you need:
openclaw config set agents.defaults.sandbox.docker.binds '["/home/test/projects:/projects:rw"]' --strict-json
openclaw config validate
openclaw gateway restart
Use :ro instead of :rw if you only want read access.
Safer alternative: make the project folder the workspace:
openclaw config set agents.defaults.workspace /home/test/projects/my-project
openclaw setup --workspace /home/test/projects/my-project
openclaw gateway restart
Docs: https://docs.openclaw.ai/concepts/agent-workspace and https://docs.openclaw.ai/gateway/sandboxing
test@test-VirtualBox:~$ openclaw sandbox explain
๐ฆ OpenClaw 2026.4.23 (a979721) โ Welcome to the command line: where dreams compile and confidence segfaults.
Effective sandbox:
agentId: research-assistant
sessionKey: agent:research-assistant:main
mainSessionKey: agent:research-assistant:main
runtime: direct
mode: off scope: agent
workspaceAccess: none workspaceRoot: /home/test/.openclaw/sandboxes
Sandbox tool policy:
allow (default): exec, process, read, write, edit, apply_patch, image, sessions_list, sessions_history, sessions_send, sessions_spawn, sessions_yield, subagents, session_status
deny (default): browser, canvas, nodes, cron, gateway, feishu, googlechat, nostr, msteams, mattermost, nextcloud-talk, matrix, bluebubbles, line, zalo, zalouser, synology-chat, tlon, discord, imessage, irc, qqbot, signal, slack, telegram, twitch, whatsapp
Elevated:
enabled: true
channel: webchat
allowedByConfig: false
failing gates: allowFrom (tools.elevated.allowFrom.webchat)
Fix-it:
- tools.sandbox.tools.allow
- tools.sandbox.tools.alsoAllow
- tools.sandbox.tools.deny
- agents.list[].tools.sandbox.tools.allow
- agents.list[].tools.sandbox.tools.alsoAllow
- agents.list[].tools.sandbox.tools.deny
- tools.elevated.enabled
- tools.elevated.allowFrom.webchat
Docs: docs.openclaw.ai/sandbox
test@test-VirtualBox:~$
on or off?
Itโs off.
This line is the key:
runtime: direct
mode: off
So you do not need sandbox binds. Once you switch tools from minimal to coding, the agent should be able to read/edit outside the workspace using absolute paths.
Run:
openclaw config set tools.profile coding
openclaw config validate
openclaw gateway restart
Then test by asking it something like:
Read /home/test/some-folder/some-file.txt
Iโd avoid full unless you really want everything. coding is the safer normal choice.
whats the command to run full
To switch tools to full:
openclaw config set tools.profile full
openclaw config validate
openclaw gateway restart
Then verify:
openclaw config get tools --json
Small caution: full is broad access. Since your sandbox is off, the agent can potentially read/edit outside the workspace with absolute paths.
is it recommendable for the agent to edit its own files to apply models or manual editing is safer
Manual/CLI is safer for models/config.
Recommended order:
-
Best: use OpenClaw commands:
openclaw configureor targeted:
openclaw config set agents.list[0].model "provider/model-id" openclaw config validate openclaw gateway restart -
Okay: let the agent edit its own workspace files like:
AGENTS.md
MEMORY.md
SOUL.md
USER.md
Those are meant to be editable.
- Riskier: let the agent directly edit
~/.openclaw/openclaw.json. If you do, make it use backups + validation:cp -a ~/.openclaw ~/.openclaw.backup-$(date +%F-%H%M%S) openclaw config validate
For model choices specifically, Iโd use openclaw configure or openclaw config set, not freehand JSON edits. Less chance of breaking syntax or config shape.
Docs: https://docs.openclaw.ai/cli/config and https://docs.openclaw.ai/concepts/models
anyway to select multiple models at once in configure or have to be infividual at once
openclaw configure is mostly one interactive flow/pick at a time.
For multiple models at once, use openclaw config set with JSON.
Add multiple models to the /model allowlist:
openclaw config set agents.defaults.models '{
"provider/model-a": {},
"provider/model-b": {},
"provider/model-c": {}
}' --strict-json --merge
Set primary + fallbacks in one shot:
openclaw config set agents.defaults.model '{
"primary": "provider/model-a",
"fallbacks": ["provider/model-b", "provider/model-c"]
}' --strict-json
Then:
openclaw config validate
openclaw gateway restart
openclaw models status
For just adding fallbacks one-by-one, thereโs also:
openclaw models fallbacks add provider/model-b
openclaw models fallbacks list
openrouter's deekseek V4 doesnt show on configure's model selection
Probably because itโs new and your 2026.4.23 catalog/config picker doesnโt know it yet.
OpenRouter IDs are:
openrouter/deepseek/deepseek-v4-pro
openrouter/deepseek/deepseek-v4-flash
OpenRouter lists both V4 Pro and V4 Flash, and OpenClawโs OpenRouter refs use openrouter/<provider>/<model>. (openrouter.ai)
Add them manually:
openclaw config set agents.defaults.models '{
"openrouter/deepseek/deepseek-v4-pro": {},
DeepSeek V4 Pro is a large-scale Mixture-of-Experts model from DeepSeek with 1.6T total parameters and 49B activated parameters, supporting a 1M-token context window. $0.435 per million input tokens, $0.87 per million output tokens. 1,048,576 token context window, maximum output of 384,000 tokens. Higher uptime with 5 providers.
"openrouter/deepseek/deepseek-v4-flash": {}
}' --strict-json --merge
Set one as active for your current agent:
openclaw config set agents.list[0].model openrouter/deepseek/deepseek-v4-pro
openclaw config validate
openclaw gateway restart
Or use Flash:
openclaw config set agents.list[0].model openrouter/deepseek/deepseek-v4-flash
Also worth running later:
openclaw update
since your status showed 2026.4.26 available.
isnt there issues with openclaw update?
Yeah, youโre not wrong to be cautious.
There have been release-specific update regressions recently โ e.g. reports around 2026.4.5 CLI hangs, 2026.4.9 update completion-cache failure, and 2026.4.14 exec-tool result issues. (github.com)
For your case, I would not update just to add DeepSeek V4. Add it manually instead.
If you do update, do it safely:
cp -a ~/.openclaw ~/.openclaw.backup-$(date +%F-%H%M%S)
openclaw update --dry-run
openclaw update
openclaw doctor
openclaw gateway status
And because you had that broken xhost service issue, verify after update:
systemctl --user show openclaw-gateway.service -p ExecStartPre
Ideally ExecStartPre should be empty because of your override. If it shows xhost again, the gateway may fail the same way.
โ Update โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ โ
โ This install is not a git checkout. โ
โ Run openclaw update to update via your package manager (npm/pnpm), then rerun doctor. โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
โ
โ Archive 2 orphan transcript files in ~/.openclaw/agents/research-assistant/sessions? This only renames them to
โ *.deleted.<timestamp>.
โ โ Yes / โ No
Choose No.
Those โorphan transcript filesโ are in the research-assistant session folder โ exactly where we found your older session data. Even though it says โonly renames,โ donโt archive anything until youโve confirmed what those files contain.
After exiting doctor, inspect first:
find ~/.openclaw/agents/research-assistant/sessions -maxdepth 2 -type f -print
openclaw sessions --store ~/.openclaw/agents/research-assistant/sessions/sessions.json
If you want to be extra safe:
cp -a ~/.openclaw ~/.openclaw.backup-$(date +%F-%H%M%S)
Then we can decide whatโs safe to clean.
Runtime: running (pid 7005, state active, sub running, last exit 0, reason 0)
Warm-up: launch agents can take a few seconds. Try again shortly.
Connectivity probe: failed
Probe target: ws://127.0.0.1:18789
timeout
Capability: unknown
Port 18789 is already in use.
- pid 7005 test: openclaw-gateway (127.0.0.1:18789)
- Gateway already running locally. Stop it (openclaw gateway stop) or use a different port.
Listening: 127.0.0.1:18789
Troubles: run openclaw status
Troubleshooting: https://docs.openclaw.ai/troubleshooting
test@test-VirtualBox:~$ systemctl --user show openclaw-gateway.service -p ExecStartPre
test@test-VirtualBox:~$ find ~/.openclaw/agents/research-assistant/sessions -maxdepth 2 -type f -print
openclaw sessions --store ~/.openclaw/agents/research-assistant/sessions/sessions.json
/home/test/.openclaw/agents/research-assistant/sessions/e4eb96ed-209a-43c1-a347-c1ff12690207.jsonl.reset.2026-04-28T08-27-45.671Z
/home/test/.openclaw/agents/research-assistant/sessions/e4eb96ed-209a-43c1-a347-c1ff12690207.trajectory-path.json
/home/test/.openclaw/agents/research-assistant/sessions/e4eb96ed-209a-43c1-a347-c1ff12690207.trajectory.jsonl
/home/test/.openclaw/agents/research-assistant/sessions/sessions.json
/home/test/.openclaw/agents/research-assistant/sessions/85a5534b-ca28-4bd6-99dd-354c5c962c00.trajectory.jsonl
/home/test/.openclaw/agents/research-assistant/sessions/85a5534b-ca28-4bd6-99dd-354c5c962c00.trajectory-path.json
/home/test/.openclaw/agents/research-assistant/sessions/85a5534b-ca28-4bd6-99dd-354c5c962c00.jsonl
๐ฆ OpenClaw 2026.4.26 (be8c246) โ I don't sleep, I just enter low-power mode and dream of clean diffs.
Session store: /home/test/.openclaw/agents/research-assistant/sessions/sessions.json
Sessions listed: 1
Kind Key Age Model Tokens (ctx %) Flags
direct agent:research-a...t:main 16m ago gemini-3-flash-preview 14k/200k (7%) system id:85a5534b-ca28-4bd6-99dd-354c5c962c00
Good news: update succeeded โ youโre now on 2026.4.26.
The important bit is this file:
/home/test/.openclaw/agents/research-assistant/sessions/e4eb96ed-209a-43c1-a347-c1ff12690207.jsonl.reset.2026-04-28T08-27-45.671Z
That is your previous session transcript archive. It was reset/rotated, not deleted. The current active session is now:
85a5534b-ca28-4bd6-99dd-354c5c962c00.jsonl
So openclaw sessions only shows the new/current session, while the older context is sitting in the .jsonl.reset... file.
To preserve the useful โmemoryโ from the previous session, ask the agent:
Read /home/test/.openclaw/agents/research-assistant/sessions/e4eb96ed-209a-43c1-a347-c1ff12690207.jsonl.reset.2026-04-28T08-27-45.671Z and summarize the durable facts into /home/test/.openclaw/workspace/MEMORY.md.
If file tools are still missing, set tools first:
openclaw config set tools.profile full
openclaw config validate
openclaw gateway restart
Also: if doctor asks to archive orphan transcripts again, pick No until youโre done extracting anything useful from that reset file.
Models in /model picker (multi-select)
โ
โ Search: _
โ โผ openrouter/google/gemini-3-flash-preview
โ โผ openrouter/anthropic/claude-opus-4.6
โ โผ openrouter/anthropic/claude-sonnet-4.6
โ โผ openrouter/google/gemini-2.5-flash-lite
โ โผ openrouter/anthropic/claude-3-haiku (configured)
โ โ/โ to navigate โข Tab: select โข Enter: confirm โข Type: to search
โ
only ehse show up in configure
Yep โ that picker is only showing your current configured allowlist.
Add DeepSeek V4 to the allowlist manually, then it should show up:
openclaw config set agents.defaults.models '{
"openrouter/deepseek/deepseek-v4-pro": {},
"openrouter/deepseek/deepseek-v4-flash": {}
}' --strict-json --merge
openclaw config validate
openclaw gateway restart
Then re-open configure / /model.
If you want to set one immediately:
openclaw config set agents.list[0].model openrouter/deepseek/deepseek-v4-pro
openclaw config validate
openclaw gateway restart
OpenRouter currently lists the model IDs as deepseek/deepseek-v4-pro and deepseek/deepseek-v4-flash; in OpenClaw, prefix those with openrouter/. (openrouter.ai)
DeepSeek V4 Pro is a large-scale Mixture-of-Experts model from DeepSeek with 1.6T total parameters and 49B activated parameters, supporting a 1M-token context window. $0.435 per million input tokens, $0.87 per million output tokens. 1,048,576 token context window, maximum output of 384,000 tokens. Higher uptime with 5 providers.
tru again
[assistant turn failed before producing content]
tru again
[assistant turn failed before producing content]
tru again
connected | idle
agent research-assistant (Research Assistant) | session main (openclaw-tui) | openrouter/google/gemini-3-flash-preview |
think medium | tokens 14k/200k (7%)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
That message means the model request failed before any assistant text streamed back. Since your footer shows:
openrouter/google/gemini-3-flash-preview
itโs probably a provider/model/API error, not the TUI itself.
First grab the real error:
openclaw logs --lines 120
If that doesnโt show it:
tail -n 200 /tmp/openclaw/openclaw-2026-04-28.log
journalctl --user -u openclaw-gateway.service -n 200 --no-pager
Quick workaround: switch to one of the configured Anthropic/OpenRouter models in the TUI:
/model
Pick openrouter/anthropic/claude-sonnet-4.6 or another configured model, then try again.
Also check auth/model resolution:
openclaw models status
openclaw config get agents.defaults.model --json
openclaw config get agents.list --json
Paste the log error line if it still fails โ thatโll tell us whether itโs missing OpenRouter auth, model unavailable, context issue, or provider error.
est@test-VirtualBox:~$ openclaw logs --lines 120
error: unknown option '--lines'
[1]+ Exit 127 nohup /home/test/.openclaw/workspace/scripts/auto_spawn_ui.sh > /dev/null 2>&1
test@test-VirtualBox:~$ openclaw logs --lines 120
error: unknown option '--lines'
[1]+ Exit 127 nohup /home/test/.openclaw/workspace/scripts/auto_spawn_ui.sh > /dev/null 2>&1
test@test-VirtualBox:~$ ^[[200~tail -n 200 /tmp/openclaw/openclaw-2026-04-28.log
tail: command not found
test@test-VirtualBox:~$ journalctl --user -u openclaw-gateway.service -n 200 --no-pager~
journalctl: unrecognized option '--no-pager~'
test@test-VirtualBox:~$
i have already tried 3 other models
Yep โ two things happened there:
- Correct flag is
--limit, not--lines. - Your paste inserted junk chars: `^
odel-fallback/decision {"subsystem":"model-fallback/decision"} {"event":"model_fallback_decision","tags":["error_handling","model_fallback","candidate_failed"],"runId":"73f3c034-abfb-482b-8513-c9bddca55fa4","decision":"candidate_failed","requestedProvider":"openrouter","requestedModel":"google/gemini-3-flash-preview","candidateProvider":"openrouter","candidateModel":"openrouter/auto","attempt":6,"total":6,"reason":"auth","status":401,"errorPreview":"401 User not found.","errorHash":"sha256:2cdeca109031","fallbackStepType":"fallback_step","fallbackStepFromModel":"openrouter/openrouter/auto","fallbackStepFromFailureReason":"auth","fallbackStepFromFailureDetail":"401 User not found.","fallbackStepChainPosition":6,"fallbackStepFinalOutcome":"chain_exhausted","isPrimary":false,"requestedModelMatched":false,"fallbackConfigured":true} model fallback decision
09:09:45+00:00 error Followup agent failed before reply: All models failed (6): openrouter/google/gemini-3-flash-preview: 401 User not found. (auth) | openrouter/anthropic/claude-opus-4.6: 401 User not found. (auth) | openrouter/anthropic/claude-sonnet-4.6: 401 User not found. (auth) | openrouter/google/gemini-2.5-flash-lite: 401 User not found. (auth) | openrouter/anthropic/claude-3-haiku: 401 User not found. (auth) | openrouter/openrouter/auto: 401 User not found. (auth) | HTTP 401: User not found.
Yep, that log is decisive:
401 User not found. (auth)
All models failed...
So itโs not the model. Your OpenRouter auth/key is bad, revoked, from the wrong account, or OpenClaw is picking up a stale key.
Fix OpenRouter auth:
openclaw models status
openclaw models auth login --provider openrouter --set-default
openclaw gateway restart
If that command doesnโt offer API-key login, use:
openclaw models auth add
Pick OpenRouter and paste a fresh key from OpenRouter.
If it still says 401 User not found, you likely have an old key shadowing the new one. Check where OpenRouter auth exists, but donโt paste the key publicly:
find ~/.openclaw -type f \( -name auth-profiles.json -o -name auth.json -o -name openclaw.json -o -name .env \) -print
Then inspect/remove stale OpenRouter entries, especially old legacy files like:
~/.openclaw/agents/research-assistant/agent/auth.json
~/.openclaw/agents/main/agent/auth.json
After fixing auth:
openclaw models status
openclaw gateway restart
The [assistant turn failed before producing content] should disappear once OpenRouter auth is valid.
test@test-VirtualBox:~$ find ~/.openclaw -type f ( -name auth-profiles.json -o -name auth.json -o -name openclaw.json -o -name .env ) -print
/home/test/.openclaw/openclaw.json
/home/test/.openclaw/agents/research-assistant/agent/auth-profiles.json
/home/test/.openclaw/agents/main/agent/auth-profiles.json
test@test-VirtualBox:~$ ~/.openclaw/agents/research-assistant/agent/auth.json
so i go to hese files and paste my new api key in the old ones
No โ donโt paste keys directly into random files if you can avoid it.
Use the CLI so it writes the correct format to the correct agent auth store:
openclaw models auth --agent research-assistant login --provider openrouter --set-default
If that doesnโt prompt for an API key, use the interactive helper:
openclaw models auth --agent research-assistant add
Pick OpenRouter, paste the new key there.
Then verify:
openclaw models status --agent research-assistant
openclaw gateway restart
Also, this path does not exist:
~/.openclaw/agents/research-assistant/agent/auth.json
Your find only found:
~/.openclaw/agents/research-assistant/agent/auth-profiles.json
~/.openclaw/agents/main/agent/auth-profiles.json
So if anything is stale, itโs in auth-profiles.json, but let openclaw models auth ... update it safely.
test@test-VirtualBox:~$ openclaw models status --agent research-assistant
openclaw gateway restart
๐ฆ OpenClaw 2026.4.26 (be8c246) โ I don't have opinions about tabs vs spaces. I have opinions about everything else.
Config : ~/.openclaw/openclaw.json
Agent dir : ~/.openclaw/agents/research-assistant/agent
Default (agent): openrouter/deepseek/deepseek-v4-pro
Fallbacks (5) (defaults): openrouter/google/gemini-3-flash-preview, openrouter/anthropic/claude-opus-4.6, openrouter/anthropic/claude-sonnet-4.6, openrouter/google/gemini-2.5-flash-lite, openrouter/anthropic/claude-3-haiku
Image model (defaults): -
Image fallbacks (0) (defaults): -
Aliases (1) : OpenRouter -> openrouter/auto
Configured models (8): openrouter/google/gemini-3-flash-preview, openrouter/anthropic/claude-opus-4.6, openrouter/anthropic/claude-sonnet-4.6, openrouter/google/gemini-2.5-flash-lite, openrouter/anthropic/claude-3-haiku, openrouter/deepseek/deepseek-v4-pro, openrouter/deepseek/deepseek-v4-flash, openrouter/auto
Auth overview
Auth store : ~/.openclaw/agents/research-assistant/agent/auth-profiles.json
Shell env : off
Providers w/ OAuth/tokens (0): -
- openrouter effective=profiles:~/.openclaw/agents/main/agent/auth-profiles.json | profiles=1 (oauth=0, token=0, api_key=1) | openrouter:default=sk-or-v1.48 | models.json=sk-or-v1...ee61d | source=models.json: ~/.openclaw/agents/research-assistant/agent/models.json
OAuth/token status
- none
๐ฆ OpenClaw 2026.4.26 (be8c246) โ If it's repetitive, I'll automate it; if it's hard, I'll bring jokes and a rollback plan.
what does shell env mean, is it sandbox?
No โ Shell env is not sandbox.
Shell env: off means OpenClaw is not importing API keys from your terminal shell environment like:
OPENROUTER_API_KEY=...
So itโs using stored config/auth files instead. In your output, OpenRouter auth is coming from:
~/.openclaw/agents/main/agent/auth-profiles.json
and also:
~/.openclaw/agents/research-assistant/agent/models.json
Sandbox is separate. Yours was:
runtime: direct
mode: off
So sandbox is off.
One thing I notice: for research-assistant, the effective OpenRouter key is coming from the main agentโs auth-profiles.json, not the research-assistant auth store. That might be okay, but if you just updated the key for the wrong agent, update this one explicitly:
openclaw models auth --agent research-assistant add
Pick OpenRouter and paste the fresh key.
Then:
openclaw models status --agent research-assistant
openclaw gateway restart
test@test-VirtualBox:~$ openclaw models auth --agent research-assistant add
๐ฆ OpenClaw 2026.4.26 (be8c246) โ I'll refactor your busywork like it owes me money.
โ
โ Token provider
โ โ anthropic (Docs: /providers/models)
โ โ custom (type provider id)
โ
what should i say for custom provider id
Choose custom, then type:
openrouter
If it asks for profile/name, use:
default
Then paste your OpenRouter API key.
Afterward run:
openclaw models status --agent research-assistant
openclaw gateway restart
If it still prefers the old key from main, weโll clear/reorder the OpenRouter auth source next.
it asks fr profile id
Use:
default
That should create/update:
openrouter:default
Then paste the API key when prompted.
deepseek/deepseek-v4-flash is temporarily rate-limited upstream. Please retry shortly, or add your own key to accumulate your rate limits: https://openrouter.ai/settings/integrations
429 Provider returned error
deepseek/deepseek-v4-flash is temporarily rate-limited upstream. Please retry shortly, or add your own key to accumulate your rate limits: https://openrouter.ai/settings/integrations
429 Provider returned error
deepseek/deepseek-v4-flash is temporarily rate-limited upstream. Please retry shortly, or add your own key to accumulate your rate limits: https://openrouter.ai/settings/integrations
connected | idle
agent research-assistant (Research Assistant) | session main (openclaw-tui) | openrouter/anthropic/claude-3-haiku | tokens 31k/200k (15%)
Good โ auth is fixed now. This is a different issue:
429 Provider returned error
deepseek-v4-flash is temporarily rate-limited upstream
That means OpenRouter can reach your account/key, but DeepSeekโs upstream route is rate-limited.
Options:
- Use another configured model for now
Pick/modelopenrouter/anthropic/claude-3-haikuor Sonnet/Opus.
-
Set DeepSeek Pro instead of Flash:
openclaw config set agents.list[0].model openrouter/deepseek/deepseek-v4-pro openclaw config validate openclaw gateway restart -
Add your own DeepSeek provider key in OpenRouter integrations if you have one. Thatโs what the message is suggesting โ it can give you separate provider-side quota.
Also, if you donโt want it repeatedly trying Flash as fallback, remove it from fallbacks or donโt select it as primary.
i have switched to claud 3 haiku but it is still saying deepseek
That usually means DeepSeek is still in the fallback chain or pinned as the agent default, even if the TUI footer now shows Haiku.
Check:
openclaw models status --agent research-assistant
openclaw config get agents.list --json
openclaw config get agents.defaults.model --json
To force the agent default to Haiku and clear DeepSeek from the fallback path:
openclaw config set agents.list[0].model openrouter/anthropic/claude-3-haiku
openclaw config set agents.defaults.model '{
"primary": "openrouter/anthropic/claude-3-haiku",
"fallbacks": [
"openrouter/anthropic/claude-sonnet-4.6",
"openrouter/google/gemini-3-flash-preview"
]
}' --strict-json
openclaw config validate
openclaw gateway restart
Then in TUI, start a clean test session so old session-pinned model state doesnโt confuse things:
/session debug-haiku
/model openrouter/anthropic/claude-3-haiku
Then try a simple hi.
openclaw tui slow loading, is that a problem you can fix or is it just like that
Some slowness is normal, but yours is probably fixable/tunable.
Your session is already ~31k tokens, and TUI loads history by default. Quick fixes:
openclaw --history-limit 50
or for a clean/fast session in TUI:
/session debug-fast
If the current session has lots of useful context but is getting heavy, compact it:
/compact
If youโre done with that topic, start fresh instead:
/new
Other things that made it slow today: the Gateway restart/update, OpenRouter 429 retries, and model fallback attempts. Once auth/rate-limit issues are settled, it should feel better.
if prompt reasoning goes for too long, how do i verify it is still running
Use these checks:
openclaw status
openclaw gateway status
openclaw logs --follow --plain
In another terminal, you can also watch the process:
ps -fp $(pgrep -f openclaw-gateway | head -n1)
For TUI specifically:
- Footer says
running/streamingโ still active
- Footer says
idleโ no active turn - If stuck, press
Esc/ use abort in TUI, or run:openclaw gateway restart
For logs without follow:
openclaw logs --limit 100 --plain
Look for model request/fallback lines, token streaming, or final errors like 429, 401, timeout, etc.
how to delete sonnet 4.6 as a fallback
Run:
openclaw models fallbacks remove openrouter/anthropic/claude-sonnet-4.6
openclaw models fallbacks list
openclaw config validate
openclaw gateway restart
That removes it from the fallback chain.
If you also want to remove it from the /model picker allowlist, thatโs separate. First check:
openclaw config get agents.defaults.models --json
But donโt remove it from the allowlist unless youโre sure โ fallback removal is enough to stop auto-trying it.
how do i do multi-model add selecet without going through entire fongi setup where i have to manually add models and pai keyu
Yep โ skip the whole configure flow and just edit the model allowlist/fallbacks with config set.
Add multiple models to picker/allowlist
openclaw config set agents.defaults.models '{
"openrouter/deepseek/deepseek-v4-pro": {},
"openrouter/deepseek/deepseek-v4-flash": {},
"openrouter/anthropic/claude-3-haiku": {},
"openrouter/google/gemini-3-flash-preview": {}
}' --strict-json --merge
Set primary + fallbacks at once
openclaw config set agents.defaults.model '{
"primary": "openrouter/anthropic/claude-3-haiku",
"fallbacks": [
"openrouter/google/gemini-3-flash-preview",
"openrouter/deepseek/deepseek-v4-pro"
]
}' --strict-json
If your agent has its own model override, set that too
openclaw config set agents.list[0].model '{
"primary": "openrouter/anthropic/claude-3-haiku",
"fallbacks": [
"openrouter/google/gemini-3-flash-preview",
"openrouter/deepseek/deepseek-v4-pro"
]
}' --strict-json
Then:
openclaw config validate
openclaw gateway restart
openclaw models status --agent research-assistant
This does not touch API keys. It only changes model selection/config.
GPT-5.5
Claude Opus 4.7
Gemini 3.1 Pro
GPT-5.4
GPT-5.2
Claude Sonnet 4.6
Kimi K2.6
DeepSeek V3.2
Grok 4.1
Gemini 2.5 Flash
Claude Haiku 4.5
Qwen 3.5 9B
Grok 3 Mini
DeepSeek V4-Flash
GPT-5 Nano
Llama 4 Scout
Llama 4 Maverick
DeepSeek V4
Gemma 3n E4B
can you find the openrouter ids for all of these and get the allowlist command i have to paste to get it please
Yep โ I checked the live OpenRouter catalog. OpenClaw wants OpenRouter refs as openrouter/<provider>/<model>, while OpenRouterโs API model IDs are the inner <provider>/<model> part. (docs.openclaw.ai)
Paste this:
openclaw config set agents.defaults.models '{
"openrouter/openai/gpt-5.5": {},
"openrouter/anthropic/claude-opus-4.7": {},
"openrouter/google/gemini-3.1-pro-preview": {},
"openrouter/openai/gpt-5.4": {},
"openrouter/openai/gpt-5.2": {},
"openrouter/anthropic/claude-sonnet-4.6": {},
"openrouter/moonshotai/kimi-k2.6": {},
"openrouter/deepseek/deepseek-v3.2": {},
"openrouter/x-ai/grok-4.1-fast": {},
"openrouter/google/gemini-2.5-flash": {},
"openrouter/anthropic/claude-haiku-4.5": {},
"openrouter/qwen/qwen3.5-9b": {},
"openrouter/x-ai/grok-3-mini": {},
"openrouter/deepseek/deepseek-v4-flash": {},
"openrouter/openai/gpt-5-nano": {},
"openrouter/meta-llama/llama-4-scout": {},
"openrouter/meta-llama/llama-4-maverick": {},
"openrouter/deepseek/deepseek-v4-pro": {},
"openrouter/google/gemma-3n-e4b-it": {}
}' --strict-json --merge
openclaw config validate
openclaw gateway restart
Notes:
- I mapped DeepSeek V4 to
deepseek-v4-prosince you also listed V4-Flash separately. - I mapped Grok 4.1 to
grok-4.1-fast; thatโs the available OpenRouter ID I found. - This only updates the model picker/allowlist. It does not touch API keys or fallbacks.
Install failed: session-logs โ brew not installed โ Homebrew is not installed. Install it from https://brew.sh or install "jq" manually using your system package manager โฆ
Tip: run openclaw doctor to review skills + requirements.
Docs: https://docs.openclaw.ai/skills
โ
โ Install failed: summarize โ brew not installed โ Homebrew is not installed. Install it from https://brew.sh or install "steipete/tap/summarize" manually using your sysโฆ
Tip: run openclaw doctor to review skills + requirements.
Docs: https://docs.openclaw.ai/skills
โ
โ Install failed: obsidian โ brew not installed โ Homebrew is not installed. Install it from https://brew.sh or install "yakitrak/yakitrak/obsidian-cli" manually using โฆ
Tip: run openclaw doctor to review skills + requirements.
Docs: https://docs.openclaw.ai/skills
โ
โ Install failed: gemini โ brew not installed โ Homebrew is not installed. Install it from https://brew.sh or install "gemini-cli" manually using your system package โฆ
Tip: run openclaw doctor to review skills + requirements.
Docs: https://docs.openclaw.ai/skills
โ
โ Install failed: nano-pdf โ uv not installed โ install manually: https://docs.astral.sh/uv/getting-started/installation/
Tip: run openclaw doctor to review skills + requirements.
Docs: https://docs.openclaw.ai/skills
โ
โ Install failed: github โ brew not installed โ Homebrew is not installed. Install it from https://brew.sh or install "gh" manually using your system package manager โฆ
Tip: run openclaw doctor to review skills + requirements.
Docs: https://docs.openclaw.ai/skills
Those are optional skill dependency installs, not OpenClaw core breaking.
On Linux, a bunch of skills still prefer Homebrew installers. If you donโt need those skills, you can ignore them or disable/narrow skills. Your agent will still work.
Useful checks:
openclaw skills check
openclaw skills list --eligible
If you want the common Linux deps, install them manually with your package manager, e.g. Ubuntu/Debian:
sudo apt update
sudo apt install -y jq ripgrep gh
npm install -g @google/gemini-cli
For nano-pdf, install uv first, then:
uv tool install nano-pdf
For summarize and obsidian, either install Linuxbrew or skip/disable those skills unless you specifically need them.
To disable noisy skills explicitly:
openclaw config set skills.entries.summarize.enabled false --strict-json
openclaw config set skills.entries.obsidian.enabled false --strict-json
openclaw config set skills.entries.nano-pdf.enabled false --strict-json
openclaw config validate
openclaw gateway restart
Docs: https://docs.openclaw.ai/tools/skills and https://docs.openclaw.ai/tools/skills-config
test@test-VirtualBox:~$ openclaw tui
๐ฆ OpenClaw 2026.4.26 (be8c246) โ Shell yeahโI'm here to pinch the toil and leave you the glory.
openclaw tui - ws://127.0.0.1:18789 - agent research-assistant - session main
connecting | idle
gateway disconnected: closed | idle
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
gateway connect failed: Error: gateway closed (1000):
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
That closed (1000) is a clean close, so usually either auth/token mismatch, gateway restarted/closed during startup, or the TUI got rejected before it could attach.
Run these:
openclaw gateway status
openclaw status --all
openclaw logs --limit 120 --plain
Then try TUI with a small history load:
openclaw tui --history-limit 20
If it still closes, check auth mode/token state:
openclaw config get gateway.auth.mode
openclaw config get gateway.auth.token
If token auth is enabled and TUI isnโt picking it up, launch with the token explicitly:
openclaw tui --token "$(openclaw config get gateway.auth.token)"
Also, since youโve been restarting/updating a lot, one clean restart is fine:
openclaw gateway restart
sleep 10
openclaw gateway status
openclaw tui --history-limit 20
make command for meta-llama/llama-4-scout to isntall as default and add to models list
Use the OpenRouter-prefixed ID:
openclaw config set agents.defaults.models '{
"openrouter/meta-llama/llama-4-scout": {}
}' --strict-json --merge
openclaw config set agents.list[0].model openrouter/meta-llama/llama-4-scout
openclaw config validate
openclaw gateway restart
openclaw models status --agent research-assistant
That adds it to the model list and sets it as the default for your current agent.
try again
run error: HTTP 401: User not found.
connected | error
agent research-assistant (Research Assistant) | session main (openclaw-tui) | openrouter/google/gemini-3-flash-preview | think high | tokens 48k/1.0m (5%)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Thatโs still OpenRouter auth, not the model.
Also your TUI footer still shows:
openrouter/google/gemini-3-flash-preview
so it didnโt switch to Llama in that session yet. But 401 User not found would happen on any OpenRouter model if the key source is stale/bad.
Your earlier status showed OpenRouter auth coming from models.json, so clear that stale generated key source safely:
cp -a ~/.openclaw ~/.openclaw.backup-$(date +%F-%H%M%S)
mv ~/.openclaw/agents/research-assistant/agent/models.json \
~/.openclaw/agents/research-assistant/agent/models.json.bak-$(date +%F-%H%M%S) 2>/dev/null || true
openclaw models auth --agent research-assistant add
# custom -> openrouter -> profile id default -> paste fresh OpenRouter key
openclaw models status --agent research-assistant --probe
openclaw gateway restart
Then switch the active TUI session explicitly:
/model openrouter/meta-llama/llama-4-scout
or start fresh:
/session llama-test
/model openrouter/meta-llama/llama-4-scout
If --probe still says 401 User not found, the pasted OpenRouter key itself is invalid/revoked/wrong account.
๐ฆ OpenClaw 2026.4.26 (be8c246) โ I autocomplete your thoughtsโjust slower and with more API calls.
โ
โ Token provider
โ custom (type provider id)
โ
โ Provider id
โ openrouter
โ
โ Profile id
โ openrouter:default
โ
โ Does this token expire?
โ No
โ
โ Paste token for openrouter
โ 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
Error: ENOSPC: no space left on device, write
test@test-VirtualBox:~$
Stop there โ you pasted the OpenRouter key publicly. Revoke that key now in OpenRouter and create a new one. Donโt reuse this key.
The actual error is:
ENOSPC: no space left on device
Your VM disk is full, so OpenClaw couldnโt save the token.
Run:
df -h
df -ih
du -h -d1 ~/.openclaw /tmp 2>/dev/null | sort -h
Quick safe cleanup options:
journalctl --user --vacuum-size=100M
rm -rf /tmp/openclaw/*
If ~/.openclaw is huge, check sessions/logs:
du -h -d2 ~/.openclaw | sort -h | tail -30
After freeing space, generate a fresh OpenRouter key, then rerun:
openclaw models auth --agent research-assistant add
Use:
- provider id:
openrouter - profile id:
defaultโ notopenrouter:default; OpenClaw will make that full id itself.
think failed: GatewayClientRequestError: Error: ENOSPC: no space left on device, write: code=ENOSPC
Yep โ disk is full. OpenClaw canโt write session/auth/log files, so turns will fail until you free space.
Run:
df -h
du -h -d1 ~ ~/.openclaw /tmp 2>/dev/null | sort -h | tail -40
Quick safe cleanup:
journalctl --user --vacuum-size=100M
rm -rf /tmp/openclaw/*
Then check OpenClaw-heavy folders:
du -h -d2 ~/.openclaw | sort -h | tail -40
If sessions/logs are huge, you can compress backup first:
tar -czf ~/openclaw-sessions-backup-$(date +%F-%H%M%S).tgz ~/.openclaw/agents/*/sessions
Then use OpenClawโs cleanup dry-run before deleting anything:
openclaw sessions cleanup --all-agents --dry-run
Also: revoke the OpenRouter key you pasted earlier, then create a fresh key after disk space is fixed.
test@test-VirtualBox:~$ openclaw gateway run
๐ฆ OpenClaw 2026.4.26 (be8c246)
I can run local, remote, or purely on vibesโresults may vary with DNS.
โ
โ
21:30:45 [gateway] loading configurationโฆ
21:30:45 [gateway] resolving authenticationโฆ
21:30:45 [gateway] starting...
stuck on gateway starting now
Most likely still the same root cause: disk full (ENOSPC), or you now have two gateways fighting for port 18789 because the systemd service may already be running.
In another terminal, run:
df -h
ss -ltnp | grep 18789 || true
openclaw gateway status
If port is already used by openclaw-gateway, stop the foreground one with Ctrl+C and use the service:
openclaw gateway restart
openclaw gateway status
If disk is full, fix that first:
journalctl --user --vacuum-size=100M
rm -rf /tmp/openclaw/*
du -h -d2 ~/.openclaw | sort -h | tail -40
Also donโt keep openclaw gateway run open if the service is installed โ thatโs for foreground/manual running. For your setup, prefer:
openclaw gateway restart
openclaw gateway status
test@test-VirtualBox:~$ df -h
ss -ltnp | grep 18789 || true
openclaw gateway status
Filesystem Size Used Avail Use% Mounted on
tmpfs 794M 1.5M 793M 1% /run
/dev/sda3 99G 48G 47G 51% /
tmpfs 3.9G 0 3.9G 0% /dev/shm
tmpfs 5.0M 8.0K 5.0M 1% /run/lock
/dev/sda2 512M 6.2M 506M 2% /boot/efi
tmpfs 794M 220K 794M 1% /run/user/1000
Virtual_Box_Shared_Folder_Cinnamon_test_1-_temp 450G 361G 90G 81% /media/sf_Virtual_Box_Shared_Folder_Cinnamon_test_1-_temp
/dev/sr0 51M 51M 0 100% /media/test/VBox_GAs_7.2.82
[1]+ Exit 127 nohup /home/test/.openclaw/workspace/scripts/auto_spawn_ui.sh > /dev/null 2>&1
๐ฆ OpenClaw 2026.4.26 (be8c246) โ Alexa, but with taste.
โ
โ
Service: systemd (enabled)
File logs: /tmp/openclaw/openclaw-2026-04-28.log
Command: /usr/bin/node /home/test/.npm-global/lib/node_modules/openclaw/dist/index.js gateway --port 18789
Service file: ~/.config/systemd/user/openclaw-gateway.service
Service env: OPENCLAW_GATEWAY_PORT=18789
Config (cli): ~/.openclaw/openclaw.json
Config (service): ~/.openclaw/openclaw.json
Gateway: bind=loopback (127.0.0.1), port=18789 (service args)
Probe target: ws://127.0.0.1:18789
Dashboard: http://127.0.0.1:18789/
Probe note: Loopback-only gateway; only local clients can connect.
Runtime: running (pid 1255, state active, sub running, last exit 0, reason 0)
Warm-up: launch agents can take a few seconds. Try again shortly.
Connectivity probe: failed
Probe target: ws://127.0.0.1:18789
connect ECONNREFUSED 127.0.0.1:18789
Capability: unknown
Disk looks fine now โ root has 47G free. So this is not ENOSPC anymore.
Current problem:
Runtime: running pid 1255
Connectivity probe: ECONNREFUSED
Meaning the systemd process exists, but Gateway has not opened port 18789.
Run:
ps -fp 1255
journalctl --user -u openclaw-gateway.service -n 200 --no-pager
/usr/bin/tail -n 200 /tmp/openclaw/openclaw-2026-04-28.log 2>&1
/usr/bin/tail -n 200 ~/.openclaw/logs/gateway-restart.log 2>&1
If you still have the foreground openclaw gateway run stuck in another terminal, press Ctrl+C there. Then restart only the service:
systemctl --user reset-failed openclaw-gateway.service
openclaw gateway restart
sleep 10
openclaw gateway status
Also that line:
auto_spawn_ui.sh Exit 127
means a startup script is failing with โcommand not found.โ It may not be the gateway blocker, but we should inspect it later:
cat ~/.openclaw/workspace/scripts/auto_spawn_ui.sh
est@test-VirtualBox:~$ cat ~/.openclaw/workspace/scripts/auto_spawn_ui.sh
cat: /home/test/.openclaw/workspace/scripts/auto_spawn_ui.sh: No such file or directory
That explains the Exit 127 line:
nohup ~/.openclaw/workspace/scripts/auto_spawn_ui.sh ...
127 = command/file not found. Since the script doesnโt exist, something is trying to auto-run a missing script.
Itโs probably not the main gateway blocker, but you can find where itโs referenced:
grep -R "auto_spawn_ui.sh" ~/.bashrc ~/.profile ~/.config ~/.openclaw 2>/dev/null
If it shows a line in ~/.bashrc / ~/.profile, remove or comment that line.
For the gateway issue, still run:
ps -fp 1255
journalctl --user -u openclaw-gateway.service -n 200 --no-pager
/usr/bin/tail -n 200 /tmp/openclaw/openclaw-2026-04-28.log 2>&1
/usr/bin/tail -n 200 ~/.openclaw/logs/gateway-restart.log 2>&1
The missing auto_spawn_ui.sh is cleanup; the logs above will show why the service process exists but isnโt listening on 18789.
what do i do after that
After the grep, do this:
If it prints a file + line containing auto_spawn_ui.sh
Example:
/home/test/.bashrc: nohup /home/test/.openclaw/workspace/scripts/auto_spawn_ui.sh ...
Open that file and remove/comment that line:
nano ~/.bashrc
Put # in front of the auto_spawn_ui.sh line, save, then:
source ~/.bashrc
If grep prints nothing
Ignore the auto_spawn_ui.sh error for now. Itโs not the main gateway issue.
Then continue with the real gateway check:
ps -fp 1255
journalctl --user -u openclaw-gateway.service -n 200 --no-pager
/usr/bin/tail -n 200 /tmp/openclaw/openclaw-2026-04-28.log 2>&1
/usr/bin/tail -n 200 ~/.openclaw/logs/gateway-restart.log 2>&1
After that, restart cleanly:
systemctl --user reset-failed openclaw-gateway.service
openclaw gateway restart
sleep 10
openclaw gateway status
Paste the first error-looking lines from the journal/log output if it still isnโt listening.
D6VW2Y3e.js:149","method":"console.error"}},"time":"2026-04-28T21:36:21.697+10:00","hostname":"test-VirtualBox","message":"Gateway restart timed out after 60s waiting for health checks."}
{"0":"Tip: openclaw gateway status --deep","_meta":{"runtime":"node","runtimeVersion":"24.14.1","hostname":"unknown","name":"openclaw","date":"2026-04-28T11:36:21.704Z","logLevelId":3,"logLevelName":"INFO","path":{"fullFilePath":"file:///home/test/.npm-global/lib/node_modules/openclaw/dist/console-D6VW2Y3e.js:147:46","fileName":"console-D6VW2Y3e.js","fileNameWithLine":"console-D6VW2Y3e.js:147","fileColumn":"46","fileLine":"147","filePath":".npm-global/lib/node_modules/openclaw/dist/console-D6VW2Y3e.js","filePathWithLine":".npm-global/lib/node_modules/openclaw/dist/console-D6VW2Y3e.js:147","method":"console.log"}},"time":"2026-04-28T21:36:21.710+10:00","hostname":"test-VirtualBox","message":"Tip: openclaw gateway status --deep"}
{"0":"Tip: openclaw doctor","_meta":{"runtime":"node","runtimeVersion":"24.14.1","hostname":"unknown","name":"openclaw","date":"2026-04-28T11:36:21.718Z","logLevelId":3,"logLevelName":"INFO","path":{"fullFilePath":"file:///home/test/.npm-global/lib/node_modules/openclaw/dist/console-D6VW2Y3e.js:147:46","fileName":"console-D6VW2Y3e.js","fileNameWithLine":"console-D6VW2Y3e.js:147","fileColumn":"46","fileLine":"147","filePath":".npm-global/lib/node_modules/openclaw/dist/console-D6VW2Y3e.js","filePathWithLine":".npm-global/lib/node_modules/openclaw/dist/console-D6VW2Y3e.js:147","method":"console.log"}},"time":"2026-04-28T21:36:21.720+10:00","hostname":"test-VirtualBox","message":"Tip: openclaw doctor"}
[2026-04-28T08:55:19Z] openclaw restart attempt source=update target=openclaw-gateway.service
[2026-04-28T08:55:19Z] openclaw restart done source=update
test@test-VirtualBox:~$
That only says the restart health check timed out โ not the real startup error. Next, run the deep status and journal:
openclaw gateway status --deep
journalctl --user -u openclaw-gateway.service -n 250 --no-pager
Also run this to make sure the old xhost problem didnโt come back after update:
systemctl --user cat openclaw-gateway.service
systemctl --user show openclaw-gateway.service -p ExecStartPre -p ExecStart
If you see ExecStartPre=/usr/bin/xhost +local:test again, reapply the override:
mkdir -p ~/.config/systemd/user/openclaw-gateway.service.d
cat > ~/.config/systemd/user/openclaw-gateway.service.d/no-xhost.conf <<'EOF'
[Service]
ExecStartPre=
EOF
systemctl --user daemon-reload
systemctl --user reset-failed openclaw-gateway.service
openclaw gateway restart
If thereโs no xhost line, paste the deep status/journal error lines โ thatโs where the actual blocker will be.
[Service]
ExecStart=/usr/bin/node /home/test/.npm-global/lib/node_modules/openclaw/dist/index.js gateway --port 18789
Restart=always
RestartSec=5
RestartPreventExitStatus=78
TimeoutStopSec=30
TimeoutStartSec=30
SuccessExitStatus=0 143
KillMode=control-group
Environment=DISPLAY=:0
Environment=XAUTHORITY=/home/test/.Xauthority
Environment=HOME=/home/test
Environment=TMPDIR=/tmp
Environment=NODE_EXTRA_CA_CERTS=/etc/ssl/certs/ca-certificates.crt
Environment=PATH=/usr/bin:/home/test/.nvm/current/bin:/home/test/.local/bin:/home/test/.npm-global/bin:/home/test/bin:/home/test/.volta/bin:/home/test/.asdf/shims:/home/test/.bun/bin:/home/test/.nix-profile/bin:/home/test/.local/share/fn>
Environment=OPENCLAW_GATEWAY_PORT=18789
Environment=OPENCLAW_SYSTEMD_UNIT=openclaw-gateway.service
Environment="OPENCLAW_WINDOWS_TASK_NAME=OpenClaw Gateway"
Environment=OPENCLAW_SERVICE_MARKER=openclaw
Environment=OPENCLAW_SERVICE_KIND=gateway
Environment=OPENCLAW_SERVICE_VERSION=2026.4.26
Good โ the old xhost blocker is not back. Thereโs no ExecStartPre= line now.
Next step is to find where Gateway is hanging during startup. Do this clean isolation run:
openclaw gateway stop
sleep 3
OPENCLAW_GATEWAY_STARTUP_TRACE=1 \
OPENCLAW_LOG_LEVEL=debug \
openclaw gateway run --verbose 2>&1 | tee ~/openclaw-gateway-debug.log
Let it sit ~60 seconds. If it still stops at starting..., press Ctrl+C, then paste:
tail -n 120 ~/openclaw-gateway-debug.log
Also run:
journalctl --user -u openclaw-gateway.service -n 250 --no-pager
openclaw gateway status --deep
If the trace hangs before โready,โ the last startup trace line will tell us what subsystem is blocking โ config, auth, plugin deps, model provider, etc.
1:41:42.826+10:00 [gateway] startup trace: sidecars.restart-sentinel 9.0ms total=48920.3ms eventLoopMax=0.0ms
2026-04-28T21:41:42.936+10:00 [gateway] startup trace: sidecars.subagent-recovery 106.1ms total=49037.2ms eventLoopMax=0.0ms
2026-04-28T21:41:42.950+10:00 [gateway] startup trace: sidecars.main-session-recovery 9.8ms total=49050.8ms eventLoopMax=0.0ms
2026-04-28T21:41:42.953+10:00 [gateway] startup trace: sidecars.total 45066.0ms total=49054.9ms eventLoopMax=0.0ms
2026-04-28T21:41:42.957+10:00 [gateway] startup trace: sidecars.ready 3.2ms total=49058.1ms eventLoopMax=0.0ms
2026-04-28T21:41:42.961+10:00 [gateway] ready
2026-04-28T21:41:42.967+10:00 [gateway] startup trace: runtime.post-attach 45370.3ms total=49069.4ms eventLoopMax=0.0ms
2026-04-28T21:41:42.969+10:00 [gateway] startup trace: ready 2.4ms total=49071.8ms eventLoopMax=0.0ms
2026-04-28T21:41:42.981+10:00 [heartbeat] started
2026-04-28T21:41:42.998+10:00 [plugins] [hooks] running gateway_start (1 handlers)
2026-04-28T21:42:05.809+10:00 [plugins] bonjour: watchdog detected non-announced service; attempting re-advertise (gateway fqdn=test-VirtualBox (OpenClaw) (2)._openclaw-gw._tcp.local. host=test-VirtualBox-(2).local. port=18789 state=probing)
2026-04-28T21:42:06.667+10:00 [plugins] bonjour: gateway name conflict resolved; newName="test-VirtualBox (OpenClaw) (2)"
2026-04-28T21:42:06.668+10:00 [plugins] bonjour: gateway hostname conflict resolved; newHostname="test-VirtualBox-(2)"
2026-04-28T21:42:06.671+10:00 [plugins] bonjour: advertised gateway fqdn=test-VirtualBox (OpenClaw) (2)._openclaw-gw._tcp.local. host=test-VirtualBox-(2).local. port=18789 state=announcing
Thatโs actually not stuck โ it reached:
[gateway] ready
It just took ~49s, mostly here:
sidecars.total 45066ms
runtime.post-attach 45370ms
So the restart โtimed out after 60sโ was close to the edge, but the gateway did come up.
Now, in a second terminal, check:
openclaw gateway status
openclaw tui --history-limit 20
If you want startup to be less slow, the next suspect is sidecars/plugins. Bonjour also shows name conflicts. You can disable Bonjour if you donโt need LAN discovery:
openclaw config set plugins.entries.bonjour.enabled false --strict-json
openclaw config validate
openclaw gateway restart
Then compare startup time. But first confirm gateway status says connectivity ok.
would i not need lan recovery if i want to be able to talk with my main computer from vm?
You donโt need Bonjour specifically for that.
Bonjour is just LAN auto-discovery/advertising. For your main computer to talk to the VM, what matters is:
- VM network mode allows host โ VM traffic
- Gateway binds to LAN, not only loopback
- Gateway auth is configured
Right now your gateway is loopback-only:
127.0.0.1:18789
That means only the VM itself can connect.
If you want your main computer to connect to the VM gateway, configure LAN bind + token auth:
openclaw doctor --generate-gateway-token
openclaw config set gateway.bind lan
openclaw config validate
openclaw gateway restart
Then get the VM IP:
hostname -I
From your main computer, connect to: