#OpenClaw isnt talking through Telegram. This is the initial setup
1 messages ¡ Page 1 of 1 (latest)
A few common âTelegram is set up but nothing repliesâ causes in OpenClaw are:
- the Gateway isnât the process you think it is (wrong user/profile/config path, or service not actually running)
- Telegram is running, but DMs are blocked by pairing/allowlist policy
- Telegram canât reach
api.telegram.org(DNS/IPv6/egress), so it never sends/receives - the Dashboard errors are usually just auth / âHTTP insecure contextâ issues (fixable with the right URL or SSH tunnel)
Letâs pin down which one it is.
1) Paste these 3 command outputs (from the Ubuntu server)
Run:
openclaw --version
openclaw status --all
openclaw channels status --probe
status --all is the best âsingle pasteâ because itâs designed to be shareable and redacts secrets.
2) Verify Telegram is actually starting + see what happens when you DM
On the server, run:
openclaw logs --follow
Then from your phone DM the bot (press âStartâ if Telegram shows it).
Copy/paste the log lines that appear when you DM.
This immediately tells us whether:
- the gateway is receiving updates at all
- itâs ignoring you due to policy (pairing/allowlist)
- itâs failing to call Telegram (network/DNS/IPv6)
3) The #1 gotcha: DM âpairingâ blocks replies until approved
By default Telegram DMs are:
channels.telegram.dmPolicy = "pairing"
That means: you DM the bot â it sends a pairing code â you must approve it.
Check pairing:
openclaw pairing list telegram
If you see a code:
openclaw pairing approve telegram <CODE>
Docs: https://docs.openclaw.ai/channels/telegram (see âDM accessâ)
If you donât want pairing, set allowlist or open mode instead (but paste your channels.telegram config first so I donât guess your structure).
4) Quick outbound-only test (separates âsendâ vs âreceiveâ problems)
After youâve DMâd the bot once (so Telegram knows the chat exists), try:
openclaw message send --channel telegram --target <your_numeric_user_id> --message "ping from gateway"
If this fails, the error text usually points straight at token/network issues.
5) About the âopenclaw web menu / dashboardâ errors (headless Ubuntu)
Two super common cases:
A) âunauthorizedâ / WebSocket close 1008
Use the tokenized link:
openclaw dashboard
Docs: https://docs.openclaw.ai/web/dashboard
B) âdevice identity requiredâ / âconnect failedâ when opening http://<server-ip>:18789/
That happens because plain HTTP over LAN is a ânon-secure contextâ and the browser blocks WebCrypto.
Fix options:
- use SSH tunnel and open locally:
ssh -N -L 18789:127.0.0.1:18789 user@your-server
then open http://127.0.0.1:18789/ (preferably via openclaw dashboard for the token)
- or use HTTPS (Tailscale Serve), or enable the insecure-http setting (less ideal)
Docs: https://docs.openclaw.ai/gateway/troubleshooting (section: âControl UI fails on HTTPâŚâ)
If you paste the outputs from (1) plus the log snippet from (2), I can tell you exactly which branch youâre in and what to change. Also: are you DMâing the bot, or trying to use it inside a group?
And my personal info wont be seen correct
Correct â as long as you donât paste it into Discord/logs, nobody here can see your personal info.
A few practical details so you feel safe:
- Only what you type in this chat (Discord) is visible to other people in the Discord channel.
- When I ask for outputs like
openclaw status --all, OpenClaw is designed to be shareable and redacts tokens/secrets. Still: skim before posting. - Do not post your Telegram bot token, API keys, passwords, gateway tokens, or full config file contents. If you need help with config, paste only the relevant section and replace secrets with
REDACTED. openclaw logs --followcan include things like your Telegram numeric user id and message text you send the bot. Thatâs not usually âpersonalâ, but if you donât want it public, donât paste raw logsâpaste only the error lines (or redact the ids/text).- Your actual Telegram conversations are between you â your server â Telegram. They are not automatically shared with anyone else.
If you want, you can paste:
- just the error messages (no IDs), or
- the outputs with sensitive parts replaced by
REDACTED.
Tell me what you consider sensitive (user ID? IP? hostnames?) and Iâll tailor what to share safely.
đŚ OpenClaw 2026.2.6-3 (85ed6c7)
Version: 2026.2.6-3
OS: linux 6.8.0-1045-raspi (arm64)
Node: 22.22.0
Config: ~/.openclaw/openclaw.json
Dashboard: http://127.0.0.1:18789/
Tailscale: off
Channel: stable
Update available: 2026.2.9 (pnpm ¡ npm update)
Gateway: local ¡ ws://127.0.0.1:18789 ¡ unreachable (ECONNREFUSED)
Security: Run: openclaw security audit --deep
Gateway service: systemd installed ¡ enabled ¡ stopped
Node service: systemd not installed
Agents: 1 total (main: OK, 0 sessions, 0 active)
Channels
âââââââââââŹââââââââââŹâââââââââŹââââââââââââââââââââââââââââââââââââ
Channel â Enabled â State â Detail
âââââââââââ´ââââââââââ´âââââââââ´ââââââââââââââââââââââââââââââââââââ
(none shown)
Diagnosis Highlights
⢠Gateway target: ws://127.0.0.1:18789 (local loopback)
⢠Connection error: connect ECONNREFUSED 127.0.0.1:18789
⢠Config file: â /home/jason/.openclaw/openclaw.json
⢠Port 18789: open? (but connection refused)
⢠Tailscale: off + spawn tailscale ENOENT
⢠Skills: 4 eligible in ~/.openclaw/workspace
Most likely issue:
The local gateway/server isn't running on port 18789.
Try:
- openclaw start
- Or: openclaw gateway start
- Check: ss -ltn | grep 18789 or netstat -ltn | grep 18789
- Logs: openclaw logs --tail or journalctl -u openclaw-gateway (if systemd)
That output explains it: your Gateway is not running, so Telegram canât possibly work yet.
Gateway: ... unreachable (ECONNREFUSED)Gateway service: systemd installed ¡ enabled ¡ stoppedChannels: (none shown)(because the CLI canât reach a running gateway to ask what channels are active)
Fix: start the gateway service
On the server, run:
openclaw gateway start
openclaw gateway status
openclaw status
If openclaw gateway start doesnât bring it up, grab the logs:
journalctl --user -u openclaw-gateway.service -n 200 --no-pager
(If youâre using a non-default profile, the unit name may be openclaw-gateway-<profile>.service.)
Headless server gotcha (user services need âlingerâ)
If this is a headless box and you want the gateway to stay up even when you log out:
sudo loginctl enable-linger $USER
systemctl --user enable --now openclaw-gateway.service
Docs: https://docs.openclaw.ai/gateway/index (systemd section)
After the gateway is running
Then check Telegram specifically:
openclaw channels status --probe
openclaw logs --follow
If you paste openclaw gateway status + (if needed) the journalctl output, I can tell you exactly why itâs stopped (bad ExecStart path, missing env, config error, etc.).
File logs: /tmp/openclaw/openclaw-2026-02-09.log
Command: /usr/bin/node /home/jason/.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 activating, sub auto-restart, last exit 1, reason 1)
RPC probe: failed
RPC target: ws://127.0.0.1:18789
gateway closed (1006 abnormal closure (no close frame)): no close reason
Gateway target: ws://127.0.0.1:18789
Source: cli --url
Config: /home/jason/.openclaw/openclaw.json
Service is loaded but not running (likely exited immediately).
File logs: /tmp/openclaw/openclaw-2026-02-09.log
Logs: journalctl --user -u openclaw-gateway.service -n 200 --no-pager
Yep â that Runtime: stopped ⌠last exit 1 means the gateway is crashing immediately and systemd is trying to auto-restart it. Until we see the actual error line, weâre guessing.
Do this (and paste output)
- Stop the restart loop so logs are readable:
systemctl --user stop openclaw-gateway.service
systemctl --user reset-failed openclaw-gateway.service
- Paste the last ~200 lines of the service journal:
journalctl --user -u openclaw-gateway.service -n 200 --no-pager
- Paste the last ~120 lines of the file log it pointed you to:
tail -n 120 /tmp/openclaw/openclaw-2026-02-09.log
(You can redact tokens if you see any, but usually these logs donât print secrets.)
Optional (often the fastest): run gateway in foreground once
This will print the real error immediately:
openclaw gateway --port 18789 --verbose
Copy/paste the first error/stack trace it shows.
What Iâm expecting weâll find (common exit-1 causes)
- Config not set to local mode: error like
Gateway start blocked: set gateway.mode=local- fix:
openclaw config set gateway.mode local
- fix:
- Port already in use:
EADDRINUSE- check:
ss -ltnp | grep 18789
- check:
- Config parse error (JSON5 typo)
- Missing native module / dependency on arm64 (will show
Cannot find module ...or build failure)
Once the gateway stays up, openclaw channels status --probe will start showing Telegram, and then we can tackle the Telegram-specific part.
Feb 09 18:54:17 ai-companion systemd[17652]: openclaw-gateway.service: Main process exited, code=exited, status=1/FAILURE
Feb 09 18:54:17 ai-companion systemd[17652]: openclaw-gateway.service: Failed with result 'exit-code'.
Feb 09 18:54:17 ai-companion systemd[17652]: openclaw-gateway.service: Consumed 5.312s CPU time.
Feb 09 18:54:22 ai-companion systemd[17652]: openclaw-gateway.service: Scheduled restart job, restart counter is at 1627.
Feb 09 18:54:22 ai-companion systemd[17652]: Started openclaw-gateway.service - OpenClaw Gateway (v2026.2.6-3).
Feb 09 18:54:25 ai-companion node[49968]: 2026-02-09T23:54:25.921Z Gateway start blocked: set gateway.mode=local (current: unset) or pass --allow-unconfigured.
Feb 09 18:54:25 ai-companion systemd[17652]: openclaw-gateway.service: Main process exited, code=exited, status=1/FAILURE
Feb 09 18:54:25 ai-companion systemd[17652]: openclaw-gateway.service: Failed with result 'exit-code'.
Feb 09 18:54:25 ai-companion systemd[17652]: openclaw-gateway.service: Consumed 4.714s CPU time.
Feb 09 18:54:31 ai-companion systemd[17652]: openclaw-gateway.service: Scheduled restart job, restart counter is at 1628.
Feb 09 18:54:31 ai-companion systemd[17652]: Started openclaw-gateway.service - OpenClaw Gateway (v2026.2.6-3).
Feb 09 18:54:35 ai-companion node[49994]: 2026-02-09T23:54:35.033Z Gateway start blocked: set gateway.mode=local (current: unset) or pass --allow-unconfigured.
Feb 09 18:54:35 ai-companion systemd[17652]: openclaw-gateway.service: Main process exited, code=exited, status=1/FAILURE
Feb 09 18:54:35 ai-companion systemd[17652]: openclaw-gateway.service: Failed with result 'exit-code'.
Feb 09 18:54:35 ai-companion systemd[17652]: openclaw-gateway.service: Consumed 5.460s CPU time.
Feb 09 18:54:40 ai-companion systemd[17652]: openclaw-gateway.service: Scheduled restart job, restart counter is at 1629.
Feb 09 18:54:40 ai-companion systemd[17652]: Started openclaw-gateway.service - OpenClaw Gateway (v2026.2.6-3).
Feb 09 18:54:44 ai-companion node[50006]: 2026-02-09T23:54:44.165Z Gateway start blocked: set gateway.mode=local (current: unset) or pass --allow-unconfigured.
Feb 09 18:54:44 ai-companion systemd[17652]: openclaw-gateway.service: Main process exited, code=exited, status=1/FAILURE
Feb 09 18:54:44 ai-companion systemd[17652]: openclaw-gateway.service: Failed with result 'exit-code'.
Feb 09 18:54:44 ai-companion systemd[17652]: openclaw-gateway.service: Consumed 5.359s CPU time.
Feb 09 18:54:49 ai-companion systemd[17652]: openclaw-gateway.service: Scheduled restart job, restart counter is at 1630.
Feb 09 18:54:49 ai-companion systemd[17652]: Started openclaw-gateway.service - OpenClaw Gateway (v2026.2.6-3).
Feb 09 18:54:52 ai-companion node[50018]: 2026-02-09T23:54:52.927Z Gateway start blocked: set gateway.mode=local (current: unset) or pass --allow-unconfigured.
Feb 09 18:54:52 ai-companion systemd[17652]: openclaw-gateway.service: Main process exited, code=exited, status=1/FAILURE
Feb 09 18:54:52 ai-companion systemd[17652]: openclaw-gateway.service: Failed with result 'exit-code'.
Feb 09 18:54:52 ai-companion systemd[17652]: openclaw-gateway.service: Consumed 5.137s CPU time.
Feb 09 18:54:58 ai-companion systemd[17652]: openclaw-gateway.service: Scheduled restart job, restart counter is at 1631.
Feb 09 18:54:58 ai-companion systemd[17652]: Started openclaw-gateway.service - OpenClaw Gateway (v2026.2.6-3).
Feb 09 18:55:01 ai-companion node[50031]: 2026-02-09T23:55:01.368Z Gateway start blocked: set gateway.mode=local (current: unset) or pass --allow-unconfigured.
Feb 09 18:55:01 ai-companion systemd[17652]: openclaw-gateway.service: Main process exited, code=exited, status=1/FAILURE
Feb 09 18:55:01 ai-companion systemd[17652]: openclaw-gateway.service: Failed with result 'exit-code'.
Feb 09 18:55:01 ai-companion systemd[17652]: openclaw-gateway.service: Consumed 4.959s CPU time.
ââââââââ\n đŚ OPENCLAW đŚ \n ","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"openclaw","date":"2026-02-09T05:47:07.946Z","logLevelId":3,"logLevelName":"INFO","path":{"fullFilePath":"file:///home/aiuser/.npm-global/lib/node_modules/openclaw/dist/entry.js:915:46","fileName":"entry.js","fileNameWithLine":"entry.js:915","fileColumn":"46","fileLine":"915","filePath":".npm-global/lib/node_modules/openclaw/dist/entry.js","filePathWithLine":".npm-global/lib/node_modules/openclaw/dist/entry.js:915","method":"console.log"}},"time":"2026-02-09T05:47:07.953Z"}
{"0":"Run "openclaw doctor --fix" to apply changes.","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"openclaw","date":"2026-02-09T05:49:45.995Z","logLevelId":3,"logLevelName":"INFO","path":{"fullFilePath":"file:///home/aiuser/.npm-global/lib/node_modules/openclaw/dist/entry.js:915:46","fileName":"entry.js","fileNameWithLine":"entry.js:915","fileColumn":"46","fileLine":"915","filePath":".npm-global/lib/node_modules/openclaw/dist/entry.js","filePathWithLine":".npm-global/lib/node_modules/openclaw/dist/entry.js:915","method":"console.log"}},"time":"2026-02-09T05:49:45.995Z"}
{"0":"{"subsystem":"plugins"}","1":"plugin CLI register skipped (memory-core): command already registered (memory)","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{"subsystem":"plugins"}","parentNames":["openclaw"],"date":"2026-02-09T05:49:50.418Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///home/aiuser/.npm-global/lib/node_modules/openclaw/dist/entry.js:1056:14","fileName":"entry.js","fileNameWithLine":"entry.js:1056","fileColumn":"14","fileLine":"1056","filePath":".npm-global/lib/node_modules/openclaw/dist/entry.js","filePathWithLine":".npm-global/lib/node_modules/openclaw/dist/entry.js:1056","method":"logToFile"}},"time":"2026-02-09T05:49:50.421Z"}
{"0":"{"subsystem":"plugins"}","1":"plugin CLI register skipped (memory-core): command already registered (memory)","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{"subsystem":"plugins"}","parentNames":["openclaw"],"date":"2026-02-09T05:49:50.470Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///home/aiuser/.npm-global/lib/node_modules/openclaw/dist/entry.js:1056:14","fileName":"entry.js","fileNameWithLine":"entry.js:1056","fileColumn":"14","fileLine":"1056","filePath":".npm-global/lib/node_modules/openclaw/dist/entry.js","filePathWithLine":".npm-global/lib/node_modules/openclaw/dist/entry.js:1056","method":"logToFile"}},"time":"2026-02-09T05:49:50.470Z"}
{"0":"No npm-installed plugins to update.","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"openclaw","date":"2026-02-09T05:49:50.486Z","logLevelId":3,"logLevelName":"INFO","path":{"fullFilePath":"file:///home/aiuser/.npm-global/lib/node_modules/openclaw/dist/entry.js:915:46","fileName":"entry.js","fileNameWithLine":"entry.js:915","fileColumn":"46","fileLine":"915","filePath":".npm-global/lib/node_modules/openclaw/dist/entry.js","filePathWithLine":".npm-global/lib/node_modules/openclaw/dist/entry.js:915","method":"console.log"}},"time":"2026-02-09T05:49:50.486Z"}
{"0":"{"subsystem":"plugins"}","1":"plugin CLI register skipped (memory-core): command already registered (memory)","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"{"subsystem":"plugins"}","parentNames":["openclaw"],"date":"2026-02-09T05:49:54.940Z","logLevelId":2,"logLevelName":"DEBUG","path":{"fullFilePath":"file:///home/aiuser/.npm-global/lib/node_modules/openclaw/dist/entry.js:1056:14","fileName":"entry.js","fileNameWithLine":"entry.js:1056","fileColumn":"14","fileLine":"1056","filePath":".npm-
That snippet you pasted isnât the gateway crash â it looks like CLI/plugin noise (âNo npm-installed plugins to updateâŚâ) and itâs also referencing /home/aiuser/... while your service command is /home/jason/..., so weâre not looking at the right lines yet.
We need the systemd journal for the gateway service, because that will contain the real reason it exits with code 1.
Run these on the server (same user that installed the --user service), then paste the output:
systemctl --user status openclaw-gateway.service --no-pager -n 80
journalctl --user -u openclaw-gateway.service -n 200 --no-pager
Also paste this (itâs short, and catches the most common immediate-exit cause):
openclaw config get gateway.mode
Most common outcome:
- If
gateway.modeis missing/notlocal, the gateway will refuse to start (exit 1). Fix is:openclaw config set gateway.mode local openclaw gateway restart
Once we get the journalctl output, weâll know exactly which case youâre in (config block, missing file path, port in use, JSON5 parse error, etc.).
pass --allow-unconfigured.
Feb 09 18:58:32 ai-companion systemd[17652]: openclaw-gateway.service: Main process exited, code=exited, status=1/FAILURE
Feb 09 18:58:32 ai-companion systemd[17652]: openclaw-gateway.service: Failed with result 'exit-code'.
Feb 09 18:58:32 ai-companion systemd[17652]: openclaw-gateway.service: Consumed 4.765s CPU time.
Feb 09 18:58:38 ai-companion systemd[17652]: openclaw-gateway.service: Scheduled restart job, restart counter is at 1656.
Feb 09 18:58:38 ai-companion systemd[17652]: Started openclaw-gateway.service - OpenClaw Gateway (v2026.2.6-3).
Feb 09 18:58:42 ai-companion node[50437]: 2026-02-09T23:58:42.034Z Gateway start blocked: set gateway.mode=local (current: unset) or pass --allow-unconfigured.
Feb 09 18:58:42 ai-companion systemd[17652]: openclaw-gateway.service: Main process exited, code=exited, status=1/FAILURE
Feb 09 18:58:42 ai-companion systemd[17652]: openclaw-gateway.service: Failed with result 'exit-code'.
Feb 09 18:58:42 ai-companion systemd[17652]: openclaw-gateway.service: Consumed 5.466s CPU time.
Feb 09 18:58:47 ai-companion systemd[17652]: openclaw-gateway.service: Scheduled restart job, restart counter is at 1657.
Feb 09 18:58:47 ai-companion systemd[17652]: Started openclaw-gateway.service - OpenClaw Gateway (v2026.2.6-3).
Feb 09 18:58:51 ai-companion node[50450]: 2026-02-09T23:58:51.145Z Gateway start blocked: set gateway.mode=local (current: unset) or pass --allow-unconfigured.
Feb 09 18:58:51 ai-companion systemd[17652]: openclaw-gateway.service: Main process exited, code=exited, status=1/FAILURE
Feb 09 18:58:51 ai-companion systemd[17652]: openclaw-gateway.service: Failed with result 'exit-code'.
Feb 09 18:58:51 ai-companion systemd[17652]: openclaw-gateway.service: Consumed 5.431s CPU time.
Feb 09 18:58:56 ai-companion systemd[17652]: openclaw-gateway.service: Scheduled restart job, restart counter is at 1658.
Feb 09 18:58:56 ai-companion systemd[17652]: Started openclaw-gateway.service - OpenClaw Gateway (v2026.2.6-3).
Feb 09 18:59:00 ai-companion node[50462]: 2026-02-09T23:59:00.159Z Gateway start blocked: set gateway.mode=local (current: unset) or pass --allow-unconfigured.
Feb 09 18:59:00 ai-companion systemd[17652]: openclaw-gateway.service: Main process exited, code=exited, status=1/FAILURE
Feb 09 18:59:00 ai-companion systemd[17652]: openclaw-gateway.service: Failed with result 'exit-code'.
Feb 09 18:59:00 ai-companion systemd[17652]: openclaw-gateway.service: Consumed 5.433s CPU time.
Feb 09 18:59:05 ai-companion systemd[17652]: openclaw-gateway.service: Scheduled restart job, restart counter is at 1659.
Feb 09 18:59:05 ai-companion systemd[17652]: Started openclaw-gateway.service - OpenClaw Gateway (v2026.2.6-3).
Feb 09 18:59:06 ai-companion systemd[17652]: Stopping openclaw-gateway.service - OpenClaw Gateway (v2026.2.6-3)...
Feb 09 18:59:06 ai-companion systemd[17652]: Stopped openclaw-gateway.service - OpenClaw Gateway (v2026.2.6-3).
Feb 09 18:59:06 ai-companion systemd[17652]: openclaw-gateway.service: Consumed 1.119s CPU time.
That log line is the whole problem:
Gateway start blocked: set gateway.mode=local (current: unset)
So systemd keeps restarting it, it immediately exits with code 1, and nothing (Telegram/Dashboard) can work because the gateway never stays up.
Fix (run these on the server)
First stop the restart loop and clear the âfailedâ state:
systemctl --user stop openclaw-gateway.service
systemctl --user reset-failed openclaw-gateway.service
Set the gateway run mode to local:
openclaw config set gateway.mode local
Then start it again:
systemctl --user start openclaw-gateway.service
# or: openclaw gateway start
Verify:
openclaw status
openclaw channels status --probe
Docs reference (exact error): https://docs.openclaw.ai/gateway/troubleshooting#gateway-start-blocked-set-gatewaymodelocal
After itâs running: Telegram may still ânot replyâ due to pairing
Telegram DMs default to dmPolicy: "pairing"; you must approve the code on first contact.
Once the gateway is up, DM your bot, then run:
openclaw pairing list telegram
openclaw pairing approve telegram <CODE>
Telegram docs: https://docs.openclaw.ai/channels/telegram (DM access / pairing)
If you paste your new openclaw status after setting gateway.mode, we can confirm the gateway is reachable and that Telegram actually shows up under Channels.
I havent ran this yet openclaw pairing list telegram
openclaw pairing approve telegram <CODE> but its says gateway is reachable
If the gateway is reachable now, thatâs progress â the next most common reason Telegram âdoesnât respondâ is DM pairing.
1) Are you DMâing the bot, or messaging it in a group?
- DM: pairing is usually the blocker.
- Group: mention/privacy/allowlist settings can block replies (different path).
2) For DMs: do the pairing step (you must DM the bot first)
On your phone in Telegram, DM your bot something like hi.
Then on the same server where the gateway runs, run:
openclaw pairing list telegram
If you see a pending entry with a code, approve it:
openclaw pairing approve telegram <CODE>
After approval, DM the bot again â it should start responding normally.
Docs: https://docs.openclaw.ai/channels/telegram (see âDM accessâ / pairing)
3) Quick sanity check: is Telegram even started in the gateway?
Run:
openclaw channels status --probe
- If Telegram is missing from the list â itâs usually
channels.telegram.enabled/channels.telegram.botTokennot being resolved by the gateway. - If Telegram shows running but still no replies in DM â pairing/allowFrom policy is almost certainly it.
4) If pairing list shows nothing
Run this while you DM the bot, and paste the few lines that appear right when you send the DM:
openclaw logs --follow
That will show whether the gateway is receiving the Telegram update and whether itâs ignoring it due to policy.
nothing is pending, going to step 3)
If openclaw pairing list telegram shows nothing pending, it usually means one of these is true:
- your Telegram DM never reached the Gateway (Telegram channel not running, wrong token, webhook misconfigured, network/DNS issue), or
- your DM did reach the Gateway, but your DM policy is not
pairing(e.g.allowlist), so it wonât create a pending pairing request.
Letâs split those apart.
Step A â confirm Telegram is actually running in the Gateway
Run and paste:
openclaw channels status --probe
You should see a telegram section with ârunning/connectedâ details. If Telegram doesnât show up at all, itâs not starting (usually token not being resolved).
Step B â check your Telegram config policy (redact tokens)
Run and paste (remove the bot token value if it prints it):
openclaw config get channels.telegram
What Iâm looking for specifically:
enabled: truebotTokenpresent (ortokenFile/ env)dmPolicyvalue (pairingvsallowlistvsopenvsdisabled)- if
dmPolicy: "allowlist"â yourallowFrommust include your numeric Telegram user id (not your @handle, and definitely not the bot username)
Step C â watch live logs while you DM the bot
On the server:
openclaw logs --follow
Then on your phone, DM the bot (send hi or /start).
Paste the few log lines that appear right when you send the message.
- If you see nothing in logs when you DM â the gateway isnât receiving Telegram updates (token/webhook/network).
- If you see something like âskipping dm message / not allowed / allowlistâ â itâs an access policy issue (easy fix once we see the exact line).
Docs for reference: https://docs.openclaw.ai/channels/telegram#troubleshooting
Paste the output from A + B, and the log snippet from C, and Iâll tell you exactly which knob to change.
step A telegram isnt listed
If openclaw channels status --probe doesnât list telegram at all, the Gateway is not starting the Telegram channel. Thatâs almost always because the Gateway canât resolve a Telegram token from its actual runtime config/env.
1) Check what the Gateway thinks your Telegram config is (redact secrets)
Run:
openclaw config get channels.telegram
Paste the output here, but replace any token with REDACTED.
What Iâm specifically looking for:
enabled: true- and one of:
botTokenortokenFile(or youâre usingTELEGRAM_BOT_TOKENenv)
2) Make sure you used the correct config key
It must be botToken (not token, not bot_token):
{
channels: {
telegram: {
enabled: true,
botToken: "REDACTED",
dmPolicy: "pairing",
},
},
}
(Reference: https://docs.openclaw.ai/channels/telegram)
3) If you set TELEGRAM_BOT_TOKEN in your shell: systemd wonât see it
On headless Linux, the --user systemd service runs with a minimal environment and does not inherit your interactive shell exports.
Fix options:
Option A (recommended): put the token in config (channels.telegram.botToken).
Option B: put it in ~/.openclaw/.env (so the daemon can load it), e.g.:
nano ~/.openclaw/.env
# add:
TELEGRAM_BOT_TOKEN=123:abc
Then restart the gateway:
systemctl --user restart openclaw-gateway.service
4) Re-check
After restart:
openclaw channels status --probe
If you paste the openclaw config get channels.telegram output (with token redacted), I can tell you exactly whatâs missing/incorrect.
discord fail to use "/restart" comands
return message "â ď¸ /restart is disabled. Set commands.restart=true to enable."
openclaw config get channels.telegram
đŚ OpenClaw 2026.2.6-3 (85ed6c7) â The only bot that stays out of your training set.
Config path not found: channels.telegram
For the /restart is disabled message: thatâs expected â OpenClaw ships with restart off by default.
Enable /restart
Set this in your config:
openclaw config set commands.restart true
Then restart the gateway once from the server side (since /restart isnât enabled yet):
- Linux (systemd user service):
systemctl --user restart openclaw-gateway.service - Or via CLI:
openclaw gateway restart
After that, /restart should work (for authorized senders only; still gated by your channel access rules / allowlists).
Docs: https://docs.openclaw.ai/tools/slash-commands (and config ref: https://docs.openclaw.ai/gateway/configuration#commands)
openclaw config get channels.telegram â âConfig path not foundâ means your ~/.openclaw/openclaw.json currently has no Telegram config section at all, so the Gateway never even tries to start Telegram (which is why channels status --probe doesnât list it).
Add minimal Telegram config (donât paste the token here)
Run these on the same Linux user that runs the gateway service (systemctl --user ...):
openclaw config set channels.telegram.enabled true
openclaw config set channels.telegram.botToken "REDACTED_BOTFATHER_TOKEN"
openclaw config set channels.telegram.dmPolicy "pairing"
Then restart the gateway:
systemctl --user restart openclaw-gateway.service
Now Telegram should appear:
openclaw channels status --probe
After Telegram shows up: do the DM pairing
- DM your bot in Telegram (âhiâ)
- On the server:
openclaw pairing list telegram
openclaw pairing approve telegram <CODE>
If Telegram still doesnât show up after restart
Paste (safe to share, but redact tokens if any appear):
openclaw config get channels.telegram
openclaw logs --tail 200
One more important check: earlier your logs referenced /home/aiuser/... but your config/status shows /home/jason/.... Are you maybe running the gateway as a different Linux user than the one youâre editing config with? That would also make Telegram ânot existâ from the serviceâs point of view.
what is this nano ~/.openclaw/.env supposed to look like mine is blank
~/.openclaw/.env is just a plain text file with one KEY=value per line. Itâs totally normal for it to be blank until you add something.
Itâs mainly useful on Linux because your systemd service wonât inherit environment variables you export in your shell â so putting them in ~/.openclaw/.env makes them available to the Gateway when it starts.
What it should look like
Example (do not paste your real tokens here):
# Telegram bot token from @BotFather
TELEGRAM_BOT_TOKEN=123456:ABCDEF_your_token_here
# (optional) gateway auth token if you configured one
OPENCLAW_GATEWAY_TOKEN=some-long-random-token
Notes:
- No
exportneeded.
- Quotes are optional; usually just
KEY=valueis best. - Comments with
#are fine.
After editing, restart the gateway service:
systemctl --user restart openclaw-gateway.service
Important for your specific case (why Telegram isnât showing up)
Earlier you got Config path not found: channels.telegram. Even if TELEGRAM_BOT_TOKEN is set, Telegram wonât start unless a channels.telegram section exists in config.
So do either of these:
Option A (token in config, simplest):
openclaw config set channels.telegram.enabled true
openclaw config set channels.telegram.botToken "PASTE_BOTFATHER_TOKEN_HERE"
openclaw config set channels.telegram.dmPolicy "pairing"
systemctl --user restart openclaw-gateway.service
Option B (keep token in .env, config references it):
- Put the token in
~/.openclaw/.envas above - Set config like:
openclaw config set channels.telegram.enabled true
openclaw config set channels.telegram.botToken '${TELEGRAM_BOT_TOKEN}'
openclaw config set channels.telegram.dmPolicy "pairing"
systemctl --user restart openclaw-gateway.service
Then verify Telegram appears:
openclaw channels status --probe
If you want, paste the output of:
openclaw config get channels.telegram(redact token if it shows)openclaw channels status --probe
so copy paste option a into nano?
No â Option A is not something you paste into nano.
Those lines are shell commands. You run them in your terminal (SSH session) one by one.
Do this (in the terminal)
Replace the token with your real BotFather token locally (donât paste it in Discord):
openclaw config set channels.telegram.enabled true
openclaw config set channels.telegram.botToken "PASTE_YOUR_BOTFATHER_TOKEN_HERE"
openclaw config set channels.telegram.dmPolicy "pairing"
systemctl --user restart openclaw-gateway.service
Then check:
openclaw channels status --probe
You should now see telegram listed.
If you want to use nano instead
Then youâd edit this file:
nano ~/.openclaw/openclaw.json
âŚand add something like (JSON5):
{
channels: {
telegram: {
enabled: true,
botToken: "PASTE_YOUR_BOTFATHER_TOKEN_HERE",
dmPolicy: "pairing",
},
},
}
Save, exit, then restart:
systemctl --user restart openclaw-gateway.service
Either approach works â the terminal openclaw config set ... way is usually easiest/safer.
- Telegram default: enabled, not configured, stopped, mode:polling, token:none, error:not configured
That line means the Gateway sees Telegram enabled, but it has no bot token:
token:none, error:not configured
So Telegram wonât start until the Gateway can resolve a token from either:
channels.telegram.botToken(config), orchannels.telegram.tokenFile, orTELEGRAM_BOT_TOKEN(env, but systemd usually wonât see your shell exports unless you put it in~/.openclaw/.env)
1) First: confirm your config actually contains the token (without leaking it)
Run:
openclaw config get channels.telegram
You should see something like:
{ enabled: true, botToken: "....", dmPolicy: "pairing" }
If you donât see botToken, set it:
openclaw config set channels.telegram.botToken "PASTE_YOUR_BOTFATHER_TOKEN_HERE"
(Do this on the server; donât paste the token into Discord.)
Then restart gateway:
systemctl --user restart openclaw-gateway.service
Then re-check:
openclaw channels status --probe
2) If you did set botToken but it still shows token:none
This is usually a different Linux user issue (you edit config as one user, but the gateway service runs as another). Earlier we saw /home/aiuser/... vs /home/jason/... in logs, which is a huge hint.
Run:
whoami
openclaw gateway status
Look at Config (service): ... and make sure you are editing that exact file as that same user.
3) Alternative: put the token in ~/.openclaw/.env
If you prefer env vars, put this in:
nano ~/.openclaw/.env
Contents:
TELEGRAM_BOT_TOKEN=PASTE_YOUR_TOKEN_HERE
Then ensure config has some telegram section (so it tries to start), e.g.:
openclaw config set channels.telegram.enabled true
Restart the gateway and re-check channels status --probe.
If you paste the output of openclaw config get channels.telegram with the token value replaced by REDACTED, I can tell you exactly whatâs missing.
openclaw config set channels.telegram.botToken REDACTED
error: missing required argument 'value'
You need to pass the token as the value argument (and it must be quoted if there are any special characters).
Run it like this (replace with your real token):
openclaw config set channels.telegram.botToken "123456789:AAAbbbCCCdddEEEfff"
A couple gotchas:
- There must be a space between
botTokenand the value. - Use normal quotes
"(sometimes copy/paste turns them into weird unicode quotes). - Donât include the word
REDACTEDin the actual commandâuse your real token on your machine, just donât post it here.
After setting it, restart + verify:
systemctl --user restart openclaw-gateway.service
openclaw channels status --probe
If you still get âmissing required argument âvalueââ, paste the exact command you typed (with the token replaced by REDACTED) â itâs usually a hidden non-breaking space or a quote character issue.
Gateway not reachable: Error: gateway closed (1006 abnormal closure (no close frame)): no close reason
Gateway target: ws://127.0.0.1:18789
Source: local loopback
Config: /home/jason/.openclaw/openclaw.json
Bind: loopback
Gateway not reachable; showing config-only status.
Config: /home/jason/.openclaw/openclaw.json
Mode: local
- Telegram default: enabled, configured, mode:polling, token:config
That output is the key clue:
- Telegram is now configured (
token:config) - but the Gateway is crashing / dropping the WS connection (
1006 abnormal closure) - and
openclaw channels status --probeis falling back to config-only status (âGateway not reachable; showing config-only status.â)
So we need the gateway crash reason from logs.
1) Show systemd status + journal (paste both)
On the server:
systemctl --user status openclaw-gateway.service --no-pager -n 80
journalctl --user -u openclaw-gateway.service -n 200 --no-pager
That will include the exact âfatal errorâ line/stack trace.
Also useful:
tail -n 200 /tmp/openclaw/openclaw-2026-02-09.log
2) Quick isolation test: does the gateway stay up if Telegram is disabled?
This tells us if Telegram startup is whatâs crashing it:
openclaw config set channels.telegram.enabled false
systemctl --user restart openclaw-gateway.service
openclaw status
- If the gateway becomes reachable when Telegram is disabled â we focus on Telegram-specific crash (often Node 22 + long-polling quirks, DNS/IPv6, or a bug fixed in a newer OpenClaw build).
- If it still crashes â itâs a more general gateway/config issue.
3) (Optional) Run gateway in the foreground once to see the crash immediately
Stop the service, then run interactively:
systemctl --user stop openclaw-gateway.service
openclaw gateway --port 18789 --verbose
Copy/paste the first error it prints.
Once you paste the journalctl output, I can tell you exactly what to change (and whether updating OpenClaw / switching Node version is the right fix).
Feb 09 19:51:59 ai-companion node[52421]: 2026-02-10T00:51:59.883Z [gateway] listening on ws://[::1]:18789
Feb 09 19:51:59 ai-companion node[52421]: 2026-02-10T00:51:59.885Z [gateway] log file: /tmp/openclaw/openclaw-2026-02-09.log
Feb 09 19:51:59 ai-companion node[52421]: 2026-02-10T00:51:59.894Z [browser/service] Browser control service ready (profiles=2)
Feb 09 20:04:52 ai-companion node[52421]: 2026-02-10T01:04:52.874Z [reload] config change detected; evaluating reload (meta.lastTouchedAt, channels.telegram.botToken)
Feb 09 20:04:52 ai-companion node[52421]: 2026-02-10T01:04:52.880Z [reload] config change requires gateway restart (meta.lastTouchedAt)
Feb 09 20:04:52 ai-companion node[52421]: 2026-02-10T01:04:52.885Z [gateway] signal SIGUSR1 received
Feb 09 20:04:52 ai-companion node[52421]: 2026-02-10T01:04:52.890Z [gateway] received SIGUSR1; restarting
Feb 09 20:04:52 ai-companion node[52421]: 2026-02-10T01:04:52.899Z [gmail-watcher] gmail watcher stopped
Feb 09 20:04:53 ai-companion node[52421]: 2026-02-10T01:04:53.628Z [canvas] host mounted at http://127.0.0.1:18789/__openclaw__/canvas/ (root /home/jason/.openclaw/canvas)
Feb 09 20:04:53 ai-companion node[52421]: 2026-02-10T01:04:53.648Z [heartbeat] started
Feb 09 20:04:53 ai-companion node[52421]: 2026-02-10T01:04:53.652Z [gateway] agent model: anthropic/claude-opus-4-6
Feb 09 20:04:53 ai-companion node[52421]: 2026-02-10T01:04:53.655Z [gateway] listening on ws://127.0.0.1:18789 (PID 52421)
Feb 09 20:04:53 ai-companion node[52421]: 2026-02-10T01:04:53.658Z [gateway] listening on ws://[::1]:18789
Feb 09 20:04:53 ai-companion node[52421]: 2026-02-10T01:04:53.661Z [gateway] log file: /tmp/openclaw/openclaw-2026-02-09.log
Feb 09 20:04:53 ai-companion node[52421]: 2026-02-10T01:04:53.691Z [browser/service] Browser control service ready (profiles=2)
Feb 09 20:04:56 ai-companion node[52421]: 2026-02-10T01:04:56.012Z [telegram] [default] starting provider (@Tr1nbot)
Feb 09 20:04:56 ai-companion node[52421]: 2026-02-10T01:04:56.035Z [telegram] autoSelectFamily=false (default-node22)
Feb 09 20:06:49 ai-companion systemd[17652]: Stopping openclaw-gateway.service - OpenClaw Gateway (v2026.2.6-3)...
Feb 09 20:06:49 ai-companion node[52421]: 2026-02-10T01:06:49.467Z [gateway] signal SIGTERM received
Feb 09 20:06:49 ai-companion node[52421]: 2026-02-10T01:06:49.469Z [gateway] received SIGTERM; shutting down
Feb 09 20:06:49 ai-companion node[52421]: 2026-02-10T01:06:49.516Z [gmail-watcher] gmail watcher stopped
Feb 09 20:06:49 ai-companion systemd[17652]: Stopped openclaw-gateway.service - OpenClaw Gateway (v2026.2.6-3).
Feb 09 20:06:49 ai-companion systemd[17652]: openclaw-gateway.service: Consumed 56.501s CPU time.
Feb 09 20:06:49 ai-companion systemd[17652]: Started openclaw-gateway.service - OpenClaw Gateway (v2026.2.6-3).
Feb 09 20:07:33 ai-companion node[53006]: 2026-02-10T01:07:33.346Z [canvas] host mounted at http://127.0.0.1:18789/__openclaw__/canvas/ (root /home/jason/.openclaw/canvas)
Feb 09 20:07:33 ai-companion node[53006]: 2026-02-10T01:07:33.546Z [heartbeat] started
Feb 09 20:07:33 ai-companion node[53006]: 2026-02-10T01:07:33.556Z [gateway] agent model: anthropic/claude-opus-4-6
Feb 09 20:07:33 ai-companion node[53006]: 2026-02-10T01:07:33.562Z [gateway] listening on ws://127.0.0.1:18789 (PID 53006)
Feb 09 20:07:33 ai-companion node[53006]: 2026-02-10T01:07:33.565Z [gateway] listening on ws://[::1]:18789
Feb 09 20:07:33 ai-companion node[53006]: 2026-02-10T01:07:33.569Z [gateway] log file: /tmp/openclaw/openclaw-2026-02-09.log
Feb 09 20:07:33 ai-companion node[53006]: 2026-02-10T01:07:33.610Z [browser/service] Browser control service ready (profiles=2)
Feb 09 20:07:34 ai-companion node[53006]: 2026-02-10T01:07:34.093Z [telegram] [default] starting provider (@Tr1nbot)
Feb 09 20:07:34 ai-companion node[53006]: 2026-02-10T01:07:34.122Z [telegram] autoSelectFamily=false (default-node22)
Those journal lines look good â your gateway is not crashing. What happened is:
- The gateway started and was listening (
listening on ws://127.0.0.1:18789andws://[::1]:18789) - You changed config (
channels.telegram.botToken), which triggered an in-process restart (SIGUSR1) - Then later the service got a SIGTERM because it was explicitly stopped/restarted (
systemd⌠Stopping âŚ)
That âGateway not reachable (1006)â you saw earlier is exactly what you get if you run openclaw ⌠commands while the gateway is in the middle of restarting/stopping.
Next step: confirm Telegram is actually running (not just âstartingâ)
Run:
openclaw channels status --probe
âŚand paste the Telegram line again. We want it to say something like running/ok (not âstopped/not configuredâ).
Then: generate a pairing request (DM the bot while watching logs)
- On the server:
openclaw logs --follow
-
On your phone, DM the bot âhiâ (not in a group).
-
You should see log lines for an inbound Telegram update. Right after that, run:
openclaw pairing list telegram
If pairing is working, youâll see a pending code and can approve it:
openclaw pairing approve telegram <CODE>
If you DM the bot and no Telegram log lines appear
That means the Telegram long-polling isnât receiving updates (token wrong, network/DNS/IPv6 egress issues, webhook mis-set, etc.). In that case paste the next ~50 lines after:
[telegram] [default] starting provider ...
from:
tail -n 200 /tmp/openclaw/openclaw-2026-02-09.log
(And donât paste any tokens.)
Paste the Telegram probe line + whatever logs --follow shows when you DM the bot, and weâll finish the last mile.
- Telegram default: enabled, configured, running, mode:polling, bot:@Tr1nbot, token:config, works
Perfect â that line means the Gateway + Telegram transport are healthy now:
running ⌠token:config, works
So the remaining issue (if the bot still isnât replying to your messages) is almost certainly DM access policy (pairing/allowlist), not connectivity.
Next: do the DM pairing flow
-
On your phone, DM @Tr1nbot (send
hi). -
On the server, run:
openclaw pairing list telegram
- If it shows a pending entry with a code, approve it:
openclaw pairing approve telegram <CODE>
- DM the bot again (or run
/status). It should reply.
If pairing list is still empty
Check what DM policy you ended up with:
openclaw config get channels.telegram.dmPolicy
openclaw config get channels.telegram.allowFrom
- If
dmPolicyisallowlist, you must add your Telegram user id toallowFrom. - If
dmPolicyisopen, thenallowFrommust include"*".
And the quickest âwhat is the gateway receivingâ debug loop is:
openclaw logs --follow
âŚthen DM the bot and see if you get an inbound message log line.
If the bot replies after pairing, please mark the solution message in Discord (rightâclick â Apps â â Mark Solution) so itâs indexed for others.
Bot responded on telegram with OpenClaw: access not configured.
Your Telegram user id: Redacted
Pairing code: Redacted
Ask the bot owner to approve with:
openclaw pairing approve telegram <code>
do I reply with the code it gave me
?
Good â thatâs exactly the expected pairing gate.
Now on the server (same user running the gateway), approve that code:
openclaw pairing approve telegram <CODE>
(Use the exact code Telegram showed you.)
Then DM the bot again in Telegram â it should respond normally.
If you ever miss the code / want to see pending requests:
openclaw pairing list telegram
Docs: https://docs.openclaw.ai/channels/telegram#dm-access
If this fixed it, please rightâclick the solution message â Apps â â Mark Solution so Answer Overflow indexes it for the next person.
I got approved telegram sender
Run the approval command on your Ubuntu server terminal (SSH), using the actual pairing code the bot just sent you.
Example (replace 123456 with your real code):
openclaw pairing approve telegram 123456
Notes:
- Donât type the
< >brackets â that was just a placeholder. - After approving, DM the bot again in Telegram (e.g.
hior/status) and it should reply.
If youâre not sure what the pending code is, you can list it:
openclaw pairing list telegram
â ď¸ Agent failed before reply: No API key found for provider "anthropic". Auth store: /home/jason/.openclaw/agents/main/agent/auth-profiles.json (agentDir: /home/jason/.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âs a different problem now (and itâs a good sign): Telegram is working, but when the bot tries to answer itâs using the Anthropic model (anthropic/...) and your gateway has no Anthropic credentials, so the agent fails before it can reply.
You have two ways forward:
Option A (what you want): switch the agent to Ollama (no API key required)
- Make sure Ollama is reachable on the server:
curl http://127.0.0.1:11434/api/tags
- Ensure the gateway service can âseeâ the Ollama opt-in env var (systemd wonât inherit your shell exports). Edit:
nano ~/.openclaw/.env
Add:
OLLAMA_API_KEY=ollama-local
(any value works; itâs just an opt-in)
- Pick an installed Ollama model name:
ollama list
- Set your default model to Ollama (replace
<model>with something fromollama list):
openclaw config set agents.defaults.model.primary "ollama/<model>"
systemctl --user restart openclaw-gateway.service
- Verify OpenClaw sees local models:
openclaw models list --local
openclaw models status
Then DM the Telegram bot again.
Docs: https://docs.openclaw.ai/providers/ollama
Option B: actually use Anthropic (needs credentials)
If you do want Anthropic, you need to add Anthropic auth for that agent (the error shows the empty auth store path). The easiest path is to re-run onboarding / auth setup on the gateway host and then retry.
Docs/troubleshooting: https://docs.openclaw.ai/gateway/troubleshooting (search âNo API key found for provider anthropicâ)
If you paste the output of openclaw models status (it shouldnât include secrets), I can tell you exactly what OpenClaw currently thinks your primary/fallback models are.
how do I type out option A in nano?
Only one part of Option A goes into nano: the .env file.
1) Add the Ollama opt-in env var (this is the ânanoâ step)
On the server:
nano ~/.openclaw/.env
In nano, add this single line:
OLLAMA_API_KEY=ollama-local
Save + exit:
- Ctrl+O (write out)
- Enter
- Ctrl+X (exit)
2) Pick an Ollama model name (terminal command, not nano)
ollama list
Pick a model from the left column (example: llama3.3).
3) Tell OpenClaw to use Ollama as the default model (terminal command)
Example (replace with your model name):
openclaw config set agents.defaults.model.primary "ollama/llama3.3"
4) Restart the gateway + test
systemctl --user restart openclaw-gateway.service
Then DM your Telegram bot again.
If you paste the output of ollama list (no secrets in that) I can tell you the exact ollama/<model> string to use.
jason@ai-companion:~$ openclaw config set agents.defaults.model.primary "ollama/llama3.3"
đŚ OpenClaw 2026.2.6-3 (85ed6c7) â I can run local, remote, or purely on vibesâresults may vary with DNS.
Failed to discover Ollama models: TimeoutError: The operation was aborted due to timeout
Updated agents.defaults.model.primary. Restart the gateway to apply.
Thatâs not an Anthropic issue anymore â it means OpenClaw tried to talk to your local Ollama HTTP API to verify/discover models, but the request to Ollama timed out.
OpenClawâs Ollama discovery expects Ollama to be reachable at http://127.0.0.1:11434.
1) First check: is Ollama actually reachable from this machine?
Run:
curl -m 3 http://127.0.0.1:11434/api/tags
- If that times out / canât connect â Ollama isnât running, is on a different host, or is bound to a different interface/port.
- If that returns JSON quickly â paste just the first few lines and weâll go to the next step.
Also check the port is listening:
ss -ltnp | grep 11434 || true
2) If Ollama is running on another machine (not localhost)
Then you need to point OpenClaw at it (and usually use explicit provider config). Tell me what host/IP your Ollama is on.
3) If Ollama is local but not running
Start/restart Ollama (depends how you installed it). Common check:
systemctl status ollama --no-pager
If that service exists, then:
sudo systemctl restart ollama
4) After Ollama responds, retry model selection + restart gateway
openclaw config set agents.defaults.model.primary "ollama/llama3.3"
systemctl --user restart openclaw-gateway.service
Paste the output of the curl -m 3 .../api/tags command (or the error you get). That will immediately tell us whatâs wrong (Ollama down vs wrong address vs firewall/bind).
$ curl -m 3 http://127.0.0.1:11434/api/tags
{"models":[{"name":"llama3.2:3b","model":"llama3.2:3b","modified_at":"2026-02-08T21:50:17.687709667-05:00","size":2019393189,"digest":"a80c4f17acd55265feec403c7aef86be0c25983ab279d83f3bcd3abbcb5b8b72","details":{"parent_model":"","format":"gguf","family":"llama","families":["llama"],"parss -ltnp | grep 11434 || truetion_level":"Q4_K_M"}}]}jason@ai-companion:~$ ss -ltnp | grep 11434 || true
LISTEN 0 4096 127.0.0.1:11434 0.0.0.0:*
Nice â Ollama is definitely up and reachable (/api/tags works + itâs listening on 127.0.0.1:11434). Two important things from your output:
- You donât have
llama3.3installed. You have:llama3.2:3b - OpenClaw is still trying to use Anthropic as a fallback somewhere, which will keep failing until you remove Anthropic or add an Anthropic key.
Do this (terminal commands on the server)
A) Set the primary model to the one you actually have
openclaw config set agents.defaults.model.primary "ollama/llama3.2:3b"
B) Clear fallbacks so it stops trying Anthropic
openclaw config set agents.defaults.model.fallbacks '[]' --json
C) Restart the gateway to apply
systemctl --user restart openclaw-gateway.service
D) Verify what model it will use
openclaw models status
Then DM the Telegram bot again.
About the âFailed to discover Ollama models: TimeoutErrorâ
That message is from OpenClawâs auto-discovery probe (it hits Ollama endpoints like /api/show). On slower machines it can time out even though Ollama is healthy.
If after the restart openclaw models status still isnât showing Ollama correctly, paste the output of openclaw models status and weâll switch to explicit Ollama provider config (which avoids discovery).
openclaw config set agents.defaults.model.primary "ollama/llama3.2:3b"
đŚ OpenClaw 2026.2.6-3 (85ed6c7) â One CLI to rule them all, and one more restart because you changed the port.
Failed to discover Ollama models: TimeoutError: The operation was aborted due to timeout
Updated agents.defaults.model.primary. Restart the gateway to apply.
jason@ai-companion:~$ openclaw config set agents.defaults.model.fallbacks '[]' --json
Failed to discover Ollama models: TimeoutError: The operation was aborted due to timeout
Updated agents.defaults.model.fallbacks. Restart the gateway to apply.
jason@ai-companion:~$ systemctl --user restart openclaw-gateway.service
jason@ai-companion:~$ openclaw models status
Those Failed to discover Ollama models: TimeoutError lines are coming from OpenClawâs Ollama auto-discovery probe timing out (it tries to query Ollama for model metadata). The important part is: your config changes still got written, but we need to confirm the gateway is actually using Ollama now (and not still trying Anthropic).
1) Quick checks (paste output)
Run:
curl -m 3 http://127.0.0.1:11434/v1/models
openclaw models status
Also check what model the gateway picked after restart:
journalctl --user -u openclaw-gateway.service -n 80 --no-pager | grep "agent model" || true
You want to see something like agent model: ollama/llama3.2:3b.
2) If models status still doesnât show Ollama cleanly (best workaround)
Skip auto-discovery entirely by adding an explicit Ollama provider config.
Run these (terminal commands, not nano):
openclaw config set models.providers.ollama.baseUrl "http://127.0.0.1:11434/v1"
openclaw config set models.providers.ollama.apiKey "ollama-local"
openclaw config set models.providers.ollama.api "openai-completions"
openclaw config set models.providers.ollama.models '[{
id: "llama3.2:3b",
name: "llama3.2:3b",
reasoning: false,
input: ["text"],
cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
contextWindow: 8192,
maxTokens: 8192
}]' --json
Then restart:
systemctl --user restart openclaw-gateway.service
Now your agents.defaults.model.primary should resolve without needing discovery.
(Reference: https://docs.openclaw.ai/providers/ollama â âExplicit setup (manual models)â)
3) Then test in Telegram
DM the bot again. If it still errors, run:
openclaw logs --follow
âŚand paste the first error line you see when you send a message.
Send me the outputs from step 1 (especially openclaw models status) and weâll lock it in.
journalctl --user -u openclaw-gateway.service -n 80 --no-pager | grep "agent model" || true
Feb 09 20:07:33 ai-companion node[53006]: 2026-02-10T01:07:33.556Z [gateway] agent model: anthropic/claude-opus-4-6
Feb 09 20:44:33 ai-companion node[53006]: 2026-02-10T01:44:33.581Z [gateway] agent model: ollama/llama3.3
Feb 09 20:51:55 ai-companion node[53006]: 2026-02-10T01:51:55.349Z [gateway] agent model: ollama/llama3.2:3b
Feb 09 20:52:51 ai-companion node[53006]: 2026-02-10T01:52:51.958Z [gateway] agent model: ollama/llama3.2:3b
Feb 09 20:53:48 ai-companion node[54679]: 2026-02-10T01:53:48.568Z [gateway] agent model: ollama/llama3.2:3b
Great â that log confirms the Gateway is now actually using Ollama:
agent model: ollama/llama3.2:3b
So the Anthropic âNo API key foundâ problem should be gone as long as the gateway has been restarted since that change (which it clearly has).
Now test end-to-end (Telegram â Gateway â Ollama â Telegram)
- On the server, run:
openclaw logs --follow
- DM your Telegram bot:
hi
You should see log lines for:
- an inbound telegram message
- an Ollama request
- and then a telegram send
If it still doesnât reply, paste the first error lines that appear right after you DM.
Also paste openclaw models status
Run:
openclaw models status
This will tell us whether OpenClaw thinks the Ollama provider/model is fully usable (and whether any hidden fallback is still set).
One note about the âFailed to discover Ollama models: TimeoutErrorâ
That warning happens during the config-set validation/probe and is annoying but not necessarily fatal (since the gateway is now running with the Ollama model).
If it does cause issues, the fix is what we discussed: add an explicit models.providers.ollama config so OpenClaw doesnât need discovery. But before we do that, letâs see if Telegram replies now.
bot in telegram is typing but no posted response
openclaw models status
đŚ OpenClaw 2026.2.6-3 (85ed6c7) â I can grep it, git blame it, and gently roast itâpick your coping mechanism.
Failed to discover Ollama models: TimeoutError: The operation was aborted due to timeout
Config : ~/.openclaw/openclaw.json
Agent dir : ~/.openclaw/agents/main/agent
Default : ollama/llama3.2:3b
Fallbacks (0) : -
Image model : -
Image fallbacks (0): -
Aliases (0) : -
Configured models (0): all
Auth overview
Auth store : ~/.openclaw/agents/main/agent/auth-profiles.json
Shell env : off
Providers w/ OAuth/tokens (0): -
- ollama effective=env:ollama-local | env=ollama-local | source=env: OLLAMA_API_KEY
OAuth/token status
- none
If Telegram shows âtypingâŚâ but never posts a message, it usually means the Gateway accepted your DM and sent sendChatAction, but the agent run is stuck waiting on the model (Ollama) or the send step is erroring.
1) Watch logs while you send one short test message
On the server, run:
openclaw logs --follow
Then in Telegram DM send something tiny like: ping
Wait ~20â30 seconds and paste the new log lines that appear (especially anything with [ollama], Timeout, HTTP, or [telegram] sendMessage).
2) Test Ollama directly (bypasses Telegram/OpenClaw)
This tells us if the model is just really slow on the Pi:
ollama run llama3.2:3b "Say hello in one sentence."
If that takes minutes / hangs, OpenClaw will also âtypeâ forever.
3) Confirm OpenClaw model + provider health
Paste this output:
openclaw models status
4) (Quick Telegram-specific workaround) disable draft streaming
Sometimes Telegram âdraft streamingâ can misbehave; turning it off makes replies simpler:
openclaw config set channels.telegram.streamMode "off"
systemctl --user restart openclaw-gateway.service
Send me the log snippet from step 1 + openclaw models status, and weâll know whether itâs:
- Ollama request hanging / timing out
- Ollama API mismatch
- Telegram send failing after generation
when I typed ping it never responded
If itâs âtypingâŚâ forever and never posts even for ping, we need to see what the Gateway is doing during that message. Right now weâre blind.
1) Turn off Telegram draft streaming (quick fix)
This removes one whole class of âstuck typing / no final sendâ issues:
openclaw config set channels.telegram.streamMode "off"
systemctl --user restart openclaw-gateway.service
Then DM the bot ping again.
2) Grab the log lines for that DM (most important)
Right after you DM ping, run:
openclaw logs --tail 200
âŚand paste the new lines near the end (you can redact IDs; no need to show tokens).
What weâre looking for is anything like:
[ollama] âŚrequest started but never finished- timeout / abort
- Telegram
sendMessagefailure - agent error before reply
(If you can do two SSH windows: run openclaw logs --follow in one, then DM ping, then copy what appears.)
3) Confirm the model isnât just hanging on the Pi
Run:
ollama run llama3.2:3b "Reply with exactly: pong"
- If this is very slow/hangs, OpenClaw will also âtypeâ forever.
- If it returns quickly, the issue is likely OpenClaw â Ollama API/tooling, not raw performance.
4) Paste openclaw models status
You started it earlier but didnât paste output. This tells us if any Anthropic fallback is still lurking.
openclaw models status
Send me the openclaw logs --tail 200 output after a ping DM + openclaw models status, and weâll pinpoint whether itâs Ollama call hanging, a timeout, or Telegram send failing.
I asked say hello in one sentence in the command line its takeing for ever and now the bot is typing but its also taking for ever
That behavior is consistent with the model just being too slow on your hardware:
- Telegram shows âtypingâŚâ because OpenClaw started handling your message.
- But Ollama is still generating, so thereâs nothing to send yet.
- Since
ollama run ...in your terminal is also âtaking foreverâ, this isnât a Telegram/OpenClaw bug â itâs raw inference speed.
1) Measure how slow it is (so we know what weâre dealing with)
Run:
time ollama run llama3.2:3b "Reply with exactly: pong"
If that takes like 1â5+ minutes, OpenClaw will feel âstuck typingâ for normal messages too.
2) Quick practical fixes (pick one)
A) Use a smaller model (fastest improvement on a Raspberry Pi)
Pull a smaller one and switch OpenClaw to it:
ollama pull llama3.2:1b
openclaw config set agents.defaults.model.primary "ollama/llama3.2:1b"
systemctl --user restart openclaw-gateway.service
Then test in Telegram again.
B) Force shorter replies (reduces generation time a lot)
Limit max output tokens for your Ollama model:
openclaw config set 'agents.defaults.models["ollama/llama3.2:3b"].params.maxTokens' 128 --json
systemctl --user restart openclaw-gateway.service
(That bracket syntax is needed because the model id contains / and :.)
C) Move Ollama to stronger hardware
Raspberry Pi + CPU-only LLMs can be painfully slow even for small prompts. Best experience is running Ollama on a PC/server with a decent CPU/GPU, then pointing OpenClaw at that host.
3) Sanity check: make sure itâs not swapping / OOM
Paste these outputs:
free -h
uptime
top -b -n 1 | head -20
If you tell me which Raspberry Pi model + RAM (4GB/8GB?) youâre on, I can be more specific about whatâs realistic and which model size to target.
I did option 2) but got openclaw config set agents.defaults.model.primary "ollama/llama3.2:1b"
systemctl --user restart openclaw-gateway.service
pulling manifest
pulling 74701a8c35f6: 100% âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ 1.3 GB
pulling 966de95ca8a6: 100% âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ 1.4 KB
pulling fcc5a6bec9da: 100% âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ 7.7 KB
pulling a70ff7e570d9: 100% âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ 6.0 KB
pulling 4f659a1e86d7: 100% âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ 485 B
verifying sha256 digest
writing manifest
success
đŚ OpenClaw 2026.2.6-3 (85ed6c7) â Your .env is showing; don't worry, I'll pretend I didn't see it.
Failed to discover Ollama models: TimeoutError: The operation was aborted due to timeout
Updated agents.defaults.model.primary. Restart the gateway to apply.
When you say you did âoption 2â, Iâm assuming you set the maxTokens=128 limit.
Two things to do now:
1) Verify the setting actually stuck
Run this and paste the output (it wonât include secrets):
openclaw config get 'agents.defaults.models["ollama/llama3.2:3b"]'
You should see something like params: { maxTokens: 128 } in there.
Also restart the gateway (if you havenât since setting it):
systemctl --user restart openclaw-gateway.service
2) Re-test speed (this is the real indicator)
In terminal:
time ollama run llama3.2:3b "Reply with exactly: pong"
Then in Telegram, DM the bot: ping
If itâs still taking forever
Limiting output tokens helps a bit, but if the model is CPU-bound on your Pi it may still be too slow. The practical fix is to switch to a smaller model:
ollama pull llama3.2:1b
openclaw config set agents.defaults.model.primary "ollama/llama3.2:1b"
systemctl --user restart openclaw-gateway.service
Reply with:
- the output of the
openclaw config get ...command above, and - how long the
time ollama run ... pongtest took (roughly).
Failed to discover Ollama models: TimeoutError: The operation was aborted due to timeout
Config path not found: agents.defaults.models["ollama/llama3.2:3b"]
Config path not found: agents.defaults.models["ollama/llama3.2:3b"] just means you donât currently have an agents.defaults.models section in your config, so thereâs nothing at that path to âgetâ yet.
That also means your âoption 2â (setting per-model maxTokens) didnât actually get written.
Set maxTokens correctly (this creates the missing path)
Run this exactly (note the single quotes around the path):
openclaw config set 'agents.defaults.models["ollama/llama3.2:3b"].params.maxTokens' 128 --json
systemctl --user restart openclaw-gateway.service
Then verify it exists:
openclaw config get 'agents.defaults.models["ollama/llama3.2:3b"]'
You should see something including params with maxTokens: 128.
About the âFailed to discover Ollama models: TimeoutError âŚâ
That warning is OpenClawâs Ollama auto-discovery probe timing out (common on slower boxes). Itâs annoying, but not necessarily fatalâyour gateway is already running with the Ollama model.
Real talk: if Ollama is âtaking foreverâ on the Pi, maxTokens might not be enough
If ollama run ... is very slow, Telegram will sit on âtypingâ until generation finishes. The practical fix is a smaller model:
ollama pull llama3.2:1b
openclaw config set agents.defaults.model.primary "ollama/llama3.2:1b"
systemctl --user restart openclaw-gateway.service
If you paste the output of:
time ollama run llama3.2:3b "Reply with exactly: pong"
âŚI can tell you whether your current model is remotely usable for chat or if you need to drop to 1B / move Ollama to stronger hardware.
$ openclaw config set 'agents.defaults.models["ollama/llama3.2:3b"].params.maxTokens' 128 --json
systemctl --user restart openclaw-gateway.service
Failed to discover Ollama models: TimeoutError: The operation was aborted due to timeout
Updated agents.defaults.models["ollama/llama3.2:3b"].params.maxTokens. Restart the gateway to apply.
Thatâs fine â it did write the setting:
Updated agents.defaults.models["ollama/llama3.2:3b"].params.maxTokens
Two important notes:
- That Ollama âdiscover timeoutâ warning is noisy but not the real failure here.
- In your pasted text you put
systemctl ...on the next line without a prompt, so it likely didnât actually run (OpenClaw printed âRestart the gateway to applyâ, meaning the restart still needs doing).
Do the restart as a separate command
Run:
systemctl --user restart openclaw-gateway.service
Verify the config value exists now
Run:
openclaw config get 'agents.defaults.models["ollama/llama3.2:3b"]'
You should see something like params: { maxTokens: 128 }.
Reality check: your Pi is probably just too slow for 3B
Even with maxTokens=128, a 3B model on a Raspberry Pi can still feel like âtyping foreverâ.
Fastest practical fix:
ollama pull llama3.2:1b
openclaw config set agents.defaults.model.primary "ollama/llama3.2:1b"
systemctl --user restart openclaw-gateway.service
Then DM the bot ping again.
If you want to confirm itâs purely speed, run:
time ollama run llama3.2:3b "Reply with exactly: pong"
and tell me roughly how long it takes.
~$ time ollama run llama3.2:3b "Reply with exactly: pong"
pong
real 0m11.885s
user 0m0.045s
sys 0m0.051s
11.9s for ollama run ... pong is totally reasonable â so âtyping foreverâ is probably not Telegram, itâs that OpenClawâs agent run isnât finishing / isnât sending.
Letâs isolate where itâs stuck with two quick tests.
1) Bypass the model (tests Telegram sending)
Use the Telegram user id you got in the pairing message:
openclaw message send --channel telegram --target <YOUR_TG_USER_ID> --message "test from openclaw"
- If you receive that message: Telegram send is fine â the problem is the LLM run.
- If you donât receive it: Telegram send is broken (then we check logs around
sendMessage).
2) Bypass Telegram (tests the agent+Ollama path)
Run:
time openclaw agent --message "Reply with exactly: pong"
- If this also hangs / takes minutes â OpenClawâOllama is the bottleneck (bigger prompt/context than your direct
ollama runtest). - If this returns quickly with
pongâ the agent is fine, so we look at Telegram delivery/log errors.
3) Quick config tweak (removes draft streaming weirdness)
Even though youâre seeing âtypingâŚâ, itâs worth disabling Telegram draft streaming:
openclaw config set channels.telegram.streamMode "off"
systemctl --user restart openclaw-gateway.service
4) If either test fails: grab the last log lines right after you DM âpingâ
Immediately after sending ping in Telegram:
openclaw logs --tail 200
Paste the bottom part that mentions [telegram] / [ollama] / error.
Run tests #1 and #2 and tell me what happened; that will pinpoint the exact layer thatâs stuck.
I recieved the message in test one, heres the information of test 2 $ time openclaw agent --message "Reply with exactly: pong"
đŚ OpenClaw 2026.2.6-3 (85ed6c7) â Welcome to the command line: where dreams compile and confidence segfaults.
Failed to discover Ollama models: TimeoutError: The operation was aborted due to timeout
Gateway agent failed; falling back to embedded: Error: Pass --to <E.164>, --session-id, or --agent to choose a session
Error: Pass --to <E.164>, --session-id, or --agent to choose a session
real 0m35.946s
user 0m49.092s
sys 0m2.336s
Nice â test 1 proving openclaw message send works means Telegram outbound is fine. So âbot is typing but never repliesâ is almost certainly the agent run/model call getting stuck/slow, not Telegram delivery.
A) Your test 2 command failed because openclaw agent needs a target
Run this instead (prints the reply in your terminal):
time openclaw agent --agent main --message "Reply with exactly: pong"
(Your earlier error was just âno session selectedâ, so it never actually ran the model.)
B) Quick check from Telegram: does /status respond?
In the Telegram DM, send:
/status
/status should reply quickly (often even when the model is slow).
- If
/statusworks but normal messages donât â itâs the Ollama run taking too long with OpenClawâs full prompt/context. - If
/statusalso doesnât work â we need logs immediately.
C) Turn off Telegram draft streaming (removes âtyping foreverâ weirdness)
Run on the server:
openclaw config set channels.telegram.streamMode "off"
systemctl --user restart openclaw-gateway.service
Then DM ping again.
D) Get the exact reason from logs (most important)
In one SSH window:
openclaw logs --follow
Then DM the bot ping and copy/paste the log lines that show up (look for [ollama] and any Timeout/error).
One more key point: your time ollama run ... took ~12s for a tiny prompt, but OpenClaw sends a much larger system prompt + context than your direct test, so it can still take way longer on a Pi. If logs show itâs just slow, we can speed it up by reducing bootstrap/context (agents.defaults.bootstrapMaxChars) or switching to a smaller model.
a) is still going ast 5 minutes b) /status was immediate and return with status information
ping gave no responce
That makes sense:
/statusis immediate because itâs a command path and doesnât need to run the LLM.- Normal messages (âpingâ, and
openclaw agent --message ...) do run the LLM, and on a Pi the prompt OpenClaw sends can be much larger than your simpleollama runtest (tools + system prompt + context), so it can take minutes even if âpongâ alone takes ~12s.
0) Stop the currently-stuck run
In Telegram, send:
/stop
1) Biggest speed win: donât send huge tool schemas to Ollama
Set Ollama to a minimal tool profile (shrinks the prompt a lot):
openclaw config set tools.byProvider.ollama.profile "minimal"
systemctl --user restart openclaw-gateway.service
(You can switch it back later; this is just to make âchat repliesâ responsive on local hardware.)
2) Also reduce injected bootstrap text (optional but helps)
openclaw config set agents.defaults.bootstrapMaxChars 2000 --json
systemctl --user restart openclaw-gateway.service
3) Re-test from terminal (should finish fast now)
time openclaw agent --agent main --message "Reply with exactly: pong" --thinking off
Then DM the Telegram bot ping.
4) If it still âtypes foreverâ: grab the exact bottleneck
Run this, then DM ping, then paste the new lines:
openclaw logs --follow
Weâre looking for where it stalls: building prompt vs calling Ollama vs sending Telegram.
If step (1) fixes it, please mark the solution in Discord (rightâclick â Apps â â Mark Solution) so itâs indexed.
Got it. Since /status replies immediately, Telegram + the gateway are fine. The reason ping gets no reply is: the LLM run is taking a long time (your openclaw agent ... pong still running after 5 minutes confirms it).
On a Pi, the biggest slowdown isnât âOllama is downâ (it isnât) â itâs that OpenClaw sends a much larger prompt than your simple ollama run ... test (system prompt + tool schemas + workspace bootstrap + session context). That can easily turn an 11âsecond Ollama run into minutes.
Do this to make Ollama runs much smaller/faster
- Restrict tools for Ollama to âminimalâ (this removes the huge tool JSON schemas from the prompt):
openclaw config set tools.byProvider.ollama.profile "minimal"
- Reduce injected bootstrap file size (also shrinks the prompt a lot):
openclaw config set agents.defaults.bootstrapMaxChars 2000 --json
- Restart:
systemctl --user restart openclaw-gateway.service
Re-test (terminal + Telegram)
Terminal:
time openclaw agent --agent main --message "Reply with exactly: pong"
Telegram DM: send ping
If itâs still hanging, we need the exact stall point from logs:
openclaw logs --follow
Then send one ping in Telegram and paste the new log lines that appear (especially anything mentioning [ollama] or timeout).
If you want an immediate workaround while we debug: switch to the smaller model (llama3.2:1b) â itâll feel much snappier on CPU-only hardware.
its been several minutes should I stop it and look at the logs?
Yes â stop it and grab logs. Right now you likely have a âstuckâ run holding the session, so you wonât get a clean test.
1) Stop the stuck run
In the Telegram DM, send:
/stop
(If youâre testing from terminal and itâs hanging, just Ctrl+C.)
2) Follow logs while you send ONE test message
On the server:
openclaw logs --follow
Then in Telegram DM send: ping
Wait ~15â30 seconds and copy/paste the new log lines that appear right after the inbound message. That will show exactly where itâs hanging (prompt build vs Ollama request vs Telegram send).
3) After you paste logs, weâll apply the fix
Most likely fix on a Pi is still:
openclaw config set tools.byProvider.ollama.profile "minimal"
openclaw config set agents.defaults.bootstrapMaxChars 2000 --json
systemctl --user restart openclaw-gateway.service
âŚbut letâs confirm from logs first so we donât guess.
Yes â stop the stuck run, then grab the right log lines (the chunk you pasted is old âdoctor/dashboardâ output and even references /home/aiuser/..., not the current /home/jason/... run).
1) Stop the stuck run
In the Telegram DM, send:
/stop
2) Reproduce once while watching logs (best signal)
On the server:
openclaw logs --follow
Then DM the bot: ping
Wait ~20â30 seconds, then copy/paste only the new lines that appeared (especially anything with telegram, ollama, agent, error, timeout).
If logs --follow is too noisy
Do this right after sending ping:
tail -n 200 /tmp/openclaw/openclaw-2026-02-09.log | grep -Ei 'telegram|ollama|agent|error|timeout|sendMessage'
Paste that output.
3) Quick speed knob (reduces prompt size for Ollama a lot)
This helps a ton on Pis because it stops sending huge tool schemas to the model:
openclaw config set tools.byProvider.ollama.profile "minimal"
openclaw config set channels.telegram.dmHistoryLimit 0 --json
systemctl --user restart openclaw-gateway.service
Then try ping again.
One important security note
Your pasted log includes a dashboard URL with #token=.... Since you posted it publicly, treat that token as compromised. Itâs loopback-only so risk is limited, but still: regenerate/rotate it and donât paste the new one into Discord.
Run (and donât share the output):
openclaw doctor --generate-gateway-token
systemctl --user restart openclaw-gateway.service
Send the filtered log snippet from step (2) after a fresh ping and weâll pinpoint exactly where itâs hanging.
tail -n 200 /tmp/openclaw/openclaw-2026-02-09.log | grep -Ei 'telegram|ollama|agent|error|timeout|sendMessage'
{"0":"{\n "service": {\n "label": "systemd",\n "loaded": false,\n "loadedText": "enabled",\n "notLoadedText": "disabled",\n "command": null,\n "runtime": {\n "status": "unknown",\n "detail": "Error: systemctl --user unavailable: Failed to connect to bus: No medium found"\n },\n "configAudit": {\n "ok": false,\n "issues": [\n {\n "code": "gateway-path-missing",\n "message": "Gateway service PATH is not set; the daemon should use a minimal PATH.",\n "level": "recommended"\n }\n ]\n }\n },\n "config": {\n "cli": {\n "path": "/home/aiuser/.openclaw/openclaw.json",\n "exists": true,\n "valid": true\n },\n "daemon": {\n "path": "/home/aiuser/.openclaw/openclaw.json",\n "exists": true,\n "valid": true\n }\n },\n "gateway": {\n "bindMode": "loopback",\n "bindHost": "127.0.0.1",\n "port": 18789,\n "portSource": "env/config",\n "probeUrl": "ws://127.0.0.1:18789",\n "probeNote": "Loopback-only gateway; only local clients can connect."\n },\n "port": {\n "port": 18789,\n "status": "free",\n "listeners": [],\n "hints": []\n },\n "rpc": {\n "ok": false,\n "error": "gateway closed (1006 abnormal closure (no close frame)): no close reason\nGateway target: ws://127.0.0.1:18789\nSource: cli --url\nConfig: /home/aiuser/.openclaw/openclaw.json",\n "url": "ws://127.0.0.1:18789"\n },\n "extraServices": []\n}","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"openclaw","date":"2026-02-09T05:49:55.106Z","logLevelId":3,"logLevelName":"INFO","path":{"fullFilePath":"file:///home/aiuser/.npm-global/lib/node_modules/openclaw/dist/entry.js:915:46","fileName":"entry.js","fileNameWithLine":"entry.js:915","fileColumn":"46","fileLine":"915","filePath":".npm-global/lib/node_modules/openclaw/dist/entry.js","filePathWithLine":".npm-global/lib/node_modules/openclaw/dist/entry.js:915","method":"console.log"}},"time":"2026-02-09T05:49:55.106Z"}
is that the right log?
Not really â what you pasted earlier is mostly startup / doctor / dashboard noise (and it even shows paths like /home/aiuser/...), not the bit we need for âI sent ping and it never repliedâ.
What we need is the log from the moment you send ping, showing:
- Telegram inbound message received (something like
[telegram] ⌠update/message âŚ) - an Ollama request starting/finishing (something like
[ollama] âŚ) - either a Telegram sendMessage or an error/timeout
Easiest way to get the right log
- Open a terminal on the server and run:
openclaw logs --follow
- Now send
pingin the Telegram DM.
- Copy/paste the new lines that appear right after you send it (like 30â80 lines). Thatâs the âright logâ.
If you canât do follow, do tail + filter (right after sending ping)
tail -n 300 /tmp/openclaw/openclaw-2026-02-09.log | grep -Ei 'telegram|ollama|sendMessage|chatAction|error|timeout|run'
(If todayâs log file name is different, first do ls -lt /tmp/openclaw/openclaw-*.log | head and tail the newest one.)
One more thing
Your earlier paste included a dashboard URL with #token=.... Donât paste that again; treat it like a password. Rotate it later once weâre done debugging.
If you paste the âfollowâ snippet around the ping, weâll be able to tell exactly where itâs hanging.
openclaw logs --follow gives me that openclaw doctor stuff
It can still be the right log file â itâs just that your log stream currently contains a bunch of older doctor/dashboard entries, so it looks like âthe wrong thingâ.
Two better ways to get only the gateway runtime logs (and see what happens when you DM ping):
Option 1 (best): follow the systemd service logs
This wonât include random CLI âdoctorâ output.
On the server:
journalctl --user -u openclaw-gateway.service -f --no-pager
Now DM the bot ping and watch what new lines appear. Copy/paste the new lines around that moment.
Option 2: show only Telegram channel logs
This filters out most noise:
openclaw channels logs --channel telegram --lines 200
Then DM ping again and re-run that command and paste the newest lines.
Why this matters
We need to see whether the gateway:
- receives the Telegram message,
- starts an Ollama request,
- then hangs/aborts/never sends
sendMessage.
One important warning
Earlier you pasted a dashboard URL with #token=.... That token is basically a password. Donât paste it again; rotate it later.
Try Option 1 (journalctl -f) and send ping, and paste what shows up.
Feb 09 22:17:09 ai-companion node[57505]: 2026-02-10T03:17:09.369Z [telegram] [default] starting provider (@Tr1nbot)
Feb 09 22:17:09 ai-companion node[57505]: 2026-02-10T03:17:09.422Z [telegram] autoSelectFamily=false (default-node22)
Feb 09 22:19:15 ai-companion node[57505]: 2026-02-10T03:19:15.427Z [agent/embedded] workspace bootstrap file AGENTS.md is 7804 chars (limit 2000); truncating in injected context (sessionKey=agent:main:main)
Feb 09 22:21:14 ai-companion node[57505]: 2026-02-10T03:21:14.943Z typing TTL reached (2m); stopping typing indicator
Feb 09 22:32:00 ai-companion node[57505]: 2026-02-10T03:32:00.567Z [agent/embedded] workspace bootstrap file AGENTS.md is 7804 chars (limit 2000); truncating in injected context (sessionKey=agent:main:main)
Feb 09 22:34:00 ai-companion node[57505]: 2026-02-10T03:34:00.218Z typing TTL reached (2m); stopping typing indicator
Feb 09 22:43:09 ai-companion node[57505]: 2026-02-10T03:43:09.052Z [agent/embedded] workspace bootstrap file AGENTS.md is 7804 chars (limit 2000); truncating in injected context (sessionKey=agent:main:main)
Feb 09 22:44:58 ai-companion node[57505]: 2026-02-10T03:44:58.956Z [ws] closed before connect conn=3d3252c7-cc2b-4f41-b74f-be729263b827 remote=127.0.0.1 fwd=n/a origin=n/a host=127.0.0.1:18789 ua=n/a code=1006 reason=n/a
Feb 09 22:45:08 ai-companion node[57505]: 2026-02-10T03:45:08.609Z typing TTL reached (2m); stopping typing indicator
Feb 09 22:45:20 ai-companion node[57505]: 2026-02-10T03:45:20.057Z [tools] session_status failed: Unknown sessionId: 1520493833+1m 2026-02-09 22:43 EST
Yep â this is the right kind of log now. And it tells us something important:
typing TTL reached (2m); stopping typing indicator
= OpenClaw started handling your DM (so Telegram inbound is fine), but the LLM run didnât finish within 2 minutes, so it never had a final message to send.
The AGENTS.md ⌠truncating line is also telling us the prompt/context is still âbig-ishâ (even though itâs truncating), which can make Ollama runs on a Pi take minutes.
Do this âclean reset + shrink promptâ sequence
- Stop the stuck run
In Telegram DM send:
/stop
- Start a fresh session (clears accumulated context)
In Telegram DM send:
/new
- Make Ollama prompts much smaller
Run on the server:
openclaw config set tools.byProvider.ollama.profile "minimal"
openclaw config set channels.telegram.dmHistoryLimit 0 --json
systemctl --user restart openclaw-gateway.service
Why these help:
tools.byProvider.ollama.profile minimalremoves the huge tool-schema blob from what gets sent to Ollama.dmHistoryLimit 0stops stuffing prior DM history into the prompt.
- Test again
DM the bot:
ping
If it still hangs: capture the âOllama callâ lines
While reproducing, follow service logs:
journalctl --user -u openclaw-gateway.service -f --no-pager
After you send ping, look for any lines containing ollama, openai, completion, error, or timeout. If none show up, weâll temporarily bump logging to debug.
Also: the [ws] closed before connect ⌠code=1006 line is usually just a local client (dashboard/CLI) connecting and dropping early â itâs probably not the main issue.
Run the 3 config commands + /new and tell me if ping starts replying.
Feb 09 22:52:44 ai-companion node[57505]: 2026-02-10T03:52:44.309Z [gateway] log file: /tmp/openclaw/openclaw-2026-02-09.log
Feb 09 22:52:44 ai-companion node[57505]: 2026-02-10T03:52:44.325Z [browser/service] Browser control service ready (profiles=2)
Feb 09 22:52:45 ai-companion node[57505]: 2026-02-10T03:52:45.009Z [telegram] [default] starting provider (@Tr1nbot)
Feb 09 22:53:24 ai-companion systemd[17652]: Stopping openclaw-gateway.service - OpenClaw Gateway (v2026.2.6-3)...
Feb 09 22:53:24 ai-companion node[57505]: 2026-02-10T03:53:24.517Z [gateway] signal SIGTERM received
Feb 09 22:53:24 ai-companion node[57505]: 2026-02-10T03:53:24.526Z [gateway] received SIGTERM; shutting down
Feb 09 22:53:24 ai-companion node[57505]: 2026-02-10T03:53:24.571Z [gmail-watcher] gmail watcher stopped
Feb 09 22:53:24 ai-companion systemd[17652]: Stopped openclaw-gateway.service - OpenClaw Gateway (v2026.2.6-3).
Feb 09 22:53:24 ai-companion systemd[17652]: openclaw-gateway.service: Consumed 1min 14.467s CPU time.
Feb 09 22:53:24 ai-companion systemd[17652]: Started openclaw-gateway.service - OpenClaw Gateway (v2026.2.6-3).
Feb 09 22:54:05 ai-companion node[58971]: 2026-02-10T03:54:05.193Z [canvas] host mounted at http://127.0.0.1:18789/__openclaw__/canvas/ (root /home/jason/.openclaw/canvas)
Feb 09 22:54:05 ai-companion node[58971]: 2026-02-10T03:54:05.373Z [heartbeat] started
Feb 09 22:54:05 ai-companion node[58971]: 2026-02-10T03:54:05.382Z [gateway] agent model: ollama/llama3.2:1b
Feb 09 22:54:05 ai-companion node[58971]: 2026-02-10T03:54:05.388Z [gateway] listening on ws://127.0.0.1:18789 (PID 58971)
Feb 09 22:54:05 ai-companion node[58971]: 2026-02-10T03:54:05.418Z [gateway] listening on ws://[::1]:18789
Feb 09 22:54:05 ai-companion node[58971]: 2026-02-10T03:54:05.421Z [gateway] log file: /tmp/openclaw/openclaw-2026-02-09.log
Feb 09 22:54:05 ai-companion node[58971]: 2026-02-10T03:54:05.456Z [browser/service] Browser control service ready (profiles=2)
Feb 09 22:54:06 ai-companion node[58971]: 2026-02-10T03:54:06.143Z [telegram] [default] starting provider (@Tr1nbot)
Feb 09 22:54:06 ai-companion node[58971]: 2026-02-10T03:54:06.175Z [telegram] autoSelectFamily=false (default-node22)
Feb 09 22:54:07 ai-companion node[58971]: 2026-02-10T03:54:07.278Z [agent/embedded] workspace bootstrap file AGENTS.md is 7804 chars (limit 2000); truncating in injected context (sessionKey=agent:main:main)
Feb 09 22:54:07 ai-companion node[58971]: 2026-02-10T03:54:07.328Z [agent/embedded] Removed orphaned user message to prevent consecutive user turns. runId=593d806c-5447-4256-978c-b1d0dfe595a5 sessionId=7c92d9a8-fe2e-4a28-893e-acce090376db
Yep â this log is useful, and it explains why you might have seen âno responseâ right after the restart.
What your log is saying
- Gateway restarted cleanly and is now running with:
agent model: ollama/llama3.2:1b(goodâthis should be faster)- Telegram started again
- Then:
Removed orphaned user message to prevent consecutive user turns
That âorphaned user messageâ usually happens when you send a message during/around a restart (or after a /stop) and the session transcript ends up with two user messages in a row; OpenClaw drops one to keep the history consistent. Net effect: one of your messages may be ignored.
Do this now (clean test)
- In Telegram DM:
- send:
/new - then send:
ping
- On the server, watch live gateway logs while you do it:
journalctl --user -u openclaw-gateway.service -f --no-pager
When you send ping, you should see something indicating it received the Telegram message, then (ideally) an Ollama run, then a send.
If it still âtypesâ and never replies
Paste the new lines that appear right after you send ping (from that journalctl -f window).
Also run this once and paste it:
openclaw channels logs --channel telegram --lines 200
That will tell us whether itâs:
- stuck waiting on Ollama again (youâll see typing TTL messages), or
- finishing but failing to send (youâd see
sendMessageerrors), or
- queue/session weirdness.
(And donât worry about the AGENTS.md ⌠truncating lineâthatâs fine and expected.)
Feb 09 22:54:05 ai-companion node[58971]: 2026-02-10T03:54:05.388Z [gateway] listening on ws://127.0.0.1:18789 (PID 58971)
Feb 09 22:54:05 ai-companion node[58971]: 2026-02-10T03:54:05.418Z [gateway] listening on ws://[::1]:18789
Feb 09 22:54:05 ai-companion node[58971]: 2026-02-10T03:54:05.421Z [gateway] log file: /tmp/openclaw/openclaw-2026-02-09.log
Feb 09 22:54:05 ai-companion node[58971]: 2026-02-10T03:54:05.456Z [browser/service] Browser control service ready (profiles=2)
Feb 09 22:54:06 ai-companion node[58971]: 2026-02-10T03:54:06.143Z [telegram] [default] starting provider (@Tr1nbot)
Feb 09 22:54:06 ai-companion node[58971]: 2026-02-10T03:54:06.175Z [telegram] autoSelectFamily=false (default-node22)
Feb 09 22:54:07 ai-companion node[58971]: 2026-02-10T03:54:07.278Z [agent/embedded] workspace bootstrap file AGENTS.md is 7804 chars (limit 2000); truncating in injected context (sessionKey=agent:main:main)
Feb 09 22:54:07 ai-companion node[58971]: 2026-02-10T03:54:07.328Z [agent/embedded] Removed orphaned user message to prevent consecutive user turns. runId=593d806c-5447-4256-978c-b1d0dfe595a5 sessionId=7c92d9a8-fe2e-4a28-893e-acce090376db
Feb 09 22:56:06 ai-companion node[58971]: 2026-02-10T03:56:06.897Z typing TTL reached (2m); stopping typing indicator
Feb 09 22:58:07 ai-companion node[58971]: 2026-02-10T03:58:07.009Z [agent/embedded] workspace bootstrap file AGENTS.md is 7804 chars (limit 2000); truncating in injected context (sessionKey=agent:main:main)
openclaw logs --follow showing âdoctor stuffâ usually means youâre running the CLI as the wrong Linux user / wrong config, so it canât reach the running gateway and falls back to printing diagnostics.
The journalctl -f output you pasted is the right place to look, and it shows the real symptom:
typing TTL reached (2m)= the run started, but it never completed (so nothing was sent).
At this point Iâd do two things: (1) make sure youâre always running commands as jason, and (2) eliminate Ollama auto-discovery/timeouts by switching to explicit Ollama provider config.
0) Make sure youâre the right user
On the server:
whoami
openclaw status
You want it to show config under /home/jason/... and gateway reachable.
1) Stop the currently-stuck run + start clean
In Telegram DM:
/stop/new
(One of your messages got dropped earlier as an âorphaned user messageâ due to restarts, so this clears the mess.)
2) Disable Ollama auto-discovery (explicit provider config)
This stops OpenClaw from doing the Ollama âdiscoveryâ calls that keep timing out.
Run on the server:
openclaw config set models.providers.ollama.baseUrl "http://127.0.0.1:11434/v1"
openclaw config set models.providers.ollama.apiKey "ollama-local"
openclaw config set models.providers.ollama.api "openai-completions"
openclaw config set models.providers.ollama.models '[{
id: "llama3.2:1b",
name: "llama3.2:1b",
reasoning: false,
input: ["text"],
cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
contextWindow: 8192,
maxTokens: 256
}]' --json
Then ensure your primary model matches:
openclaw config set agents.defaults.model.primary "ollama/llama3.2:1b"
Restart gateway:
systemctl --user restart openclaw-gateway.service
3) Test without Telegram (fastest sanity check)
time openclaw agent --agent main --message "Reply with exactly: pong"
If that returns quickly, Telegram will work too.
4) If Telegram still âtypesâ forever: capture the right lines
Run:
journalctl --user -u openclaw-gateway.service -f --no-pager
Then DM ping and paste the new lines that appear after the inbound message.
If you do steps 2â3 and it still hangs, paste the output of openclaw models status next.
Feb 09 23:09:53 ai-companion node[59745]: 2026-02-10T04:09:53.741Z [canvas] host mounted at http://127.0.0.1:18789/__openclaw__/canvas/ (root /home/jason/.openclaw/canvas)
Feb 09 23:09:53 ai-companion node[59745]: 2026-02-10T04:09:53.867Z [heartbeat] started
Feb 09 23:09:53 ai-companion node[59745]: 2026-02-10T04:09:53.886Z [gateway] agent model: ollama/llama3.2:1b
Feb 09 23:09:53 ai-companion node[59745]: 2026-02-10T04:09:53.895Z [gateway] listening on ws://127.0.0.1:18789 (PID 59745)
Feb 09 23:09:53 ai-companion node[59745]: 2026-02-10T04:09:53.901Z [gateway] listening on ws://[::1]:18789
Feb 09 23:09:53 ai-companion node[59745]: 2026-02-10T04:09:53.914Z [gateway] log file: /tmp/openclaw/openclaw-2026-02-09.log
Feb 09 23:09:53 ai-companion node[59745]: 2026-02-10T04:09:53.991Z [browser/service] Browser control service ready (profiles=2)
Feb 09 23:09:54 ai-companion node[59745]: 2026-02-10T04:09:54.506Z [telegram] [default] starting provider (@Tr1nbot)
Feb 09 23:09:54 ai-companion node[59745]: 2026-02-10T04:09:54.592Z [telegram] autoSelectFamily=false (default-node22)
Feb 09 23:10:32 ai-companion node[59745]: 2026-02-10T04:10:32.643Z [agent/embedded] workspace bootstrap file AGENTS.md is 7804 chars (limit 2000); truncating in injected context (sessionKey=agent:main:main)
Yep, thatâs the right log stream (systemd/journal for the gateway). What you pasted there just doesnât include the âwhat happened after I sent pingâ part yet â itâs mostly startup, then one line that strongly suggests a message kicked off a run:
[agent/embedded] ... truncating in injected context (sessionKey=agent:main:main)
That typically happens right when the agent is about to call the model.
Two very likely culprits right now
1) You switched the gateway to ollama/llama3.2:1b but havenât actually pulled that model
If Ollama starts downloading the model on first use, OpenClaw will look like itâs âtyping foreverâ.
Run:
ollama list
If you donât see llama3.2:1b, do:
ollama pull llama3.2:1b
time ollama run llama3.2:1b "Reply with exactly: pong"
That should complete fast once the model is local.
2) We still donât have enough logging to see the Ollama call
Your current journal output doesnât show [ollama] ... lines. Letâs temporarily crank console logs to debug so we can see the model request/timeout:
openclaw config set logging.consoleLevel "debug"
systemctl --user restart openclaw-gateway.service
That log you pasted is still just startup + âagent is about to runâ. It doesnât include the crucial part (the Ollama request / error) yet.
Two things to check next:
1) Make sure the ollama/llama3.2:1b model is actually installed
Right now your gateway is configured to use ollama/llama3.2:1b. If itâs not pulled yet, Ollama will download in the background and OpenClaw will look like itâs âtyping foreverâ.
Run:
ollama list
If you donât see llama3.2:1b, do:
ollama pull llama3.2:1b
time ollama run llama3.2:1b "Reply with exactly: pong"
(That should be fast once the model is local.)
2) Capture the right log lines for a ping
Do this in two terminals (or do step A then B quickly):
A) Start following the gateway service logs:
journalctl --user -u openclaw-gateway.service -f --no-pager
B) In Telegram DM:
- send
/new
- then send
ping
Now look back at journalctl -f. You should see new lines appear. Paste the lines that show up after you send ping (weâre looking for anything mentioning ollama, openai, timeout, error, or another âtyping TTL reachedâ).
If journalctl still doesnât show Ollama-specific lines
Then pull from the file log (this usually includes more detail):
tail -n 400 /tmp/openclaw/openclaw-2026-02-09.log | grep -Ei 'telegram|ollama|openai|error|timeout|typing'
Paste that output.
If you reply with:
ollama listoutput, and
- the âafter pingâ log lines,
we can tell whether itâs (a) model not installed / downloading, (b) Ollama request hanging, or (c) something else in the agent run.
Then:
journalctl --user -u openclaw-gateway.service -f --no-pager
Now DM the bot ping and paste the new lines that show up (weâre looking for anything mentioning ollama, openai, request, timeout, error).
Quick âclean runâ steps before testing again
In Telegram DM:
/stop/new- then
ping
If you paste your ollama list output (safe) I can tell you immediately whether the âmodel downloading / not installedâ issue is the cause.
journalctl --user -u openclaw-gateway.service -f --no-pager
Feb 09 23:20:32 ai-companion node[59745]: 2026-02-10T04:20:32.695Z [agent/embedded] embedded run timeout: runId=9e9f4ab9-872a-47cc-83ec-00bc331d604d sessionId=e765ba62-9b84-49d7-8ac0-438fb52d22a0 timeoutMs=600000
Feb 09 23:20:32 ai-companion node[59745]: 2026-02-10T04:20:32.882Z â
New session started ¡ model: ollama/llama3.2:1b
Feb 09 23:21:10 ai-companion node[59745]: 2026-02-10T04:21:10.746Z [agent/embedded] workspace bootstrap file AGENTS.md is 7804 chars (limit 2000); truncating in injected context (sessionKey=agent:main:main)
Feb 09 23:21:13 ai-companion systemd[17652]: Stopping openclaw-gateway.service - OpenClaw Gateway (v2026.2.6-3)...
Feb 09 23:21:13 ai-companion node[59745]: 2026-02-10T04:21:13.030Z [gateway] signal SIGTERM received
Feb 09 23:21:13 ai-companion node[59745]: 2026-02-10T04:21:13.032Z [gateway] received SIGTERM; shutting down
Feb 09 23:21:13 ai-companion node[59745]: 2026-02-10T04:21:13.076Z [gmail-watcher] gmail watcher stopped
Feb 09 23:21:14 ai-companion systemd[17652]: Stopped openclaw-gateway.service - OpenClaw Gateway (v2026.2.6-3).
Feb 09 23:21:14 ai-companion systemd[17652]: openclaw-gateway.service: Consumed 55.446s CPU time.
Feb 09 23:21:14 ai-companion systemd[17652]: Started openclaw-gateway.service - OpenClaw Gateway (v2026.2.6-3).
Feb 09 23:21:55 ai-companion node[60115]: 2026-02-10T04:21:55.755Z [canvas] host mounted at http://127.0.0.1:18789/__openclaw__/canvas/ (root /home/jason/.openclaw/canvas)
Feb 09 23:21:55 ai-companion node[60115]: 2026-02-10T04:21:55.964Z [heartbeat] started
Feb 09 23:21:55 ai-companion node[60115]: 2026-02-10T04:21:55.974Z [gateway] agent model: ollama/llama3.2:1b
Feb 09 23:21:55 ai-companion node[60115]: 2026-02-10T04:21:55.981Z [gateway] listening on ws://127.0.0.1:18789 (PID 60115)
Feb 09 23:21:55 ai-companion node[60115]: 2026-02-10T04:21:55.984Z [gateway] listening on ws://[::1]:18789
Feb 09 23:21:55 ai-companion node[60115]: 2026-02-10T04:21:55.991Z [gateway] log file: /tmp/openclaw/openclaw-2026-02-09.log
Feb 09 23:21:56 ai-companion node[60115]: 2026-02-10T04:21:56.038Z [browser/service] Browser control service ready (profiles=2)
Feb 09 23:21:56 ai-companion node[60115]: 2026-02-10T04:21:56.531Z [telegram] [default] starting provider (@Tr1nbot)
Feb 09 23:21:56 ai-companion node[60115]: 2026-02-10T04:21:56.590Z [telegram] autoSelectFamily=false (default-node22)
Feb 09 23:21:56 ai-companion node[60115]: 2026-02-10T04:21:56.882Z [skills] Sanitized skill command name "skill-creator" to "/skill_creator".
tail -n 400 /tmp/openclaw/openclaw-2026-02-09.log | grep -Ei 'telegram|ollama|openai|error|timeout|typing'
{"0":"{\n "service": {\n "label": "systemd",\n "loaded": false,\n "loadedText": "enabled",\n "notLoadedText": "disabled",\n "command": null,\n "runtime": {\n "status": "unknown",\n "detail": "Error: systemctl --user unavailable: Failed to connect to bus: No medium found"\n },\n "configAudit": {\n "ok": false,\n "issues": [\n {\n "code": "gateway-path-missing",\n "message": "Gateway service PATH is not set; the daemon should use a minimal PATH.",\n "level": "recommended"\n }\n ]\n }\n },\n "config": {\n "cli": {\n "path": "/home/aiuser/.openclaw/openclaw.json",\n "exists": true,\n "valid": true\n },\n "daemon": {\n "path": "/home/aiuser/.openclaw/openclaw.json",\n "exists": true,\n "valid": true\n }\n },\n "gateway": {\n "bindMode": "loopback",\n "bindHost": "127.0.0.1",\n "port": 18789,\n "portSource": "env/config",\n "probeUrl": "ws://127.0.0.1:18789",\n "probeNote": "Loopback-only gateway; only local clients can connect."\n },\n "port": {\n "port": 18789,\n "status": "free",\n "listeners": [],\n "hints": []\n },\n "rpc": {\n "ok": false,\n "error": "gateway closed (1006 abnormal closure (no close frame)): no close reason\nGateway target: ws://127.0.0.1:18789\nSource: cli --url\nConfig: /home/aiuser/.openclaw/openclaw.json",\n "url": "ws://127.0.0.1:18789"\n },\n "extraServices": []\n}","_meta":{"runtime":"node","runtimeVersion":"22.22.0","hostname":"unknown","name":"openclaw","date":"2026-02-09T05:49:55.106Z","logLevelId":3,"logLevelName":"INFO","path":{"fullFilePath":"file:///home/aiuser/.npm-global/lib/node_modules/openclaw/dist/entry.js:915:46","fileName":"entry.js","fileNameWithLine":"entry.js:915","fileColumn":"46","fileLine":"915","filePath":".npm-global/lib/node_modules/openclaw/dist/entry.js","filePathWithLine":".npm-global/lib/node_modules/openclaw/dist/entry.js:915","method":"console.log"}},"time":"2026-02-09T05:49:55.106Z"}
No â that grep output is not the useful part for your current problem.
What you pasted is an old openclaw doctor JSON blob from /home/aiuser/... that happened to match error|timeout. Itâs not showing the gateway processing your ping at all.
Right now your gateway is configured to use:
agent model: ollama/llama3.2:1b
âŚbut earlier you only showed llama3.2:3b installed. If 1b isnât actually pulled yet, Ollama will try to download it on first use and OpenClaw will âtype foreverâ.
1) Confirm the model exists (most likely fix)
Run:
ollama list
If you donât see llama3.2:1b, run:
ollama pull llama3.2:1b
time ollama run llama3.2:1b "Reply with exactly: pong"
(Do this once so itâs fully downloaded/cached.)
2) Verify Ollamaâs OpenAI API endpoint works (what OpenClaw uses)
You already proved /api/tags works. Now check /v1:
curl -m 3 http://127.0.0.1:11434/v1/models
3) Then do a clean Telegram test
In Telegram DM:
/stop/newping
And watch the gateway service logs (this is the correct log source):
journalctl --user -u openclaw-gateway.service -f --no-pager
If it still doesnât reply, paste the lines that appear right after you send ping (weâre looking for typing TTL reached, ollama, or any timeout/error).
Start with ollama list output â that will probably explain it immediately.
Feb 09 23:34:21 ai-companion node[60115]: 2026-02-10T04:34:21.827Z [diagnostic] lane dequeue: lane=session:agent:main:main waitMs=5 queueSize=0
Feb 09 23:34:21 ai-companion node[60115]: 2026-02-10T04:34:21.831Z [diagnostic] lane enqueue: lane=main queueSize=1
Feb 09 23:34:21 ai-companion node[60115]: 2026-02-10T04:34:21.838Z [diagnostic] lane dequeue: lane=main waitMs=3 queueSize=0
Feb 09 23:34:21 ai-companion node[60115]: 2026-02-10T04:34:21.915Z [agent/embedded] embedded run start: runId=c00d4554-92d4-499b-8baa-e683fa1207f6 sessionId=12c24bdd-da60-4efa-ba52-d67c8da4c972 provider=ollama model=llama3.2:1b thinking=off messageChannel=unknown
Feb 09 23:34:21 ai-companion node[60115]: 2026-02-10T04:34:21.921Z [agent/embedded] workspace bootstrap file AGENTS.md is 7804 chars (limit 2000); truncating in injected context (sessionKey=agent:main:main)
Feb 09 23:34:21 ai-companion node[60115]: 2026-02-10T04:34:21.956Z [diagnostic] session state: sessionId=12c24bdd-da60-4efa-ba52-d67c8da4c972 sessionKey=unknown prev=idle new=processing reason="run_started" queueDepth=0
Feb 09 23:34:21 ai-companion node[60115]: 2026-02-10T04:34:21.958Z [diagnostic] run registered: sessionId=12c24bdd-da60-4efa-ba52-d67c8da4c972 totalActive=1
Feb 09 23:34:21 ai-companion node[60115]: 2026-02-10T04:34:21.960Z [agent/embedded] embedded run prompt start: runId=c00d4554-92d4-499b-8baa-e683fa1207f6 sessionId=12c24bdd-da60-4efa-ba52-d67c8da4c972
Feb 09 23:34:21 ai-companion node[60115]: 2026-02-10T04:34:21.962Z [agent/embedded] embedded run agent start: runId=c00d4554-92d4-499b-8baa-e683fa1207f6
Feb 09 23:34:26 ai-companion node[60115]: 2026-02-10T04:34:26.902Z [diagnostic] run active check: sessionId=12c24bdd-da60-4efa-ba52-d67c8da4c972 active=true
These lines are exactly what we need â they show the run starts, builds the prompt, then⌠never finishes:
embedded run start ⌠provider=ollama model=llama3.2:1b ⌠messageChannel=unknown
âŚ
run active check ⌠active=true
Two key takeaways:
- OpenClaw is starting an Ollama run (good).
messageChannel=unknownstrongly suggests this particular run was not triggered by a Telegram inbound message (itâs more like a CLI/heartbeat run), so it may not even have a place to deliver the reply to.
Letâs make sure weâre logging the Telegram-triggered run and also confirm Ollama has the model.
1) Confirm the model actually exists + is fast
Run:
ollama list
time ollama run llama3.2:1b "Reply with exactly: pong"
(If llama3.2:1b isnât in ollama list, pull it: ollama pull llama3.2:1b.)
2) Donât use openclaw agent while testing Telegram (it can âstealâ the main session)
Telegram DMs use the shared session key agent:main:main. If you run CLI tests against the same agent/session, you can confuse routing.
If you do want a CLI test, isolate it:
time openclaw agent --agent main --session-id cli-test --message "Reply with exactly: pong"
3) Capture the Telegram-triggered run (this is the smoking gun)
Start following logs:
journalctl --user -u openclaw-gateway.service -f --no-pager
Now in Telegram DM do:
/new- then send
ping
In the log output, you should see a run start where messageChannel=telegram (or at least some [telegram] inbound lines right before the run).
Paste the lines from when you send ping until either:
- it replies, or
- you hit
typing TTL reached (2m)again, or - you see an error/timeout.
4) If it keeps running forever: force a shorter timeout so it fails loudly
This makes debugging much easier:
openclaw config set agents.defaults.timeoutSeconds 60 --json
systemctl --user restart openclaw-gateway.service
Then try ping again and paste the log outcome.
If you paste:
ollama listoutput, and- the âafter pingâ journal lines,
weâll be able to tell whether itâs (a) missing model/download, (b) OpenClawâOllama request hanging, or (c) routing/session channel not being recorded.
Feb 09 23:34:21 ai-companion node[60115]: 2026-02-10T04:34:21.827Z [diagnostic] lane dequeue: lane=session:agent:main:main waitMs=5 queueSize=0
Feb 09 23:34:21 ai-companion node[60115]: 2026-02-10T04:34:21.831Z [diagnostic] lane enqueue: lane=main queueSize=1
Feb 09 23:34:21 ai-companion node[60115]: 2026-02-10T04:34:21.838Z [diagnostic] lane dequeue: lane=main waitMs=3 queueSize=0
Feb 09 23:34:21 ai-companion node[60115]: 2026-02-10T04:34:21.915Z [agent/embedded] embedded run start: runId=c00d4554-92d4-499b-8baa-e683fa1207f6 sessionId=12c24bdd-da60-4efa-ba52-d67c8da4c972 provider=ollama model=llama3.2:1b thinking=off messageChannel=unknown
Feb 09 23:34:21 ai-companion node[60115]: 2026-02-10T04:34:21.921Z [agent/embedded] workspace bootstrap file AGENTS.md is 7804 chars (limit 2000); truncating in injected context (sessionKey=agent:main:main)
Feb 09 23:34:21 ai-companion node[60115]: 2026-02-10T04:34:21.956Z [diagnostic] session state: sessionId=12c24bdd-da60-4efa-ba52-d67c8da4c972 sessionKey=unknown prev=idle new=processing reason="run_started" queueDepth=0
Feb 09 23:34:21 ai-companion node[60115]: 2026-02-10T04:34:21.958Z [diagnostic] run registered: sessionId=12c24bdd-da60-4efa-ba52-d67c8da4c972 totalActive=1
Feb 09 23:34:21 ai-companion node[60115]: 2026-02-10T04:34:21.960Z [agent/embedded] embedded run prompt start: runId=c00d4554-92d4-499b-8baa-e683fa1207f6 sessionId=12c24bdd-da60-4efa-ba52-d67c8da4c972
Feb 09 23:34:21 ai-companion node[60115]: 2026-02-10T04:34:21.962Z [agent/embedded] embedded run agent start: runId=c00d4554-92d4-499b-8baa-e683fa1207f6
Feb 09 23:34:26 ai-companion node[60115]: 2026-02-10T04:34:26.902Z [diagnostic] run active check: sessionId=12c24bdd-da60-4efa-ba52-d67c8da4c972 active=true
Thatâs the same snippet again, and it still doesnât show the thing we need: a Telegram inbound message (or a model error). Right now it only proves:
- a run started (
provider=ollama model=llama3.2:1b) - but OpenClaw doesnât think it came from Telegram:
messageChannel=unknown/sessionKey=unknown
Thatâs why nothing gets delivered back to Telegram.
1) First confirm Ollama actually has the 1b model
Run and paste:
ollama list
time ollama run llama3.2:1b "Reply with exactly: pong"
(If llama3.2:1b isnât in the list: ollama pull llama3.2:1b.)
2) Capture the Telegram-triggered lines (not the background/CLI run)
Do this exactly:
- Start following logs:
journalctl --user -u openclaw-gateway.service -f --no-pager
- In Telegram DM send:
/new- then
ping
- Wait until you see either:
- a reply, or
typing TTL reached (2m)
Then paste the lines that appear between your ping and that TTL line.
What I expect to see (and whatâs missing in your paste) is something like:
[telegram] inbound .../ update received- then
embedded run start ... messageChannel=telegram
3) If you still never see any [telegram] inbound lines
Use the built-in channel log filter (this is much cleaner than grepping the raw file):
openclaw channels logs --channel telegram --lines 200
Run it once, send ping, run it again, paste the new output.
Once you paste (a) ollama list and (b) the âafter pingâ logs, we can tell whether:
- Telegram inbound isnât being logged (log level), or
- the run is being started by something else (heartbeat/CLI), or
- the Telegram inbound is arriving but the routing metadata is getting lost (the
messageChannel=unknownissue).
Failed to discover Ollama models: TimeoutError: The operation was aborted due to timeout
Log file: /tmp/openclaw/openclaw-2026-02-09.log
Channel: telegram
No matching log lines.
ping came back with
}
{"name": "username", "parameters": {"string": "jason"}}
âNo matching log linesâ from openclaw channels logs --channel telegram is plausible right now â it reads the gateway file log and filters for Telegram-specific entries, but your current file log level probably isnât capturing the Telegram âinbound/outboundâ lines (so the filter finds nothing). The gateway is still working (we saw Telegram start in journalctl).
Letâs do a clean repro with more logging, and also make sure the Ollama model you configured actually exists.
1) Make sure the model youâre using is installed
Your gateway is set to ollama/llama3.2:1b. Confirm it exists:
ollama list
If you donât see llama3.2:1b, pull it:
ollama pull llama3.2:1b
time ollama run llama3.2:1b "Reply with exactly: pong"
2) Stop the stuck run and start fresh
In Telegram DM:
/stop/new
3) Temporarily increase logging so Telegram/Ollama lines show up
Run on the server:
openclaw config set logging.consoleLevel "debug"
openclaw config set logging.level "debug"
systemctl --user restart openclaw-gateway.service
4) Capture the real âpingâ trace
In one SSH window:
journalctl --user -u openclaw-gateway.service -f --no-pager
Then in Telegram DM send: ping
Wait until either it replies or you see typing TTL reached (2m), then paste the new lines that appeared (they should now include [telegram] ⌠and/or [ollama] ⌠plus any timeout/error).
After we fix it, we can also silence the annoying CLI message
Failed to discover Ollama models: TimeoutError ⌠is the auto-discovery probe. Once things work, we can remove it by switching to explicit models.providers.ollama config (or removing OLLAMA_API_KEY from ~/.openclaw/.env).
Feb 09 23:51:16 ai-companion node[61135]: 2026-02-10T04:51:16.063Z [gateway] received SIGTERM; shutting down
Feb 09 23:51:16 ai-companion node[61135]: 2026-02-10T04:51:16.107Z [gmail-watcher] gmail watcher stopped
Feb 09 23:51:16 ai-companion systemd[17652]: Stopped openclaw-gateway.service - OpenClaw Gateway (v2026.2.6-3).
Feb 09 23:51:16 ai-companion systemd[17652]: openclaw-gateway.service: Consumed 58.310s CPU time.
Feb 09 23:51:16 ai-companion systemd[17652]: Started openclaw-gateway.service - OpenClaw Gateway (v2026.2.6-3).
Feb 09 23:51:57 ai-companion node[61459]: 2026-02-10T04:51:57.332Z [canvas] host mounted at http://127.0.0.1:18789/__openclaw__/canvas/ (root /home/jason/.openclaw/canvas)
Feb 09 23:51:57 ai-companion node[61459]: 2026-02-10T04:51:57.448Z [heartbeat] started
Feb 09 23:51:57 ai-companion node[61459]: 2026-02-10T04:51:57.457Z [gateway] agent model: ollama/llama3.2:1b
Feb 09 23:51:57 ai-companion node[61459]: 2026-02-10T04:51:57.462Z [gateway] listening on ws://127.0.0.1:18789 (PID 61459)
Feb 09 23:51:57 ai-companion node[61459]: 2026-02-10T04:51:57.466Z [gateway] listening on ws://[::1]:18789
Feb 09 23:51:57 ai-companion node[61459]: 2026-02-10T04:51:57.472Z [gateway] log file: /tmp/openclaw/openclaw-2026-02-09.log
Feb 09 23:51:57 ai-companion node[61459]: 2026-02-10T04:51:57.509Z [browser/service] Browser control service ready (profiles=2)
Feb 09 23:51:58 ai-companion node[61459]: 2026-02-10T04:51:58.297Z [telegram] [default] starting provider (@Tr1nbot)
Feb 09 23:51:58 ai-companion node[61459]: 2026-02-10T04:51:58.339Z [telegram] autoSelectFamily=false (default-node22)
Feb 09 23:51:58 ai-companion node[61459]: 2026-02-10T04:51:58.667Z [skills] Sanitized skill command name "skill-creator" to "/skill_creator".
Feb 09 23:51:59 ai-companion node[61459]: 2026-02-10T04:51:59.414Z [diagnostic] lane enqueue: lane=session:agent:main:main queueSize=1
Feb 09 23:51:59 ai-companion node[61459]: 2026-02-10T04:51:59.419Z [diagnostic] lane dequeue: lane=session:agent:main:main waitMs=11 queueSize=0
Feb 09 23:51:59 ai-companion node[61459]: 2026-02-10T04:51:59.423Z [diagnostic] lane enqueue: lane=main queueSize=1
Feb 09 23:51:59 ai-companion node[61459]: 2026-02-10T04:51:59.427Z [diagnostic] lane dequeue: lane=main waitMs=3 queueSize=0
Feb 09 23:51:59 ai-companion node[61459]: 2026-02-10T04:51:59.540Z [agent/embedded] embedded run start: runId=6ed3ae6d-9fd6-4006-aee5-4c741acdec5a sessionId=ee1e491d-69a0-4278-ac18-bf9c88e8bf97 provider=ollama model=llama3.2:1b thinking=off messageChannel=telegram
Feb 09 23:51:59 ai-companion node[61459]: 2026-02-10T04:51:59.548Z [agent/embedded] workspace bootstrap file AGENTS.md is 7804 chars (limit 2000); truncating in injected context (sessionKey=agent:main:main)
Feb 09 23:51:59 ai-companion node[61459]: 2026-02-10T04:51:59.589Z [diagnostic] session state: sessionId=ee1e491d-69a0-4278-ac18-bf9c88e8bf97 sessionKey=unknown prev=idle new=processing reason="run_started" queueDepth=0
Feb 09 23:51:59 ai-companion node[61459]: 2026-02-10T04:51:59.591Z [diagnostic] run registered: sessionId=ee1e491d-69a0-4278-ac18-bf9c88e8bf97 totalActive=1
Feb 09 23:51:59 ai-companion node[61459]: 2026-02-10T04:51:59.592Z [agent/embedded] embedded run prompt start: runId=6ed3ae6d-9fd6-4006-aee5-4c741acdec5a sessionId=ee1e491d-69a0-4278-ac18-bf9c88e8bf97
Feb 09 23:51:59 ai-companion node[61459]: 2026-02-10T04:51:59.594Z [agent/embedded] Removed orphaned user message to prevent consecutive user turns. runId=6ed3ae6d-9fd6-4006-aee5-4c741acdec5a sessionId=ee1e491d-69a0-4278-ac18-bf9c88e8bf97
Feb 09 23:51:59 ai-companion node[61459]: 2026-02-10T04:51:59.664Z [agent/embedded] embedded run agent start: runId=6ed3ae6d-9fd6-4006-aee5-4c741acdec5a
Feb 09 23:52:59 ai-companion node[61459]: 2026-02-10T04:52:59.592Z [agent/embedded] embedded run timeout: runId=6ed3ae6d-9fd6-4006-aee5-4c741acdec5a sessionId=ee1e491d-69a0-4278-ac18-bf9c
This log is the smoking gun:
embedded run start ⌠messageChannel=telegram- then
embedded run timeoutafter ~60s
So Telegram is delivering your ping into OpenClaw, but the LLM call isnât finishing before your configured agents.defaults.timeoutSeconds (you set it to 60 earlier).
Also: Removed orphaned user message⌠usually happens when you send /new and then immediately send another message while the /new âhelloâ turn is still running.
Do these fixes in this order
1) Make sure the 1B model is actually installed (important)
Your gateway is using ollama/llama3.2:1b. Confirm it exists:
ollama list
If itâs not listed:
ollama pull llama3.2:1b
time ollama run llama3.2:1b "Reply with exactly: pong"
2) Stop dropping messages: use /new + message in ONE line
In Telegram DM, donât do /new then ping. Instead send a single message:
/new Reply with exactly: pong
(or /new ping)
That avoids the âorphaned user messageâ problem.
3) Give Ollama more than 60 seconds (for now)
Set a more realistic timeout while we tune prompt size:
openclaw config set agents.defaults.timeoutSeconds 300 --json
systemctl --user restart openclaw-gateway.service
Then try the one-line /new ⌠test again in Telegram.
4) (Optional but recommended on Pi) shrink what gets sent to Ollama
This can massively speed up local models:
openclaw config set tools.byProvider.ollama.profile "minimal"
openclaw config set channels.telegram.dmHistoryLimit 0 --json
systemctl --user restart openclaw-gateway.service
If after doing (1)+(2)+(3) it still times out, paste the lines after:
embedded run agent start: runId=...
until the timeout (or any ollama/error line). That will tell us whether itâs stuck in the HTTP call to Ollama or somewhere else.
Failed to discover Ollama models: TimeoutError: The operation was aborted due to timeout
Updated tools.byProvider.ollama.profile. Restart the gateway to apply.
^C05:05:40 [plugins] plugin CLI register skipped (memory-core): command already registered (memory)
Failed to discover Ollama models: TimeoutError: The operation was aborted due to timeout
is this fixable?
That Failed to discover Ollama models: TimeoutError⌠line is just the CLIâs Ollama âdiscovery/probeâ being slow on your Pi. Itâs annoying, but it doesnât mean your config change failed (you can see it still says âUpdated âŚâ).
What matters now is: you changed config, so you must restart the gateway service for it to take effect.
1) Restart the gateway (do this as a separate command)
On the server:
systemctl --user restart openclaw-gateway.service
Then confirm itâs up:
openclaw channels status --probe
2) Make sure your timeout isnât still set to 60s
Earlier we forced 60s to make failures obvious; now bump it back so Ollama has time:
openclaw config set agents.defaults.timeoutSeconds 300 --json
systemctl --user restart openclaw-gateway.service
3) Test cleanly from Telegram (avoid âorphaned user messageâ)
In Telegram DM, send one line (donât send /new and then another message immediately):
/new Reply with exactly: pong
If it replies, youâre basically done.
4) If you want to stop seeing that âdiscover Ollama modelsâ timeout forever (optional, but recommended)
Switch to explicit Ollama provider config (no discovery):
Edit your config with nano:
nano ~/.openclaw/openclaw.json
Add/merge this (keep your existing config; donât delete other sections):
{
models: {
providers: {
ollama: {
baseUrl: "http://127.0.0.1:11434/v1",
apiKey: "ollama-local",
api: "openai-completions",
models: [
{ id: "llama3.2:1b", name: "llama3.2:1b" },
{ id: "llama3.2:3b", name: "llama3.2:3b" },
],
},
},
},
}
Then restart:
systemctl --user restart openclaw-gateway.service
(And if you have OLLAMA_API_KEY=... in ~/.openclaw/.env, you can remove it after thisâexplicit provider config makes discovery unnecessary.)
If after steps (1)â(3) it still âtypes foreverâ, paste the lines around the next embedded run timeout again (like you did before). That will confirm whether weâre still timing out or if itâs finally sending.
whats next?
Next is a clean end-to-end test with the new settings actually applied (gateway restarted) and without triggering the âorphaned user messageâ situation.
1) Restart gateway (so your config changes apply)
On the server:
systemctl --user restart openclaw-gateway.service
2) Set a sane timeout (so Ollama isnât killed at 60s)
openclaw config set agents.defaults.timeoutSeconds 300 --json
systemctl --user restart openclaw-gateway.service
3) Telegram test (single message)
In Telegram DM send one line:
/new Reply with exactly: pong
Wait up to ~1â2 minutes.
4) If it still doesnât reply, grab the one log line that matters
On the server:
journalctl --user -u openclaw-gateway.service -n 120 --no-pager | tail -n 120
Paste the lines showing either:
embedded run timeout, or- a successful reply/send.
(We already know Telegram transport works; weâre checking whether the model run finishes within the timeout now.)
If it does reply: youâre done â then you can lower the timeout later once youâre happy with speed.
Failed to read config at /home/jason/.openclaw/openclaw.json SyntaxError: JSON5: invalid character '{' at 79:1
at syntaxError (/home/jason/.npm-global/lib/node_modules/openclaw/node_modules/json5/lib/parse.js:1110:17)
at invalidChar (/home/jason/.npm-global/lib/node_modules/openclaw/node_modules/json5/lib/parse.js:1055:12)
at Object.end (/home/jason/.npm-global/lib/node_modules/openclaw/node_modules/json5/lib/parse.js:704:15)
at Object.default (/home/jason/.npm-global/lib/node_modules/openclaw/node_modules/json5/lib/parse.js:168:37)
at lex (/home/jason/.npm-global/lib/node_modules/openclaw/node_modules/json5/lib/parse.jsđŻ42)
at Object.parse (/home/jason/.npm-global/lib/node_modules/openclaw/node_modules/json5/lib/parse.js:25:17)
at Object.loadConfig (file:///home/jason/.npm-global/lib/node_modules/openclaw/dist/config-CVC-02lU.js:4592:54)
at loadConfig (file:///home/jason/.npm-global/lib/node_modules/openclaw/dist/config-CVC-02lU.js:4848:20)
at file:///home/jason/.npm-global/lib/node_modules/openclaw/dist/loader-n6BPnYom.js:16822:34 {
lineNumber: 79,
columnNumber: 1
}
Failed to read config at /home/jason/.openclaw/openclaw.json SyntaxError: JSON5: invalid character '{' at 79:1
at syntaxError (/home/jason/.npm-global/lib/node_modules/openclaw/node_modules/json5/lib/parse.js:1110:17)
at invalidChar (/home/jason/.npm-global/lib/node_modules/openclaw/node_modules/json5/lib/parse.js:1055:12)
at Object.end (/home/jason/.npm-global/lib/node_modules/openclaw/node_modules/json5/lib/parse.js:704:15)
at Object.default (/home/jason/.npm-global/lib/node_modules/openclaw/node_modules/json5/lib/parse.js:168:37)
at lex (/home/jason/.npm-global/lib/node_modules/openclaw/node_modules/json5/lib/parse.jsđŻ42)
at Object.parse (/home/jason/.npm-global/lib/node_modules/openclaw/node_modules/json5/lib/parse.js:25:17)
at Object.loadConfig (/home/jason/.npm-global/lib/node_modules/openclaw/dist/plugin-sdk/index.js:10728:57)
at loadConfig (/home/jason/.npm-global/lib/node_modules/openclaw/dist/plugin-sdk/index.js:10984:21)
at /home/jason/.npm-global/lib/node_modules/openclaw/dist/plugin-sdk/index.js:18411:36 {
lineNumber: 79,
columnNumber: 1
}
Failed to discover Ollama models: TimeoutError: The operation was aborted due to timeout
â
â Config ââââââââââââââââââââââââââââââââââââââââââââââââââââŽ
â â
â Config invalid; doctor will run with best-effort config. â
â â
ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââŻ
Config invalid
File: ~/.openclaw/openclaw.json
Problem:
- <root>: JSON5 parse failed: SyntaxError: JSON5: invalid character '{' at 79:1
Run: openclaw doctor --fix
jason@ai-companion:~$ journalctl --user -u openclaw-gateway.service -n 120 --no-pager | tail -n 120
Feb 10 00:18:11 ai-companion systemd[17652]: openclaw-gateway.service: Failed with result 'exit-code'.
Feb 10 00:18:11 ai-companion systemd[17652]: openclaw-gateway.service: Consumed 5.400s CPU time.
Feb 10 00:18:16 ai-companion systemd[17652]: openclaw-gateway.service: Scheduled restart job, restart counter is at 13.
Feb 10 00:18:16 ai-companion systemd[17652]: Started openclaw-gateway.service - OpenClaw Gateway (v2026.2.6-3).
Feb 10 00:18:19 ai-companion node[62728]: Failed to read config at /home/jason/.openclaw/openclaw.json SyntaxError: JSON5: invalid character '{' at 79:1
Feb 10 00:18:19 ai-companion node[62728]: at syntaxError (/home/jason/.npm-global/lib/node_modules/openclaw/node_modules/json5/lib/parse.js:1110:17)
Feb 10 00:18:19 ai-companion node[62728]: at invalidChar (/home/jason/.npm-global/lib/node_modules/openclaw/node_modules/json5/lib/parse.js:1055:12)
Feb 10 00:18:19 ai-companion node[62728]: at Object.end (/home/jason/.npm-global/lib/node_modules/openclaw/node_modules/json5/lib/parse.js:704:15)
Feb 10 00:18:19 ai-companion node[62728]: at Object.default (/home/jason/.npm-global/lib/node_modules/openclaw/node_modules/json5/lib/parse.js:168:37)
Feb 10 00:18:19 ai-companion node[62728]: at lex (/home/jason/.npm-global/lib/node_modules/openclaw/node_modules/json5/lib/parse.jsđŻ42)
Feb 10 00:18:19 ai-companion node[62728]: at Object.parse (/home/jason/.npm-global/lib/node_modules/openclaw/node_modules/json5/lib/parse.js:25:17)
Feb 10 00:18:19 ai-companion node[62728]: at Object.loadConfig (file:///home/jason/.npm-global/lib/node_modules/openclaw/dist/config-URF4ccgD.js:4593:54)
Feb 10 00:18:19 ai-companion node[62728]: at loadConfig (file:///home/jason/.npm-global/lib/node_modules/openclaw/dist/config-URF4ccgD.js:4849:20)
Feb 10 00:18:19 ai-companion node[62728]: at file:///home/jason/.npm-global/lib/node_modules/openclaw/dist/reply-B_4pVbIX.js:4183:34 {
Feb 10 00:18:19 ai-companion node[62728]: lineNumber: 79,
Feb 10 00:18:19 ai-companion node[62728]: columnNumber: 1
Feb 10 00:18:19 ai-companion node[62728]: }
Feb 10 00:18:19 ai-companion node[62728]: â
Feb 10 00:18:19 ai-companion node[62728]: â Config ââââââââââââââââââââââââââââââââââââââââââââââââââââŽ
Feb 10 00:18:19 ai-companion node[62728]: â â
Feb 10 00:18:19 ai-companion node[62728]: â Config invalid; doctor will run with best-effort config. â
Feb 10 00:18:19 ai-companion node[62728]: â â
Feb 10 00:18:19 ai-companion node[62728]: ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââŻ
Feb 10 00:18:19 ai-companion node[62728]: Config invalid
Feb 10 00:18:19 ai-companion node[62728]: File: ~/.openclaw/openclaw.json
Feb 10 00:18:19 ai-companion node[62728]: Problem:
Feb 10 00:18:19 ai-companion node[62728]: - <root>: JSON5 parse failed: SyntaxError: JSON5: invalid character '{' at 79:1
Feb 10 00:18:19 ai-companion node[62728]: Run: openclaw doctor --fix
Feb 10 00:18:19 ai-companion systemd[17652]: openclaw-gateway.service: Main process exited, code=exited, status=1/FAILURE
Feb 10 00:18:19 ai-companion systemd[17652]: openclaw-gateway.service: Failed with result 'exit-code'.
Feb 10 00:18:19 ai-companion systemd[17652]: openclaw-gateway.service: Consumed 4.877s CPU time.
Feb 10 00:18:24 ai-companion systemd[17652]: openclaw-gateway.service: Scheduled restart job, restart counter is at 14.
Feb 10 00:18:24 ai-companion systemd[17652]: Started openclaw-gateway.service - OpenClaw Gateway (v2026.2.6-3).
Feb 10 00:18:27 ai-companion node[62741]: Failed to read config at /home/jason/.openclaw/openclaw.json SyntaxError: JSON5: invalid character '{' at 79:1
Feb 10 00:18:27 ai-companion node[62741]: at syntaxError (/home/jason/.npm-global/lib/node_modules/openclaw/node_modules/json5/lib/parse.js:1110:17)
Feb 10 00:18:27 ai-companion node[62741]: at invalidChar (/home/jason/.npm-global/lib/node_modules/openclaw/node_modules/json5/lib/parse.js:1055:12)
Feb 10 00:18:27 ai-companion node[62741]: at Object.end (/home/jason/.npm-global/lib/node_modules/openclaw/node_modules/json5/lib/parse.js:704:15)
Feb 10 00:18:27 ai-companion node[62741]: at Object.default (/home/jason/.npm-global/lib/node_modules/openclaw/node_modules/json5/lib/parse.js:168:37)
Feb 10 00:18:27 ai-companion node[62741]: at lex (/home/jason/.npm-global/lib/node_modules/openclaw/node_modules/json5/lib/parse.jsđŻ42)
Feb 10 00:18:27 ai-companion node[62741]: at Object.parse (/home/jason/.npm-global/lib/node_modules/openclaw/node_modules/json5/lib/parse.js:25:17)
Feb 10 00:18:27 ai-companion node[62741]: at Object.loadConfig (file:///home/jason/.npm-global/lib/node_modules/openclaw/dist/config-URF4ccgD.js:4593:54)
Feb 10 00:18:27 ai-companion node[62741]: at loadConfig (file:///home/jason/.npm-global/lib/node_modules/openclaw/dist/config-URF4ccgD.js:4849:20)
Feb 10 00:18:27 ai-companion node[62741]: at file:///home/jason/.npm-global/lib/node_modules/openclaw/dist/reply-B_4pVbIX.js:4183:34 {
Feb 10 00:18:27 ai-companion node[62741]: lineNumber: 79,
Feb 10 00:18:27 ai-companion node[62741]: columnNumber: 1
Feb 10 00:18:27 ai-companion node[62741]: }
Feb 10 00:18:27 ai-companion node[62741]: â
Feb 10 00:18:27 ai-companion node[62741]: }
Feb 10 00:18:27 ai-companion node[62741]: â
Feb 10 00:18:27 ai-companion node[62741]: â Config ââââââââââââââââââââââââââââââââââââââââââââââââââââŽ
Feb 10 00:18:27 ai-companion node[62741]: â â
Feb 10 00:18:27 ai-companion node[62741]: â Config invalid; doctor will run with best-effort config. â
Feb 10 00:18:27 ai-companion node[62741]: â â
Feb 10 00:18:27 ai-companion node[62741]: ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââŻ
Feb 10 00:18:27 ai-companion node[62741]: Config invalid
Feb 10 00:18:27 ai-companion node[62741]: File: ~/.openclaw/openclaw.json
Feb 10 00:18:27 ai-companion node[62741]: Problem:
Feb 10 00:18:27 ai-companion node[62741]: - <root>: JSON5 parse failed: SyntaxError: JSON5: invalid character '{' at 79:1
Feb 10 00:18:27 ai-companion node[62741]: Run: openclaw doctor --fix
Feb 10 00:18:27 ai-companion systemd[17652]: openclaw-gateway.service: Main process exited, code=exited, status=1/FAILURE
Feb 10 00:18:27 ai-companion systemd[17652]: openclaw-gateway.service: Failed with result 'exit-code'.
Feb 10 00:18:27 ai-companion systemd[17652]: openclaw-gateway.service: Consumed 4.535s CPU time.
Feb 10 00:18:33 ai-companion systemd[17652]: openclaw-gateway.service: Scheduled restart job, restart counter is at 15.
Feb 10 00:18:33 ai-companion systemd[17652]: Started openclaw-gateway.service - OpenClaw Gateway (v2026.2.6-3).
Feb 10 00:18:36 ai-companion node[62753]: Failed to read config at /home/jason/.openclaw/openclaw.json SyntaxError: JSON5: invalid character '{' at 79:1
Feb 10 00:18:36 ai-companion node[62753]: at syntaxError (/home/jason/.npm-global/lib/node_modules/openclaw/node_modules/json5/lib/parse.js:1110:17)
Feb 10 00:18:36 ai-companion node[62753]: at invalidChar (/home/jason/.npm-global/lib/node_modules/openclaw/node_modules/json5/lib/parse.js:1055:12)
Feb 10 00:18:36 ai-companion node[62753]: at Object.end (/home/jason/.npm-global/lib/node_modules/openclaw/node_modules/json5/lib/parse.js:704:15)
Feb 10 00:18:36 ai-companion node[62753]: at Object.default (/home/jason/.npm-global/lib/node_modules/openclaw/node_modules/json5/lib/parse.js:168:37)
Feb 10 00:18:36 ai-companion node[62753]: at lex (/home/jason/.npm-global/lib/node_modules/openclaw/node_modules/json5/lib/parse.jsđŻ42)
Feb 10 00:18:36 ai-companion node[62753]: at Object.parse (/home/jason/.npm-global/lib/node_modules/openclaw/node_modules/json5/lib/parse.js:25:17)
Feb 10 00:18:36 ai-companion node[62753]: at Object.loadConfig (file:///home/jason/.npm-global/lib/node_modules/openclaw/dist/config-URF4ccgD.js:4593:54)
Feb 10 00:18:36 ai-companion node[62753]: at loadConfig (file:///home/jason/.npm-global/lib/node_modules/openclaw/dist/config-URF4ccgD.js:4849:20)
Feb 10 00:18:36 ai-companion node[62753]: at file:///home/jason/.npm-global/lib/node_modules/openclaw/dist/reply-B_4pVbIX.js:4183:34 {
Feb 10 00:18:36 ai-companion node[62753]: lineNumber: 79,
Feb 10 00:18:36 ai-companion node[62753]: columnNumber: 1
Feb 10 00:18:36 ai-companion node[62753]: }
Feb 10 00:18:36 ai-companion node[62753]: â
Feb 10 00:18:36 ai-companion node[62753]: â Config ââââââââââââââââââââââââââââââââââââââââââââââââââââŽ
Feb 10 00:18:36 ai-companion node[62753]: â â
Feb 10 00:18:36 ai-companion node[62753]: â Config invalid; doctor will run with best-effort config. â
Feb 10 00:18:36 ai-companion node[62753]: ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââŻ
Feb 10 00:18:36 ai-companion node[62753]: Config invalid
Feb 10 00:18:36 ai-companion node[62753]: File: ~/.openclaw/openclaw.json
Feb 10 00:18:36 ai-companion node[62753]: Problem:
Feb 10 00:18:36 ai-companion node[62753]: - <root>: JSON5 parse failed: SyntaxError: JSON5: invalid character '{' at 79:1
Feb 10 00:18:36 ai-companion node[62753]: Run: openclaw doctor --fix
Feb 10 00:18:36 ai-companion systemd[17652]: openclaw-gateway.service: Main process exited, code=exited, status=1/FAILURE
Feb 10 00:18:36 ai-companion systemd[17652]: openclaw-gateway.service: Failed with result 'exit-code'.
Feb 10 00:18:36 ai-companion systemd[17652]: openclaw-gateway.service: Consumed 5.101s CPU time.
Feb 10 00:18:41 ai-companion systemd[17652]: openclaw-gateway.service: Scheduled restart job, restart counter is at 16.
Feb 10 00:18:41 ai-companion systemd[17652]: Started openclaw-gateway.service - OpenClaw Gateway (v2026.2.6-3).
Feb 10 00:18:45 ai-companion node[62779]: Failed to read config at /home/jason/.openclaw/openclaw.json SyntaxError: JSON5: invalid character '{' at 79:1
Feb 10 00:18:45 ai-companion node[62779]: at syntaxError (/home/jason/.npm-global/lib/node_modules/openclaw/node_modules/json5/lib/parse.js:1110:17)
Feb 10 00:18:45 ai-companion node[62779]: at invalidChar (/home/jason/.npm-global/lib/node_modules/openclaw/node_modules/json5/lib/parse.js:1055:12)
Feb 10 00:18:45 ai-companion node[62779]: at Object.end (/home/jason/.npm-global/lib/node_modules/openclaw/node_modules/json5/lib/parse.js:704:15)
Feb 10 00:18:45 ai-companion node[62779]: at Object.default (/home/jason/.npm-global/lib/node_modules/openclaw/node_modules/json5/lib/parse.js:168:37)
Feb 10 00:18:45 ai-companion node[62779]: at lex (/home/jason/.npm-global/lib/node_modules/openclaw/node_modules/json5/lib/parse.jsđŻ42)
Feb 10 00:18:45 ai-companion node[62779]: at Object.parse (/home/jason/.npm-global/lib/node_modules/openclaw/node_modules/json5/lib/parse.js:25:17)
Feb 10 00:18:45 ai-companion node[62779]: at Object.loadConfig (file:///home/jason/.npm-global/lib/node_modules/openclaw/dist/config-URF4ccgD.js:4593:54)
Feb 10 00:18:45 ai-companion node[62779]: at loadConfig (file:///home/jason/.npm-global/lib/node_modules/openclaw/dist/config-URF4ccgD.js:4849:20)
Feb 10 00:18:45 ai-companion node[62779]: at file:///home/jason/.npm-global/lib/node_modules/openclaw/dist/reply-B_4pVbIX.js:4183:34 {
Feb 10 00:18:45 ai-companion node[62779]: lineNumber: 79,
Feb 10 00:18:45 ai-companion node[62779]: columnNumber: 1
Feb 10 00:18:45 ai-companion node[62779]: }
Feb 10 00:18:45 ai-companion node[62779]: â
Feb 10 00:18:45 ai-companion node[62779]: â Config ââââââââââââââââââââââââââââââââââââââââââââââââââââŽ
Feb 10 00:18:45 ai-companion node[62779]: â â
Feb 10 00:18:45 ai-companion node[62779]: â Config invalid; doctor will run with best-effort config. â
Feb 10 00:18:45 ai-companion node[62779]: â â
Feb 10 00:18:45 ai-companion node[62779]: ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââŻ
Feb 10 00:18:45 ai-companion node[62779]: Config invalid
Feb 10 00:18:45 ai-companion node[62779]: File: ~/.openclaw/openclaw.json
Feb 10 00:18:45 ai-companion node[62779]: Problem:
Feb 10 00:18:45 ai-companion node[62779]: - <root>: JSON5 parse failed: SyntaxError: JSON5: invalid character '{' at 79:1
Feb 10 00:18:45 ai-companion node[62779]: Run: openclaw doctor --fix
Feb 10 00:18:45 ai-companion systemd[17652]: openclaw-gateway.service: Main process exited, code=exited, status=1/FAILURE
Feb 10 00:18:45 ai-companion systemd[17652]: openclaw-gateway.service: Failed with result 'exit-code'.
Feb 10 00:18:45 ai-companion systemd[17652]: openclaw-gateway.service: Consumed 5.140s CPU time.
Feb 10 00:18:50 ai-companion systemd[17652]: openclaw-gateway.service: Scheduled restart job, restart counter is at 17.
Feb 10 00:18:50 ai-companion systemd[17652]: Started openclaw-gateway.service - OpenClaw Gateway (v2026.2.6-3).
Yep â your config is broken and the gateway will keep crash-looping until we fix line ~79.
The single } you pasted is a huge hint: you probably have an extra closing brace, and then another { starts at line 79 (so JSON5 sees a ânew objectâ at top level and errors).
Fix it safely
1) Backup the broken config
cp ~/.openclaw/openclaw.json ~/.openclaw/openclaw.json.broken
2) Show lines 65â90 with line numbers
nl -ba ~/.openclaw/openclaw.json | sed -n '65,90p'
Paste that output here with tokens redacted.
3) Quick âlikely fixâ you can try immediately (if you see }{ or }\n{)
Open the file:
nano ~/.openclaw/openclaw.json
Look around line 79. If you see something like:
}
{
models: { ... }
}
Then you must merge it into a single object:
- delete the extra
}before the{ - add a comma after the previous section if needed
- keep only one outer
{ ... }for the whole file
It should look like:
{
gateway: { ... },
channels: { ... },
models: { ... }
}
4) Validate + restart
After saving:
Your ~/.openclaw/openclaw.json is now invalid JSON5, so the gateway canât load it. The error:
invalid character '{' at 79:1
almost always means you accidentally ended the main config object and then started a second topâlevel { ... } block (common when copy/pasting a snippet).
1) Make a backup first
Run:
cp ~/.openclaw/openclaw.json ~/.openclaw/openclaw.json.broken
2) Show the lines around the error (so we can see the extra {)
Run:
openclaw doctor
systemctl --user restart openclaw-gateway.service
openclaw status
If you paste the 65â90 snippet, Iâll tell you exactly which brace/comma to delete/add (so you donât have to guess).
Your gateway is crash-looping because ~/.openclaw/openclaw.json is syntactically broken:
JSON5: invalid character '{' at 79:1
That almost always means: you accidentally have two top-level objects in the file, like:
{ ... } // <-- file already ended the root object
{ ... } // <-- line 79 starts a new object (this is illegal)
Fix it (safe + fast)
1) Stop the restart loop while you edit
systemctl --user stop openclaw-gateway.service
systemctl --user reset-failed openclaw-gateway.service
2) Backup the broken file
cp ~/.openclaw/openclaw.json ~/.openclaw/openclaw.json.broken
3) Show the problem area (line 79)
nl -ba ~/.openclaw/openclaw.json | sed -n '70,90p'
Paste that output here but redact tokens.
4) Edit + merge into ONE { ... }
nano ~/.openclaw/openclaw.json
At/near line 79, fix it so the whole file is a single top-level object:
â Good shape:
{
gateway: { ... },
channels: { ... },
models: { ... },
}
Common fix:
- delete the extra
}just before the{at line 79 OR
nl -ba ~/.openclaw/openclaw.json | sed -n '70,90p'
Paste that output here but redact tokens (Telegram bot token, gateway token, API keys).
3) What youâre looking to fix
In those lines youâll likely see something like:
} // end of the config
{ // <-- BAD: a second top-level object starts here (line 79)
models: { ... }
}
Fix = merge it into the first object so the file is a single { ... }:
- delete the second
{ ... }block entirely - ensure thereâs a comma between sections inside the one root object
5) Validate + restart
openclaw doctor
systemctl --user start openclaw-gateway.service
openclaw status
Once you paste lines 70â90, Iâll tell you exactly which brace/comma to remove so you donât have to guess.
- remove the extra
}just before the second{(or remove the second{and its matching}), and - add the
models:block inside the main object, with a comma between sections.
Example shape (single top-level object):
{
gateway: { /* ... */ },
channels: { /* ... */ },
models: { /* ... */ }
}
Once it parses again, systemctl --user restart openclaw-gateway.service will work.
Send the 70â90 snippet and Iâll tell you exactly which characters to delete/move.
Youâre still only pasting the error, not the broken config text. We need to see whatâs actually at/around line 79 in ~/.openclaw/openclaw.json to fix it.
Do this on the server:
1) Stop the gateway restart spam
systemctl --user stop openclaw-gateway.service
systemctl --user reset-failed openclaw-gateway.service
2) Show the exact lines around the error
nl -ba ~/.openclaw/openclaw.json | sed -n '72,86p'
Paste that output here (redact tokens like botToken/apiKey/gateway token).
3) Quick manual fix in nano (once we see it)
Open the file:
nano ~/.openclaw/openclaw.json
Jump to the bad line:
- press Ctrl+_ (underscore)
- type 79
- press Enter
What weâre looking for is almost certainly something like:
}
{
models: { ... }
}
Thatâs invalid (two top-level objects). The fix is to make the file a single { ... } by deleting the extra } or extra { ... } block and ensuring commas are correct.
4) After fixing, restart
systemctl --user start openclaw-gateway.service
openclaw status
Paste the nl -ba ... | sed -n '72,86p' output and Iâll tell you exactly which brace/comma to delete.
65 "mode": "local",
66 "auth": {
67 "mode": "token",
68 "token": REDACTED
69 }
70 },
71 "plugins": {
72 "entries": {
73 "telegram": {
74 "enabled": true
75 }
76 }
77 }
78 }
79 {
80 models: { providers: {
81 ollama: {
82 baseUrl: "http://127.0.0.1:11434/v1",
83 apiKey: "ollama-local",
84 api: "openai-completions",
85 models: [
86 { id: "llama3.2:1b", name: "llama3.2:1b" },
87 { id: "llama3.2:3b", name: "llama3.2:3b" },
88 ],
89 },
90 },
Yep â line 79 is the problem. You currently have two top-level objects:
- the config ends at line 78 with
} - then a new
{starts at line 79
Thatâs invalid JSON5.
Fix (edit those exact lines)
- Stop the crash loop while editing:
systemctl --user stop openclaw-gateway.service
systemctl --user reset-failed openclaw-gateway.service
- Edit the config:
nano ~/.openclaw/openclaw.json
- Go to the bad spot:
- press Ctrl+_
- type 78 and Enter
- Change this:
"plugins": { ... }
}
{
models: { providers: { ... } }
into this (single root object):
"plugins": { ... },
models: { providers: { ... } }
}
Concretely:
- Line 78: change
}â,(so the root object doesnât end yet) - Line 79: delete the
{entirely
Also make sure the file ends with one final } (to close the root object). Right now you almost certainly have an extra closing } at the very end that belonged to the second object â delete that extra one if needed.
- Validate + start gateway again:
openclaw doctor
systemctl --user start openclaw-gateway.service
openclaw status
If openclaw doctor still complains, paste nl -ba ~/.openclaw/openclaw.json | tail -n 30 (redact tokens) and Iâll point out the remaining extra brace/comma.
like this? "plugins" : { ... },
models: { providers: { ... } }
Yes â thatâs the idea: models must be inside the same top-level object as gateway, channels, plugins, etc.
Just make sure you also have the commas/braces exactly right. The pattern should be:
{
gateway: { ... },
channels: { ... },
plugins: { ... },
models: {
providers: {
ollama: { ... }
}
}
}
Quick checklist in nano
- There should be only one outer
{at the very top of the file. - There should be only one final
}at the very bottom of the file. - Every top-level section line except the last one ends with a comma:
plugins: { ... },â
models: { ... }â (no comma if itâs the last section)
Validate + restart
After saving:
openclaw doctor
systemctl --user restart openclaw-gateway.service
openclaw status
If doctor still says the config is invalid, paste:
nl -ba ~/.openclaw/openclaw.json | tail -n 40
(redact tokens) and Iâll tell you exactly which comma/brace is off.
this is all Im supposed to mess with right? "plugins" : { ... },
models: { providers: { ... } }
Yes â only that join point is what you needed to fix: you had two separate {âŚ} blocks, and youâre merging the models: { ⌠} section into the first one.
But donât literally type ... in your real config â that was just shorthand. You should keep your existing plugins block exactly as-is, and insert the real models block right after it.
To be 100% sure you didnât accidentally break something else, do this:
1) Validate config parses now
openclaw doctor
It should no longer say âJSON5 parse failedâ.
2) Restart gateway + check itâs reachable
systemctl --user restart openclaw-gateway.service
openclaw status
openclaw channels status --probe
3) Minimal end-to-end test
In Telegram DM:
/new Reply with exactly: pong
If any of those commands error, paste the error text. If you want, you can also paste:
openclaw config get models.providers.ollama.baseUrl
openclaw config get agents.defaults.model.primary
(those are safe; no tokens)
Failed to read config at /home/jason/.openclaw/openclaw.json SyntaxError: JSON5: invalid character '}' at 78:1
at syntaxError (/home/jason/.npm-global/lib/node_modules/openclaw/node_modules/json5/lib/parse.js:1110:17)
at invalidChar (/home/jason/.npm-global/lib/node_modules/openclaw/node_modules/json5/lib/parse.js:1055:12)
at Object.end (/home/jason/.npm-global/lib/node_modules/openclaw/node_modules/json5/lib/parse.js:704:15)
at Object.default (/home/jason/.npm-global/lib/node_modules/openclaw/node_modules/json5/lib/parse.js:168:37)
at lex (/home/jason/.npm-global/lib/node_modules/openclaw/node_modules/json5/lib/parse.jsđŻ42)
at Object.parse (/home/jason/.npm-global/lib/node_modules/openclaw/node_modules/json5/lib/parse.js:25:17)
at Object.loadConfig (file:///home/jason/.npm-global/lib/node_modules/openclaw/dist/config-CVC-02lU.js:4592:54)
at loadConfig (file:///home/jason/.npm-global/lib/node_modules/openclaw/dist/config-CVC-02lU.js:4848:20)
at file:///home/jason/.npm-global/lib/node_modules/openclaw/dist/loader-n6BPnYom.js:16822:34 {
lineNumber: 78,
columnNumber: 1
Now itâs complaining about a } at line 78 â so you probably still have the root object closing brace there, but you also have content after it (your models: block). In other words, the earlier fix didnât fully take.
We need to look at lines 72â85 again.
1) Show the exact lines (no guessing)
Run:
nl -ba ~/.openclaw/openclaw.json | sed -n '72,90p'
Paste that (redact tokens).
2) The likely fix (what youâll see)
You likely have something like:
"plugins": { ... }
} <-- line 78 (root object ends here)
models: { ... } <-- stuff after the root ended
Fix is:
- change that
}at line 78 to},OR remove it (depending on braces) - ensure
pluginsends with a comma if there are more keys after it - ensure thereâs exactly one final
}at the very end of the file
3) Fast recovery option (if youâre stuck)
You can also restore the backup and redo cleanly:
cp ~/.openclaw/openclaw.json.broken ~/.openclaw/openclaw.json
âŚbut first paste 72â90p so I can tell you the precise one-line edit to fix it without backtracking.
its in openclaw doctor do I need to generate and configure a gateway token?
No â you do not need to generate/configure a new gateway right now.
Your gateway/service is fine. The only blocker is: your ~/.openclaw/openclaw.json is currently invalid JSON5, so the gateway canât start.
We need to fix the syntax error first (line 78/79). After that, everything (Telegram + Ollama) can work again.
Do this next
Run this command and paste the output (redact tokens):
nl -ba ~/.openclaw/openclaw.json | sed -n '70,90p'
That will show exactly where the extra } / missing comma is, and Iâll tell you the exact character changes to make in nano.
If you want a quick âget back to runningâ fallback: restore your backup, then weâll re-add the Ollama models section cleanly:
cp ~/.openclaw/openclaw.json.broken ~/.openclaw/openclaw.json
But the best next step is still: paste lines 70â90 so we can fix it precisely.
Run "openclaw doctor --fix" to apply changes.
Invalid config:
- <root>: JSON5 parse failed: SyntaxError: JSON5: invalid character '}' at 78:1
â
â Doctor complete.
}
{
"plugins" : { },
models: { providers: { } }
}
ollama: {
baseUrl: "http://127.0.0.1:11434/v1",
apiKey: "ollama-local",
api: "openai-completions",
models: [
{ id: "llama3.2:1b", name: "llama3.2:1b" },
{ id: "llama3.2:3b", name: "llama3.2:3b" },
],
},
},
},
}
what do I need to fix
No â you donât need to âgenerate a new gatewayâ. Your config file is just mangled right now.
What you pasted shows you currently have multiple top-level { ⌠} blocks and then an ollama: block sitting outside of models.providers.ollama, which makes JSON5 choke.
Fastest fix: replace openclaw.json with a known-good minimal config
- Stop the gateway (so it stops crash-looping while you edit):
systemctl --user stop openclaw-gateway.service
systemctl --user reset-failed openclaw-gateway.service
- Move the broken config aside:
You need to fix your ~/.openclaw/openclaw.json structure. Right now it has:
- extra stray
}/{at the top (multiple ârootâ objects) - an
ollama: { ... }block that is outside ofmodels.providers.ollama - so JSON5 canât parse it and the gateway canât start
The simplest fix (recommended): replace the config with a clean, valid one
- Stop the gateway while editing:
systemctl --user stop openclaw-gateway.service
systemctl --user reset-failed openclaw-gateway.service
- Backup the broken file:
mv ~/.openclaw/openclaw.json ~/.openclaw/openclaw.json.bad
- Create a fresh config:
nano ~/.openclaw/openclaw.json
Paste this entire file, then fill in your tokens locally (donât post them here):
{
gateway: {
mode: "local",
bind: "loopback",
port: 18789,
auth: { mode: "token", token: "PASTE_YOUR_GATEWAY_TOKEN_HERE" },
},
channels: {
telegram: {
enabled: true,
botToken: "PASTE_YOUR_TELEGRAM_BOT_TOKEN_HERE",
dmPolicy: "pairing",
streamMode: "off",
dmHistoryLimit: 0,
},
},
tools: { byProvider: { ollama: { profile: "minimal" } } },
agents: {
defaults: {
model: { primary: "ollama/llama3.2:1b", fallbacks: [] },
timeoutSeconds: 300,
bootstrapMaxChars: 2000,
},
},
models: {
providers: {
ollama: {
baseUrl: "http://127.0.0.1:11434/v1",
apiKey: "ollama-local",
api: "openai-completions",
models: [
{ id: "llama3.2:1b", name: "llama3.2:1b" },
{ id: "llama3.2:3b", name: "llama3.2:3b" },
],
},
},
},
}
- Start gateway + verify:
systemctl --user start openclaw-gateway.service
openclaw status
openclaw channels status --probe
One more important check
Make sure the model exists:
ollama list
If llama3.2:1b isnât listed:
ollama pull llama3.2:1b
If youâd rather not replace the whole file, paste nl -ba ~/.openclaw/openclaw.json | head -n 120 (with tokens redacted) and Iâll tell you exactly which braces/lines to deleteâbut replacing it is usually fastest/least error-prone.
mv ~/.openclaw/openclaw.json ~/.openclaw/openclaw.json.bad
- Create a new config:
nano ~/.openclaw/openclaw.json
Paste this whole file (then replace the REDACTED values with your real tokens locally, donât post them in Discord):
{
gateway: {
mode: "local",
bind: "loopback",
port: 18789,
auth: { mode: "token", token: "REDACTED_GATEWAY_TOKEN" },
},
channels: {
telegram: {
enabled: true,
botToken: "REDACTED_TELEGRAM_BOT_TOKEN",
dmPolicy: "pairing",
streamMode: "off",
dmHistoryLimit: 0,
},
},
// Keep Ollama prompts small on a Pi:
tools: { byProvider: { ollama: { profile: "minimal" } } },
agents: {
defaults: {
model: { primary: "ollama/llama3.2:1b", fallbacks: [] },
timeoutSeconds: 300,
bootstrapMaxChars: 2000,
},
},
models: {
providers: {
ollama: {
baseUrl: "http://127.0.0.1:11434/v1",
apiKey: "ollama-local",
api: "openai-completions",
models: [
{ id: "llama3.2:1b", name: "llama3.2:1b" },
{ id: "llama3.2:3b", name: "llama3.2:3b" },
],
},
},
},
}
- Start gateway + verify:
systemctl --user start openclaw-gateway.service
openclaw status
openclaw channels status --probe
If openclaw status still says the config is invalid, paste:
openclaw doctor
(or nl -ba ~/.openclaw/openclaw.json | tail -n 60 with tokens redacted) and weâll fix the last comma/brace.
Help where do I find my gateway token?
Yep â still here. Your gateway is currently failing because openclaw.json got mangled, so the next step is just: replace it with a clean config (the snippet I sent) and restart the gateway.
If you want the absolute shortest checklist:
- Stop gateway:
systemctl --user stop openclaw-gateway.service
systemctl --user reset-failed openclaw-gateway.service
- Move broken config out of the way:
mv ~/.openclaw/openclaw.json ~/.openclaw/openclaw.json.bad
- Create a new one:
nano ~/.openclaw/openclaw.json
Paste the clean config, fill in your gateway token + telegram bot token.
- Start gateway + check:
systemctl --user start openclaw-gateway.service
openclaw status
openclaw channels status --probe
Reply with what openclaw status shows after that (you can redact tokens) and weâll get you back to âbot replies in Telegramâ again.
The âgateway tokenâ is just the shared secret the Control UI/CLI uses to authenticate to the Gateway. Youâll find/set it in one of these places:
Where it lives
- Config file:
gateway.auth.tokeninside~/.openclaw/openclaw.json - Or env var:
OPENCLAW_GATEWAY_TOKEN(often via~/.openclaw/.envor systemd service env)
How to get/generate one (donât paste it into Discord)
Option 1 (recommended): have OpenClaw generate it
After your config file is valid again, run:
openclaw doctor --generate-gateway-token
This will generate a token and write it into your config.
Option 2: generate your own random token
On Ubuntu:
openssl rand -hex 32
Copy the output and paste it into your config here:
gateway: {
auth: { mode: "token", token: "PASTE_IT_HERE" },
}
(If openssl isnât available: python3 -c 'import secrets; print(secrets.token_hex(32))')
If you already have one but canât remember it
Once the config parses, you can view it with:
openclaw config get gateway.auth.token
âŚbut donât paste the output here.
If you tell me whether you prefer âOpenClaw generates itâ or âI generate itâ, Iâll give you the exact next 2â3 commands in order.
No worries â you donât need the old one. Just rotate it (generate a new gateway token) and put it in your config.
Option A (recommended): generate a new token yourself
On the server:
openssl rand -hex 32
# or if openssl isn't installed:
python3 -c 'import secrets; print(secrets.token_hex(32))'
Copy that output and paste it into your config here:
gateway: {
auth: { mode: "token", token: "PASTE_NEW_TOKEN_HERE" },
}
Then restart:
systemctl --user restart openclaw-gateway.service
Option B (simplest for now): remove gateway auth entirely (loopback-only)
If your gateway is bound to 127.0.0.1 and youâre only using Telegram, you can just omit the whole gateway.auth block in openclaw.json. Then restart the service. (You can add auth back later when you care about the dashboard/remote access.)
Important
Donât post the token in Discord. Also: since a dashboard link with a token was posted earlier in chat, rotating is the right move anyway.
If you paste your new (redacted) gateway: section from openclaw.json, Iâll confirm itâs valid JSON5 before you restart.
I ran this openclaw doctor --generate-gateway-token start gateway service now in wizard?
Donât go back into the wizard yet.
If openclaw doctor --generate-gateway-token succeeded, the next step is simply to start/restart the gateway service, then verify itâs reachable and Telegram is running.
Do this now (terminal)
systemctl --user restart openclaw-gateway.service
openclaw status
openclaw channels status --probe
Then test in Telegram
In your Telegram DM with the bot, send:
/status
If /status works, try:
/new Reply with exactly: pong
If the gateway fails to start
Paste:
systemctl --user status openclaw-gateway.service --no-pager -n 80
(You can redact tokens, but status output usually doesnât include them.)
The wizard is only needed if your config is still missing key sections; right now we just need the gateway back up cleanly.
open claw doctor created a token and is asking me to start the gate way service
Do it â start the gateway service now.
On the server run:
systemctl --user start openclaw-gateway.service
(or if it was already running and you want to be sure it picked up the new token/config:)
systemctl --user restart openclaw-gateway.service
Then verify:
openclaw status
openclaw channels status --probe
After that, test in Telegram:
/status- then
/new Reply with exactly: pong
If systemctl says it failed, paste:
systemctl --user status openclaw-gateway.service --no-pager -n 80
â openclaw-gateway.service - OpenClaw Gateway (v2026.2.6-3)
Loaded: loaded (/home/jason/.config/systemd/user/openclaw-gateway.service; enabled; preset: enabled)
Active: active (running) since Tue 2026-02-10 01:35:30 EST; 6min ago
Main PID: 66162 (openclaw-gatewa)
Tasks: 11 (limit: 9067)
Memory: 356.4M (peak: 1.1G)
CPU: 57.033s
CGroup: /user.slice/user-1000.slice/user@1000.service/app.slice/openclaw-gateway.service
ââ66162 openclaw-gateway
Feb 10 01:35:30 ai-companion systemd[17652]: Started openclaw-gateway.service - OpenClaw Gateway (v2026.2.6-3).
Feb 10 01:36:04 ai-companion node[66162]: 2026-02-10T06:36:04.045Z [canvas] host mounted at http://127.0.0.1:18âŚ/canvas)
Feb 10 01:36:04 ai-companion node[66162]: 2026-02-10T06:36:04.177Z [heartbeat] started
Feb 10 01:36:04 ai-companion node[66162]: 2026-02-10T06:36:04.185Z [gateway] agent model: ollama/llama3.2:1b
Feb 10 01:36:04 ai-companion node[66162]: 2026-02-10T06:36:04.188Z [gateway] listening on ws://127.0.0.1:18789 âŚD 66162)
Feb 10 01:36:04 ai-companion node[66162]: 2026-02-10T06:36:04.191Z [gateway] listening on ws://[::1]:18789
Feb 10 01:36:04 ai-companion node[66162]: 2026-02-10T06:36:04.195Z [gateway] log file: /tmp/openclaw/openclaw-2âŚ2-10.log
Feb 10 01:36:04 ai-companion node[66162]: 2026-02-10T06:36:04.236Z [browser/service] Browser control service reâŚfiles=2)
Feb 10 01:36:04 ai-companion node[66162]: 2026-02-10T06:36:04.908Z [telegram] [default] starting provider (@Tr1nbot)
Feb 10 01:36:04 ai-companion node[66162]: 2026-02-10T06:36:04.934Z [telegram] autoSelectFamily=false (default-node22)
Feb 10 01:36:06 ai-companion node[66162]: 2026-02-10T06:36:06.389Z [agent/embedded] workspace bootstrap file AGâŚin:main)
Feb 10 01:37:34 ai-companion node[66162]: 2026-02-10T06:37:34.780Z [ws] â res â channels.status 474ms conn=4c5câŚ1fcâŚb683
Feb 10 01:41:06 ai-companion node[66162]: 2026-02-10T06:41:06.472Z [agent/embedded] embedded run timeout: runIdâŚs=300000
Feb 10 01:41:08 ai-companion node[66162]: 2026-02-10T06:41:08.813Z [agent/embedded] workspace bootstrap file AGâŚin:main)
Hint: Some lines were ellipsized, use -l to show in full.
Gateway is up and Telegram is connected â the remaining problem is this line:
[agent/embedded] embedded run timeout ⌠ms=300000
So the bot is receiving your message, but the Ollama call isnât finishing within 5 minutes.
Letâs narrow down whether itâs (A) the model missing/downloading, (B) Ollamaâs /v1 API hanging, or (C) OpenClaw sending a huge prompt.
1) Confirm the model youâre using is installed + fast
Your gateway is using ollama/llama3.2:1b. Run:
ollama list
time ollama run llama3.2:1b "Reply with exactly: pong"
If llama3.2:1b is NOT in ollama list, do:
ollama pull llama3.2:1b
2) Test the exact API OpenClaw uses (OpenAI-compatible /v1)
This is the big one. Run:
time curl -sS http://127.0.0.1:11434/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ollama-local" \
-d '{"model":"llama3.2:1b","messages":[{"role":"user","content":"Reply with exactly: pong"}],"max_tokens":16,"stream":false}'
If this hangs, OpenClaw will also hang.
3) Reduce what OpenClaw sends to Ollama (so it doesnât take forever)
Run these (theyâre safe):
openclaw config set tools.byProvider.ollama.profile "minimal"
openclaw config set channels.telegram.dmHistoryLimit 0 --json
openclaw config set agents.defaults.bootstrapMaxChars 500 --json
openclaw config set 'agents.defaults.models["ollama/llama3.2:1b"].params.maxTokens' 128 --json
systemctl --user restart openclaw-gateway.service
Then in Telegram DM send one line (avoids the âorphaned user messageâ thing):
/new Reply with exactly: pong
If you paste the output/result of step 2 (does the curl return quickly or hang?), weâll know immediately whether this is an Ollama /v1 API issue or just prompt-size/timeout tuning.
step 2 result real 3m58.721s
user 0m0.008s
sys 0m0.015s
That result is the core issue.
If a tiny OpenAIâcompatible request to Ollama (/v1/chat/completions) takes ~4 minutes, then OpenClaw (which sends a bigger prompt than your curl) will routinely hit your embedded run timeout and youâll see âtypingâŚâ forever.
1) Check if itâs just âcold loadâ (most common)
Run the exact same curl again immediately (no changes). If the 2nd run drops from minutes to seconds, the model is unloading and reloading from disk each time.
Also check whatâs loaded:
ollama ps
2) If itâs cold load: keep the model loaded in RAM
On Linux, Ollama is usually a systemd service. Check:
systemctl status ollama --no-pager
If that exists, set keep-alive so models donât unload:
sudo systemctl edit ollama
Add:
[Service]
Environment="OLLAMA_KEEP_ALIVE=-1"
Then:
sudo systemctl daemon-reload
sudo systemctl restart ollama
Now re-run your curl test â it should be much faster after the first call.
(Official Ollama docs mention OLLAMA_KEEP_ALIVE as the global setting for how long models stay loaded.)
3) Compare model speed on the same /v1 endpoint
You previously saw ollama run llama3.2:3b ... return in ~12s, but your /v1 call was using llama3.2:1b. Letâs compare apples-to-apples:
Run:
time curl -sS http://127.0.0.1:11434/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ollama-local" \
-d '{"model":"llama3.2:3b","messages":[{"role":"user","content":"Reply with exactly: pong"}],"max_tokens":16,"stream":false}' \
-w '\nHTTP:%{http_code}\n' | tail -n 5
If 3b is way faster on /v1, just switch OpenClaw back to it.
4) For OpenClaw right now: raise timeout so you get something
Until Ollama latency is fixed, bump the agent timeout above your measured worst-case:
openclaw config set agents.defaults.timeoutSeconds 900 --json
systemctl --user restart openclaw-gateway.service
Then test in Telegram with a single line (avoids âorphaned user messageâ):
/new Reply with exactly: pong
Reply with: (a) whether the 2nd curl run is still ~minutes, and (b) ollama ps output. That will tell us immediately if keep-alive is the missing piece.
the big time curl took seconds and the telegram response 40 seconds
Good â that means it was cold-loading (first /v1 request loads the model, later ones are fast). And a 40s Telegram response is believable on a Pi with OpenClawâs bigger prompt.
To make it consistently fast (no multiâminute âfirst requestâ hiccup), do this:
1) Keep the model loaded (recommended)
If Ollama runs as a systemd service:
systemctl status ollama --no-pager
If that exists, set keep-alive:
sudo systemctl edit ollama
Add:
[Service]
Environment="OLLAMA_KEEP_ALIVE=-1"
Then:
sudo systemctl daemon-reload
sudo systemctl restart ollama
Now your first Telegram message after idle wonât take minutes.
(You can also use a finite value like 30m instead of -1.)
2) Keep OpenClaw tuned for Pi responsiveness
These are good to keep:
openclaw config set tools.byProvider.ollama.profile "minimal"
openclaw config set agents.defaults.bootstrapMaxChars 2000 --json
openclaw config set channels.telegram.dmHistoryLimit 0 --json
openclaw config set agents.defaults.timeoutSeconds 300 --json
systemctl --user restart openclaw-gateway.service
3) Usage tip in Telegram (avoids âorphaned user messageâ)
When you want a fresh session, do it in one message:
/new <your message>
If this fixed it, please mark the solution in Discord (rightâclick â Apps â â Mark Solution) so itâs indexed for others.
whats next? do I try to send my first message?
I sent Hi to the bot it typed and didnt respond
If Telegram shows âtypingâŚâ but then no message ever arrives, one of two things is happening:
- the run is still working (often because Ollama had to cold-load the model again), or
- the run is timing out (youâll see
embedded run timeoutin the gateway logs).
Do this quick triage
1) In Telegram, stop any stuck run and start clean
Send these in the DM:
/stop
/new Reply with exactly: pong
Wait up to ~2 minutes.
2) On the server, check what happened in the gateway logs
Right after you send the message, run:
journalctl --user -u openclaw-gateway.service -n 120 --no-pager | egrep -i 'telegram|embedded run (start|timeout)|typing TTL|sendMessage|error|ollama'
Paste that output (it wonât include your tokens).
The most common cause (given what we saw earlier)
Your first /v1/chat/completions call took ~4 minutes, then later calls took seconds â thatâs classic cold-loading. If Ollama unloads the model after some idle time, the next message can again take minutes, and OpenClaw may hit its timeout.
To make it consistent, set Ollama keep-alive (if you havenât yet):
sudo systemctl edit ollama
Add:
[Service]
Environment="OLLAMA_KEEP_ALIVE=30m"
Then:
sudo systemctl daemon-reload
sudo systemctl restart ollama
(You can use -1 instead of 30m to keep it loaded forever.)
If the log shows embedded run timeout
Tell me what timeout it reports (itâll show ms=...). Weâll either:
- raise
agents.defaults.timeoutSeconds, or - further shrink the prompt sent to Ollama.
Send me the journalctl | egrep ... output and Iâll tell you exactly which knob to turn next.
(start|timeout)|typing TTL|sendMessage|error|ollama'
Feb 10 01:51:18 ai-companion node[66162]: 2026-02-10T06:51:18.277Z [telegram] [default] starting provider (@Tr1nbot)
Feb 10 01:51:58 ai-companion node[66162]: 2026-02-10T06:51:58.552Z [reload] config change detected; evaluating reload (meta.lastTouchedAt, models.providers.ollama.models, agents.defaults.bootstrapMaxChars, agents.defaults.compaction)
Feb 10 01:51:58 ai-companion node[66162]: 2026-02-10T06:51:58.611Z [openclaw] Suppressed AbortError: AbortError: This operation was aborted
Feb 10 01:51:58 ai-companion node[66162]: 2026-02-10T06:51:58.670Z [gateway] agent model: ollama/llama3.2:1b
Feb 10 01:51:59 ai-companion node[66162]: 2026-02-10T06:51:59.379Z [telegram] [default] starting provider (@Tr1nbot)
Feb 10 01:53:21 ai-companion node[66989]: 2026-02-10T06:53:21.933Z [gateway] agent model: ollama/llama3.2:1b
Feb 10 01:53:22 ai-companion node[66989]: 2026-02-10T06:53:22.671Z [telegram] [default] starting provider (@Tr1nbot)
Feb 10 01:53:22 ai-companion node[66989]: 2026-02-10T06:53:22.701Z [telegram] autoSelectFamily=false (default-node22)
Feb 10 02:02:33 ai-companion node[67789]: 2026-02-10T07:02:33.269Z [gateway] agent model: ollama/llama3.2:1b
Feb 10 02:02:33 ai-companion node[67789]: 2026-02-10T07:02:33.791Z [telegram] [default] starting provider (@Tr1nbot)
Feb 10 02:02:33 ai-companion node[67789]: 2026-02-10T07:02:33.817Z [telegram] autoSelectFamily=false (default-node22)
Feb 10 02:10:17 ai-companion node[67789]: 2026-02-10T07:10:17.581Z [reload] config change detected; evaluating reload (meta.lastTouchedAt, models.providers.ollama.models, agents.defaults.compaction)
Feb 10 02:10:19 ai-companion node[67789]: 2026-02-10T07:10:19.675Z [openclaw] Suppressed AbortError: AbortError: This operation was aborted
Feb 10 02:10:19 ai-companion node[67789]: 2026-02-10T07:10:19.762Z [gateway] agent model: ollama/llama3.2:1b
Feb 10 02:10:20 ai-companion node[67789]: 2026-02-10T07:10:20.483Z [telegram] [default] starting provider (@Tr1nbot)
Feb 10 02:11:43 ai-companion node[67789]: 2026-02-10T07:11:43.434Z [reload] config change detected; evaluating reload (meta.lastTouchedAt, models.providers.ollama.models, agents.defaults.compaction)
Feb 10 02:11:43 ai-companion node[67789]: 2026-02-10T07:11:43.485Z [openclaw] Suppressed AbortError: AbortError: This operation was aborted
Feb 10 02:11:43 ai-companion node[67789]: 2026-02-10T07:11:43.543Z [gateway] agent model: ollama/llama3.2:1b
Feb 10 02:11:44 ai-companion node[67789]: 2026-02-10T07:11:44.094Z [telegram] [default] starting provider (@Tr1nbot)
Feb 10 02:12:03 ai-companion node[67789]: 2026-02-10T07:12:03.321Z [openclaw] Non-fatal unhandled rejection (continuing): TypeError: fetch failed
Feb 10 02:12:03 ai-companion node[67789]: 2026-02-10T07:12:03.343Z [telegram] sendChatAction failed: Network request for 'sendChatAction' failed!
Feb 10 02:13:05 ai-companion node[68421]: 2026-02-10T07:13:05.598Z [gateway] agent model: ollama/llama3.2:1b
Feb 10 02:13:06 ai-companion node[68421]: 2026-02-10T07:13:06.145Z [telegram] [default] starting provider (@Tr1nbot)
Feb 10 02:13:06 ai-companion node[68421]: 2026-02-10T07:13:06.188Z [telegram] autoSelectFamily=false (default-node22)
Feb 10 02:17:07 ai-companion node[68421]: 2026-02-10T07:17:07.487Z [openclaw] Non-fatal unhandled rejection (continuing): TypeError: fetch failed
Feb 10 02:17:07 ai-companion node[68421]: 2026-02-10T07:17:07.499Z [telegram] sendMessage failed: Network request for 'sendMessage' failed!
Feb 10 02:17:07 ai-companion node[68421]: 2026-02-10T07:17:07.507Z [telegram] slash final reply failed: HttpError: Network request for 'sendMessage' failed!
Those log lines explain the âtyping⌠but no replyâ perfectly:
TypeError: fetch failed[telegram] sendChatAction failed âŚ[telegram] sendMessage failed âŚ
Meaning: OpenClaw is generating, but the Gateway canât reach api.telegram.org to send the typing indicator / final message. This is almost always DNS / outbound HTTPS / IPv6 routing (common on servers that resolve AAAA first but donât have working IPv6 egress).
Docs reference: https://docs.openclaw.ai/channels/troubleshooting (Telegram quick fixes) + https://docs.openclaw.ai/channels/telegram#troubleshooting
1) Check IPv4 vs IPv6 reachability to Telegram (paste results)
Run on the server:
getent ahosts api.telegram.org
curl -4 -m 5 -I https://api.telegram.org
curl -6 -m 5 -I https://api.telegram.org
- If
curl -4works butcurl -6fails/timeouts â youâve found it: IPv6 is broken.
2) Quick OpenClaw-side fix (prefer âhappy eyeballsâ fallback)
Try enabling Nodeâs auto family selection for Telegram:
openclaw config set channels.telegram.network.autoSelectFamily true --json
systemctl --user restart openclaw-gateway.service
Then test Telegram again.
3) If IPv6 is broken, fix at OS level (most reliable)
Either:
- enable IPv6 egress on the host/network, or
- prefer IPv4 in glibc address selection (common fix)
On many Debian/Ubuntu systems you can edit:
sudo nano /etc/gai.conf
and uncomment / add:
precedence ::ffff:0:0/96 100
Then restart the gateway (and sometimes networking).
4) Re-test quickly
After applying the fix, DM the bot:
/status(should be instant)- then
/new Reply with exactly: pong
If you paste the outputs from step (1), I can tell you immediately whether itâs the IPv6 trap or something else (firewall/DNS/proxy).
149.154.166.110 STREAM api.telegram.org
149.154.166.110 DGRAM
149.154.166.110 RAW
2001:67c:4e8:f004::9 STREAM
2001:67c:4e8:f004::9 DGRAM
2001:67c:4e8:f004::9 RAW
jason@ai-companion:~$ curl -4 -m 5 -I https://api.telegram.org
curl -6 -m 5 -I https://api.telegram.org
HTTP/2 302
server: nginx/1.18.0
date: Tue, 10 Feb 2026 07:22:03 GMT
content-type: text/html
content-length: 145
location: https://core.telegram.org/bots
strict-transport-security: max-age=31536000; includeSubDomains; preload
access-control-allow-origin: *
access-control-allow-methods: GET, POST, OPTIONS
access-control-expose-headers: Content-Length,Content-Type,Date,Server,Connection
curl: (7) Failed to connect to api.telegram.org port 443 after 10 ms: Couldn't connect to server
Thatâs the diagnosis: IPv4 works, IPv6 is broken on that box.
curl -4 ⌠https://api.telegram.orgâ workscurl -6 ⌠https://api.telegram.orgâ canât connect
So sometimes Node/OpenClaw tries the AAAA record first, and Telegram sends fail with exactly what you saw (fetch failed, sendMessage failed, etc.).
Fix option 1 (OpenClaw-only, quickest): enable IPv4 fallback (âhappy eyeballsâ)
Run:
openclaw config set channels.telegram.network.autoSelectFamily true --json
systemctl --user restart openclaw-gateway.service
Then test in Telegram (/status, then âhiâ). If it works, youâre done.
Fix option 2 (OS-level, most reliable): prefer IPv4 over IPv6
Edit:
sudo nano /etc/gai.conf
Uncomment (or add) this line:
precedence ::ffff:0:0/96 100
Save, then restart the gateway:
systemctl --user restart openclaw-gateway.service
Re-test Telegram.
After applying either fix
Watch for the errors to disappear:
journalctl --user -u openclaw-gateway.service -n 120 --no-pager | egrep -i 'sendMessage failed|sendChatAction failed|fetch failed'
If you still see send failures after option 1, go straight to option 2.
where do I put this in gai.conf? precedence ::ffff:0:0/96 100
Anywhere in /etc/gai.conf is fine â itâs just a list of rules. Easiest:
- Open the file:
sudo nano /etc/gai.conf
- Search for an existing (commented) line like:
#precedence ::ffff:0:0/96 100
If you find it, remove the leading # so it becomes:
precedence ::ffff:0:0/96 100
-
If you donât find that line, add it near the top of the file (after the header comments is perfect).
-
Save/exit nano:
- Ctrl+O, Enter
- Ctrl+X
- Restart the gateway:
systemctl --user restart openclaw-gateway.service
- Re-test quickly:
curl -6 -m 5 -I https://api.telegram.org # should still fail (thatâs OK)
curl -4 -m 5 -I https://api.telegram.org # should work
Then DM the bot âhiâ â it should now reliably reply because your system will prefer IPv4 when both A and AAAA exist.
curl -4 -m 5 -I https://api.telegram.org # should work
curl: (7) Failed to connect to api.telegram.org port 443 after 1 ms: Couldn't connect to server
HTTP/2 302
server: nginx/1.18.0
date: Tue, 10 Feb 2026 07:37:57 GMT
content-type: text/html
content-length: 145
location: https://core.telegram.org/bots
strict-transport-security: max-age=31536000; includeSubDomains; preload
access-control-allow-origin: *
access-control-allow-methods: GET, POST, OPTIONS
access-control-expose-headers: Content-Length,Content-Type,Date,Server,Connection
bot still typing
That output looks like you accidentally pasted both results mixed together:
- The
HTTP/2 302 ... location: https://core.telegram.org/botspart is a successful connection to Telegram. - The
curl: (7) Failed to connect...line is very likely from the IPv6 attempt (or from a different curl line), not the IPv4 one.
Letâs make it unambiguous by running them with labels:
echo "IPv4:"
curl -4 -m 5 -I https://api.telegram.org || true
echo
echo "IPv6:"
curl -6 -m 5 -I https://api.telegram.org || true
If you see:
- IPv4 â headers (302) â
- IPv6 â connection failed â
âŚthen youâre exactly where we expect: IPv6 is broken, IPv4 works.
Next: verify Node (what OpenClaw uses) now prefers IPv4
Run:
node -e 'require("dns").lookup("api.telegram.org",{all:true},(e,a)=>{console.log(a)})'
You want the IPv4 address (149.154...) to appear before the IPv6 one in that list. If it does, restart the gateway and Telegram should stop failing sends:
systemctl --user restart openclaw-gateway.service
If Node still shows IPv6 first (even after editing /etc/gai.conf)
Then force the Telegram client to do IPv4 fallback by enabling:
openclaw config set channels.telegram.network.autoSelectFamily true --json
systemctl --user restart openclaw-gateway.service
Paste the labeled curl output + the node dns.lookup output and Iâll tell you which branch youâre on.
âBot still typingâ can be either:
- itâs still waiting on Ollama (slow run), or
- it finished but canât send back to Telegram (the IPv6/DNS issue we saw).
Letâs tell which one in 30 seconds.
1) Check the gateway logs for the last message
Right after you send hi (or ping) in Telegram, run on the server:
journalctl --user -u openclaw-gateway.service -n 200 --no-pager | egrep -i 'sendMessage failed|sendChatAction failed|fetch failed|typing TTL|embedded run timeout|embedded run start'
- If you see
sendMessage failed/fetch failedâ still network (IPv6 path). - If you see
embedded run timeoutâ Ollama is too slow for your timeout. - If you see neither, paste the output and weâll spot what itâs doing.
2) If itâs network (most likely): force IPv4 fallback in OpenClaw
Even after gai.conf, Node can still pick IPv6 first sometimes. Set this and restart:
openclaw config set channels.telegram.network.autoSelectFamily true --json
systemctl --user restart openclaw-gateway.service
Then test again in Telegram.
3) Quick outbound test (bypasses Ollama)
This tells us if Telegram sending works at all:
openclaw message send --channel telegram --target <YOUR_TG_USER_ID> --message "telegram send test"
If that fails, itâs definitely still network. If it succeeds, then itâs Ollama/runtime.
Paste the output from step (1) (just the filtered lines). That will make the next fix obvious.
when I said Hi bot replied with: {"name": "openclaw", "parameters": {"model": "default", "sessionKey": "[123]"}}
That reply is the model âleakingâ an internal tool-call JSON instead of giving a normal human answer. It usually happens with local models when tool-calling is flaky (or the session got into a weird state from all the earlier config/debugging).
Step 1 (no config changes): reset the chat session and try again
In Telegram DM, send one message:
/new Hi
(or /new Reply with exactly: pong)
If it replies normally after that, youâre done.
Step 2 (if it still sends JSON): disable tools for Ollama so it canât try tool-calls
Run on the server:
openclaw config set tools.byProvider.ollama.deny '["*"]' --json
systemctl --user restart openclaw-gateway.service
Then test again in Telegram with:
/new Hi
This keeps /status, /new, /stop working (theyâre commands), but prevents the model from attempting tool calls it canât reliably do.
If you tell me one thing, I can be more exact
What was the exact message you sent right before you got that JSON reply (just âHiâ, or did it start with /)?
dChatAction failed|fetch failed|typing TTL|embedded run timeout|embedded run start'
Feb 10 02:12:03 ai-companion node[67789]: 2026-02-10T07:12:03.321Z [openclaw] Non-fatal unhandled rejection (continuing): TypeError: fetch failed
Feb 10 02:12:03 ai-companion node[67789]: 2026-02-10T07:12:03.343Z [telegram] sendChatAction failed: Network request for 'sendChatAction' failed!
Feb 10 02:17:07 ai-companion node[68421]: 2026-02-10T07:17:07.487Z [openclaw] Non-fatal unhandled rejection (continuing): TypeError: fetch failed
Feb 10 02:17:07 ai-companion node[68421]: 2026-02-10T07:17:07.499Z [telegram] sendMessage failed: Network request for 'sendMessage' failed!
Feb 10 02:40:26 ai-companion node[69321]: 2026-02-10T07:40:26.313Z typing TTL reached (2m); stopping typing indicator
Those log lines are two different failure modes mixed together:
- Telegram network failures (this is why you get âtypingâŚâ but no reply):
TypeError: fetch failedsendChatAction failedsendMessage failed
- Slow/never-finished LLM run:
typing TTL reached (2m)(it gave up showing typing; it may still be running or may have timed out)
First: confirm whether the Telegram send failures are still happening now
The lines you pasted are from 07:12 / 07:17 / 07:40 â some may be from before you edited gai.conf.
Do this right after you send âhiâ in Telegram:
journalctl --user -u openclaw-gateway.service --since "2 minutes ago" --no-pager | egrep -i 'fetch failed|sendMessage failed|sendChatAction failed|typing TTL|embedded run timeout|embedded run start'
If you still see sendMessage failed in that âlast 2 minutesâ output, your IPv6/Telegram issue is still active.
Fix Telegram send failures reliably (force IPv4 fallback in OpenClaw)
Even with gai.conf, Node can still pick IPv6 first sometimes. Set this and restart:
openclaw config set channels.telegram.network.autoSelectFamily true --json
systemctl --user restart openclaw-gateway.service
Then test Telegram again.
Quick verification (should succeed immediately):
openclaw message send --channel telegram --target <YOUR_TG_USER_ID> --message "send test after autoSelectFamily"
If that works consistently, Telegram outbound is fixed.
Then handle the âtyping TTLâ (Ollama slowness)
Once Telegram sending is stable, if you still hit typing TTL reached (2m):
- Keep Ollama prompts small (these help a lot on Pi):
openclaw config set tools.byProvider.ollama.profile "minimal"
openclaw config set channels.telegram.dmHistoryLimit 0 --json
openclaw config set agents.defaults.bootstrapMaxChars 500 --json
openclaw config set agents.defaults.timeoutSeconds 900 --json
systemctl --user restart openclaw-gateway.service
And test with a single-line reset so you donât trigger the âorphaned user messageâ thing:
/new Reply with exactly: pong
If you paste the output of the journalctl --since "2 minutes ago" ... command after sending âhiâ, I can tell you immediately whether weâre still blocked on Telegram network sends or purely on Ollama speed.
i just pasted it and got journalctl --user -u openclaw-gateway.service --since "2 minutes ago" --no-pager | egrep -i 'fetch failed|sendMessage failed|sendChatAction failed|typing TTL|embedded run timeout|embedded run start'
krill?
Yep â still here.
Right now we just need to do one decisive fix + one decisive check:
1) Force Telegram to stop trying broken IPv6
Run:
openclaw config set channels.telegram.network.autoSelectFamily true --json
systemctl --user restart openclaw-gateway.service
2) Confirm Telegram sending works (no Ollama involved)
Run:
openclaw message send --channel telegram --target <YOUR_TG_USER_ID> --message "telegram send test (after ipv4 fix)"
If you receive that message reliably, the âfetch failed / sendMessage failedâ issue is solved.
3) Then test a normal bot reply (Ollama involved)
In Telegram DM send:
/new Reply with exactly: pong
If it still âtypesâ a long time, weâll tune prompt size / timeout â but we need Telegram sending stable first.
If you tell me your Telegram user id (just the number, not personal info beyond that), I can format command #2 exactly.
I got model started under telegram but no pong
Ok â âmodel started under telegramâ means the message is reaching OpenClaw and it began an Ollama run. If you didnât get pong, then either:
- the run timed out / is still running, or
- it finished but failed to sendMessage back to Telegram.
Letâs tell which one with one clean test + the right log slice.
1) Clean test (in Telegram DM)
Send these as separate messages:
/stop/new Reply with exactly: pong
Then wait ~60â120s.
2) Immediately grab the last 3 minutes of gateway logs (server)
Run right after sending the /new ... message:
journalctl --user -u openclaw-gateway.service --since "3 minutes ago" --no-pager | egrep -i 'embedded run start|embedded run timeout|sendMessage failed|sendChatAction failed|fetch failed|typing TTL|ollama'
Paste that output.
How to interpret the result
- If you see
sendMessage failed/fetch failedâ Telegram network is still flaky (IPv6 path). We keep focusing onchannels.telegram.network.autoSelectFamily. - If you see
embedded run timeoutâ Ollama/prompt is too slow for your timeout. We tune prompt size / raise timeout. - If you see run start but neither timeout nor sendMessage â itâs hanging inside the Ollama call; we then test
/v1/chat/completionstiming again.
3) Quick fix if itâs timing out (safe to apply now)
Run these:
openclaw config set tools.byProvider.ollama.profile "minimal"
openclaw config set channels.telegram.dmHistoryLimit 0 --json
openclaw config set agents.defaults.bootstrapMaxChars 500 --json
openclaw config set agents.defaults.timeoutSeconds 900 --json
systemctl --user restart openclaw-gateway.service
Then repeat the Telegram test in step 1.
Paste the step (2) log output and Iâll tell you exactly which branch youâre in.
ded run start|embedded run timeout|sendMessage failed|sendChatAction failed|fetch failed|typing TTL|ollama'
Feb 10 03:24:04 ai-companion node[70906]: 2026-02-10T08:24:04.892Z [openclaw] Non-fatal unhandled rejection (continuing): TypeError: fetch failed
krill?
Still here. Weâre at the point where the next step is purely log-driven â otherwise weâll just keep guessing.
Do this exact 2-step test
1) In Telegram DM (to your bot)
Send:
/stop
/new Reply with exactly: pong
Wait 60â90 seconds.
2) On the server, paste the last 3 minutes of relevant gateway logs
Run:
journalctl --user -u openclaw-gateway.service --since "3 minutes ago" --no-pager | egrep -i 'embedded run start|embedded run timeout|sendMessage failed|sendChatAction failed|fetch failed|typing TTL|ollama'
Paste what that prints.
That output will tell us exactly which of these is happening:
- Telegram send still failing (
sendMessage failed/fetch failed) - Ollama run timing out (
embedded run timeout) - Ollama call hanging (run start, no finish/timeout)
Once I see that, I can give you the one fix that will actually make it respond.
journalctl doesnt print out anything
That usually happens because the egrep ⌠filter matched zero lines (so it prints nothing) or youâre running journalctl --user ⌠from the wrong context (e.g. via sudo, which breaks the user journal).
Do this exactly (no sudo), and paste the output.
1) Make sure youâre the right user + unit name
whoami
systemctl --user list-units | grep -i openclaw
2) Get the last logs with no filter
journalctl --user -u openclaw-gateway.service -n 200 --no-pager
3) Live follow (best), then send a Telegram message while itâs running
In one SSH window:
journalctl --user -u openclaw-gateway.service -f --no-pager
Then in Telegram DM send:
/new Reply with exactly: pong
Copy/paste what appears in the journal window right after you send it.
4) If journal still doesnât show anything, tail the gateway file log directly
ls -lt /tmp/openclaw/openclaw-*.log | head
tail -n 200 /tmp/openclaw/openclaw-2026-02-10.log
(Use the newest filename from the ls -lt output.)
Once you paste either the journalctl -n 200 output or the tail -n 200 output, we can tell if itâs timing out (embedded run timeout) or still failing to send (sendMessage failed / fetch failed).
Feb 10 02:44:56 ai-companion node[69623]: 2026-02-10T07:44:56.986Z [canvas] host mounted at http://127.0.0.1:18789/__openclaw__/canvas/ (root /home/jason/.openclaw/canvas)
Feb 10 02:44:57 ai-companion node[69623]: 2026-02-10T07:44:57.114Z [heartbeat] started
Feb 10 02:44:57 ai-companion node[69623]: 2026-02-10T07:44:57.120Z [gateway] agent model: ollama/llama3.2:1b
Feb 10 02:44:57 ai-companion node[69623]: 2026-02-10T07:44:57.123Z [gateway] listening on ws://127.0.0.1:18789 (PID 69623)
Feb 10 02:44:57 ai-companion node[69623]: 2026-02-10T07:44:57.125Z [gateway] listening on ws://[::1]:18789
Feb 10 02:44:57 ai-companion node[69623]: 2026-02-10T07:44:57.129Z [gateway] log file: /tmp/openclaw/openclaw-2026-02-10.log
Feb 10 02:44:57 ai-companion node[69623]: 2026-02-10T07:44:57.157Z [browser/service] Browser control service ready (profiles=2)
Feb 10 02:44:57 ai-companion node[69623]: 2026-02-10T07:44:57.619Z [telegram] [default] starting provider (@Tr1nbot)
Feb 10 02:44:57 ai-companion node[69623]: 2026-02-10T07:44:57.656Z [telegram] autoSelectFamily=true (config)
Feb 10 02:45:50 ai-companion systemd[17652]: Stopping openclaw-gateway.service - OpenClaw Gateway (v2026.2.6-3)...
Feb 10 02:45:50 ai-companion node[69623]: 2026-02-10T07:45:50.974Z [gateway] signal SIGTERM received
Feb 10 02:45:50 ai-companion node[69623]: 2026-02-10T07:45:50.977Z [gateway] received SIGTERM; shutting down
Feb 10 02:45:51 ai-companion node[69623]: 2026-02-10T07:45:51.039Z [gmail-watcher] gmail watcher stopped
Feb 10 02:45:51 ai-companion systemd[17652]: Stopped openclaw-gateway.service - OpenClaw Gateway (v2026.2.6-3).
Feb 10 02:45:51 ai-companion systemd[17652]: openclaw-gateway.service: Consumed 56.949s CPU time.
Feb 10 02:45:51 ai-companion systemd[17652]: Started openclaw-gateway.service - OpenClaw Gateway (v2026.2.6-3).
Feb 10 02:46:24 ai-companion node[69697]: 2026-02-10T07:46:24.276Z [canvas] host mounted at http://127.0.0.1:18789/__openclaw__/canvas/ (root /home/jason/.openclaw/canvas)
Feb 10 02:46:24 ai-companion node[69697]: 2026-02-10T07:46:24.401Z [heartbeat] started
Feb 10 02:46:24 ai-companion node[69697]: 2026-02-10T07:46:24.407Z [gateway] agent model: ollama/llama3.2:1b
Feb 10 02:46:24 ai-companion node[69697]: 2026-02-10T07:46:24.410Z [gateway] listening on ws://127.0.0.1:18789 (PID 69697)
Feb 10 02:46:24 ai-companion node[69697]: 2026-02-10T07:46:24.413Z [gateway] listening on ws://[::1]:18789
Feb 10 02:46:24 ai-companion node[69697]: 2026-02-10T07:46:24.416Z [gateway] log file: /tmp/openclaw/openclaw-2026-02-10.log
Feb 10 02:46:24 ai-companion node[69697]: 2026-02-10T07:46:24.448Z [browser/service] Browser control service ready (profiles=2)
Those lines you pasted are just gateway startup/restart, not the part where it processes your Telegram message â so we still canât see why âhiâ didnât reply.
Good news though: I see
[telegram] autoSelectFamily=true (config)
So the IPv6 issue is very likely fixed now.
Do this âlive captureâ (this will finally show the real failure)
1) On the server: follow the gateway logs live
Run (no sudo):
journalctl --user -u openclaw-gateway.service -f --no-pager
Leave that running.
2) In Telegram DM: send ONE message
Send exactly:
/stop
/new Reply with exactly: pong
(That second line should be a single message starting with /new so we donât trigger the âorphaned user messageâ drop.)
3) Copy/paste what appears in journalctl after you send it
In the journalctl -f window, you should see lines like:
embedded run start ⌠messageChannel=telegram- then either a send or a timeout or an error
Paste ~30â80 lines after the embedded run start.
If the log shows one of these, hereâs the fix
sendMessage failed/fetch failedâ Telegram network is still failing (but weâll only know if itâs happening ânowâ).embedded run timeoutâ Ollama is still too slow for youragents.defaults.timeoutSeconds(we raise it or shrink prompt more).- Bot replies with tool JSON (like
{"name":"openclaw","parameters":...}) â we need to disable tools for ollama so the model canât attempt tool calls:openclaw config set tools.byProvider.ollama.deny '["*"]' --json systemctl --user restart openclaw-gateway.service
Run the live capture and paste the lines after embedded run start â that will make the next step unambiguous.
Feb 10 02:46:24 ai-companion node[69697]: 2026-02-10T07:46:24.906Z [telegram] [default] starting provider (@Tr1nbot)
Feb 10 02:46:24 ai-companion node[69697]: 2026-02-10T07:46:24.934Z [telegram] autoSelectFamily=true (config)
Feb 10 02:47:57 ai-companion node[69697]: 2026-02-10T07:47:57.805Z [agent/embedded] workspace bootstrap file AGENTS.md is 7804 chars (limit 500); truncating in injected context (sessionKey=agent:main:main)
Feb 10 02:47:57 ai-companion node[69697]: 2026-02-10T07:47:57.807Z [agent/embedded] workspace bootstrap file SOUL.md is 1664 chars (limit 500); truncating in injected context (sessionKey=agent:main:main)
Feb 10 02:47:57 ai-companion node[69697]: 2026-02-10T07:47:57.810Z [agent/embedded] workspace bootstrap file TOOLS.md is 850 chars (limit 500); truncating in injected context (sessionKey=agent:main:main)
Feb 10 02:47:57 ai-companion node[69697]: 2026-02-10T07:47:57.812Z [agent/embedded] workspace bootstrap file IDENTITY.md is 633 chars (limit 500); truncating in injected context (sessionKey=agent:main:main)
Feb 10 02:47:57 ai-companion node[69697]: 2026-02-10T07:47:57.814Z [agent/embedded] workspace bootstrap file BOOTSTRAP.md is 1449 chars (limit 500); truncating in injected context (sessionKey=agent:main:main)
Feb 10 02:51:34 ai-companion node[69697]: 2026-02-10T07:51:34.899Z [agent/embedded] workspace bootstrap file AGENTS.md is 7804 chars (limit 500); truncating in injected context (sessionKey=agent:main:main)
Feb 10 02:51:34 ai-companion node[69697]: 2026-02-10T07:51:34.905Z [agent/embedded] workspace bootstrap file SOUL.md is 1664 chars (limit 500); truncating in injected context (sessionKey=agent:main:main)
Feb 10 02:51:34 ai-companion node[69697]: 2026-02-10T07:51:34.910Z [agent/embedded] workspace bootstrap file TOOLS.md is 850 chars (limit 500); truncating in injected context (sessionKey=agent:main:main)
Feb 10 02:51:34 ai-companion node[69697]: 2026-02-10T07:51:34.914Z [agent/embedded] workspace bootstrap file IDENTITY.md is 633 chars (limit 500); truncating in injected context (sessionKey=agent:main:main)
Feb 10 02:51:34 ai-companion node[69697]: 2026-02-10T07:51:34.919Z [agent/embedded] workspace bootstrap file BOOTSTRAP.md is 1449 chars (limit 500); truncating in injected context (sessionKey=agent:main:main)
Feb 10 02:52:04 ai-companion node[69697]: 2026-02-10T07:52:04.392Z [openclaw] Non-fatal unhandled rejection (continuing): TypeError: fetch failed
Feb 10 02:52:04 ai-companion node[69697]: at node:internal/deps/undici/undici:14902:13
Feb 10 02:52:04 ai-companion node[69697]: at processTicksAndRejections (node:internal/process/task_queues:105:5)
Feb 10 02:56:34 ai-companion node[69697]: 2026-02-10T07:56:34.940Z [agent/embedded] embedded run timeout: runId=4f6ebe12-63d0-4d64-869e-e9e57e197a78 sessionId=78f88542-9179-43fa-9b1b-748571bdf48b timeoutMs=300000
Feb 10 02:57:19 ai-companion node[69697]: 2026-02-10T07:57:19.027Z [openclaw] Non-fatal unhandled rejection (continuing): TypeError: fetch failed
Feb 10 02:57:19 ai-companion node[69697]: at node:internal/deps/undici/undici:14902:13
Feb 10 02:57:19 ai-companion node[69697]: at processTicksAndRejections (node:internal/process/task_queues:105:5)
Feb 10 03:00:06 ai-companion systemd[17652]: Stopping openclaw-gateway.service - OpenClaw Gateway (v2026.2.6-3)...
Feb 10 03:00:06 ai-companion node[69697]: 2026-02-10T08:00:06.854Z [gateway] signal SIGTERM received
Feb 10 03:00:06 ai-companion node[69697]: 2026-02-10T08:00:06.856Z [gateway] received SIGTERM; shutting down
Feb 10 03:00:06 ai-companion node[69697]: 2026-02-10T08:00:06.893Z [gmail-watcher] gmail watcher stopped
Feb 10 03:00:07 ai-companion systemd[17652]: Stopped openclaw-gateway.service - OpenClaw Gateway (v2026.2.6-3).
Feb 10 03:00:07 ai-companion systemd[17652]: openclaw-gateway.service: Consumed 56.481s CPU time.
: TypeError: fetch failed
Feb 10 03:24:04 ai-companion node[70906]: at node:internal/deps/undici/undici:14902:13
Feb 10 03:24:04 ai-companion node[70906]: at processTicksAndRejections (node:internal/process/task_queues:105:5)
Feb 10 03:24:04 ai-companion node[70906]: at runNextTicks (node:internal/process/task_queues:69:3)
Feb 10 03:24:04 ai-companion node[70906]: at processTimers (node:internal/timers:520:9)
Feb 10 03:24:05 ai-companion node[70906]: 2026-02-10T08:24:05.322Z [agent/embedded] workspace bootstrap file AGENTS.md is 7804 chars (limit 500); truncating in injected context (sessionKey=agent:main:main)
Feb 10 03:24:05 ai-companion node[70906]: 2026-02-10T08:24:05.328Z [agent/embedded] workspace bootstrap file SOUL.md is 1664 chars (limit 500); truncating in injected context (sessionKey=agent:main:main)
Feb 10 03:24:05 ai-companion node[70906]: 2026-02-10T08:24:05.333Z [agent/embedded] workspace bootstrap file TOOLS.md is 850 chars (limit 500); truncating in injected context (sessionKey=agent:main:main)
Feb 10 03:24:05 ai-companion node[70906]: 2026-02-10T08:24:05.336Z [agent/embedded] workspace bootstrap file IDENTITY.md is 633 chars (limit 500); truncating in injected context (sessionKey=agent:main:main)
Feb 10 03:24:05 ai-companion node[70906]: 2026-02-10T08:24:05.341Z [agent/embedded] workspace bootstrap file BOOTSTRAP.md is 1449 chars (limit 500); truncating in injected context (sessionKey=agent:main:main)
Feb 10 03:26:34 ai-companion node[70906]: 2026-02-10T08:26:34.722Z [reload] config change detected; evaluating reload (meta.lastTouchedAt, models.providers.ollama.models, agents.defaults.compaction)
Feb 10 03:26:34 ai-companion node[70906]: 2026-02-10T08:26:34.725Z [reload] config change requires gateway restart (meta.lastTouchedAt)
Feb 10 03:26:34 ai-companion node[70906]: 2026-02-10T08:26:34.728Z [gateway] signal SIGUSR1 received
Feb 10 03:26:34 ai-companion node[70906]: 2026-02-10T08:26:34.730Z [gateway] received SIGUSR1; restarting
Feb 10 03:26:34 ai-companion node[70906]: 2026-02-10T08:26:34.773Z [gmail-watcher] gmail watcher stopped
Feb 10 03:26:35 ai-companion node[70906]: 2026-02-10T08:26:35.716Z [openclaw] Suppressed AbortError: AbortError: This operation was aborted
Feb 10 03:26:35 ai-companion node[70906]: at node:internal/deps/undici/undici:14902:13
Feb 10 03:26:35 ai-companion node[70906]: at processTicksAndRejections (node:internal/process/task_queues:105:5)
Feb 10 03:26:35 ai-companion node[70906]: 2026-02-10T08:26:35.740Z [canvas] host mounted at http://127.0.0.1:18789/__openclaw__/canvas/ (root /home/jason/.openclaw/canvas)
Feb 10 03:26:35 ai-companion node[70906]: 2026-02-10T08:26:35.767Z [heartbeat] started
Feb 10 03:26:35 ai-companion node[70906]: 2026-02-10T08:26:35.773Z [gateway] agent model: ollama/llama3.2:1b
Feb 10 03:26:35 ai-companion node[70906]: 2026-02-10T08:26:35.776Z [gateway] listening on ws://127.0.0.1:18789 (PID 70906)
Feb 10 03:26:35 ai-companion node[70906]: 2026-02-10T08:26:35.782Z [gateway] listening on ws://[::1]:18789
Feb 10 03:26:35 ai-companion node[70906]: 2026-02-10T08:26:35.789Z [gateway] log file: /tmp/openclaw/openclaw-2026-02-10.log
Feb 10 03:26:35 ai-companion node[70906]: 2026-02-10T08:26:35.796Z [browser/service] Browser control service ready (profiles=2)
Feb 10 03:26:36 ai-companion node[70906]: 2026-02-10T08:26:36.393Z [telegram] [default] starting provider (@Tr1nbot)
Feb 10 03:27:48 ai-companion node[70906]: 2026-02-10T08:27:48.248Z [reload] config change detected; evaluating reload (meta.lastTouchedAt, models.providers.ollama.models, agents.defaults.compaction)
Feb 10 03:27:48 ai-companion node[70906]: 2026-02-10T08:27:48.251Z [reload] config change requires gateway restart (meta.lastTouchedAt)
Feb 10 03:27:48 ai-companion node[70906]: 2026-02-10T08:27:48.256Z [gateway] signal SIGUSR1 received
Feb 10 03:27:48 ai-companion node[70906]: 2026-02-10T08:27:48.260Z [gateway] received SIGUSR1; restarting
Those lines finally tell us whatâs happening:
Non-fatal unhandled rejection ⌠TypeError: fetch failed(twice)- then
embedded run timeout ⌠timeoutMs=300000(5 minutes)
So the bot does start the run, but during the run some HTTP fetch fails and/or the Ollama request takes longer than 5 minutes and gets killed.
Two important notes:
- Youâre not seeing
[telegram] sendMessage failed âŚin that snippet, so thisfetch failedmight be Ollamaâs/v1/chat/completionsfetch (or another internal fetch), not necessarily Telegram. - You are still hitting a hard agent timeout at 300s.
1) Determine whether the failing fetch is Telegram or Ollama (2 quick tests)
A) Telegram send (no Ollama involved)
openclaw message send --channel telegram --target <YOUR_TG_USER_ID> --message "send test"
- If this fails â itâs still Telegram networking.
- If this succeeds reliably â Telegram is fine; focus on Ollama.
B) Ollama /v1 chat (what OpenClaw uses)
Run this twice back-to-back and note timings:
time curl -sS http://127.0.0.1:11434/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ollama-local" \
-d '{"model":"llama3.2:1b","messages":[{"role":"user","content":"Reply with exactly: pong"}],"max_tokens":16,"stream":false}' >/dev/null
If the first run is minutes but the second is seconds â thatâs cold-load/unload behavior (expected unless you keep models loaded).
2) Prevent Ollama cold-load from causing multi-minute first replies (recommended)
If Ollama is a systemd service:
systemctl status ollama --no-pager
Then:
sudo systemctl edit ollama
Add:
[Service]
Environment="OLLAMA_KEEP_ALIVE=30m"
(Use -1 to keep it loaded forever.)
Then:
sudo systemctl daemon-reload
sudo systemctl restart ollama
Now the first message after idle shouldnât take minutes.
3) Stop OpenClaw from killing long runs while you tune
Bump the agent timeout for now:
openclaw config set agents.defaults.timeoutSeconds 900 --json
systemctl --user restart openclaw-gateway.service
4) Identify what fetch failed is fetching (we need 10 lines around it)
Right after you reproduce the issue once (âhiâ in Telegram), run:
journalctl --user -u openclaw-gateway.service --since "5 minutes ago" --no-pager | tail -n 200
Paste that chunk. The lines right before fetch failed usually show which subsystem triggered it.
If you reply with:
- whether
openclaw message send âŚsucceeds, and - the timing of the first vs second Ollama
/v1/chat/completionscall,
weâll know exactly whether weâre still fighting Telegram networking or purely Ollama cold-load + timeouts.
Got it. Your gateway is running and I can see autoSelectFamily=true (good), but you still have two things in the logs:
TypeError: fetch failed(undici)embedded run timeout ⌠timeoutMs=300000
That combo usually means the run gets wedged by some failing HTTP fetch, then eventually times out.
Do these 3 fixes (in order), then test once
1) Remove Ollama auto-discovery (itâs no longer needed)
Since you now have an explicit models.providers.ollama block, you should delete the opt-in env var OLLAMA_API_KEY if you added it earlier.
Check if itâs set:
grep -n OLLAMA_API_KEY ~/.openclaw/.env || true
If it shows up, edit and remove that line:
nano ~/.openclaw/.env
Then restart the gateway:
systemctl --user restart openclaw-gateway.service
(This stops the âFailed to discover Ollama modelsâŚâ noise and can stop some of the weird fetch failures.)
2) Hard-cap Ollama output (prevents long rambles that hit timeout)
openclaw config set 'agents.defaults.models["ollama/llama3.2:1b"].params.maxTokens' 128 --json
openclaw config set agents.defaults.timeoutSeconds 900 --json
systemctl --user restart openclaw-gateway.service
3) Clean Telegram test (single message, avoids âorphaned user messageâ)
In Telegram DM send one line:
/new Reply with exactly: pong
Wait ~30â90s.
If it still doesnât reply, grab the last 2 minutes of logs
Right after sending that message:
journalctl --user -u openclaw-gateway.service --since "2 minutes ago" --no-pager | egrep -i 'fetch failed|sendMessage failed|sendChatAction failed|embedded run (start|timeout)'
Paste that output and weâll know immediately whether itâs still Telegram networking (sendMessage failed) or still an Ollama run wedge (fetch failed + no completion).
1st test: real 0m2.219s
user 0m0.002s
sys 0m0.010s 2nd test: real 0m1.569s
user 0m0.005s
sys 0m0.006s
Perfect â those timings (2.2s then 1.6s) mean the Ollama /v1/chat/completions endpoint is now fast and stable. So OpenClaw should no longer be hitting 5âminute timeouts just waiting on the model.
Next: re-test Telegram end-to-end
In Telegram DM, send one message (single line):
/new Reply with exactly: pong
You should get a reply pretty quickly now (tens of seconds max on a Pi, often much less).
If it still âtypesâ and doesnât reply
Run this on the server immediately after you send the message:
journalctl --user -u openclaw-gateway.service --since "2 minutes ago" --no-pager | egrep -i 'fetch failed|sendMessage failed|sendChatAction failed|embedded run (start|timeout)'
- If you see
sendMessage failed/fetch failedâ itâs still Telegram network (even with autoSelectFamily). - If you see
embedded run timeoutâ weâll bump/adjust timeout or cap tokens. - If you see neither â paste the output anyway; it will show what stage itâs stuck in.
Tell me what happens with the /new ⌠pong message.
no messages
Ok â now that Ollama is fast, âno messagesâ means we need to see whether:
- OpenClaw started a run and then failed to send back to Telegram, or
- OpenClaw never started a run (Telegram inbound/commands not being processed)
1) First: does /status still reply in Telegram?
In the Telegram DM, send:
/status
- If
/statusdoes reply, Telegram send is working and weâre narrowing to the LLM-run path. - If
/statusdoesnât reply, Telegram outbound/inbound is broken again.
2) Immediately pull the last 2 minutes of gateway logs (this is the decisive check)
Run on the server:
journalctl --user -u openclaw-gateway.service --since "2 minutes ago" --no-pager
(Do not grep yetâpaste the raw block. Grep keeps hiding the useful lines.)
3) While that log window is âfreshâ, send one test message
In Telegram DM send (single line):
/new Reply with exactly: pong
Then run the same journalctl command again and paste it.
4) Quick independent send test (no Ollama involved)
Also run:
openclaw message send --channel telegram --target <YOUR_TG_USER_ID> --message "send test right now"
If that arrives but /new ⌠doesnât, then the issue is definitely inside the agent run (not Telegram transport).
Paste:
- whether
/statusreplied - the
journalctl --since "2 minutes ago"output after you send/new ⌠pong
): TypeError: fetch failed
Feb 10 04:06:39 ai-companion node[71547]: at node:internal/deps/undici/undici:14902:13
Feb 10 04:06:39 ai-companion node[71547]: at processTicksAndRejections (node:internal/process/task_queues:105:5)
That stack trace line (TypeError: fetch failed) is too generic by itself â we need the 1â2 log lines right above it to know what it was trying to fetch (Telegram API vs Ollama vs something else).
1) Grab a bigger log slice around the error (no grep)
Run right after you reproduce âHiâ (or /new Reply with exactly: pong):
journalctl --user -u openclaw-gateway.service --since "3 minutes ago" --no-pager
Paste that whole chunk (it wonât include your tokens).
2) Quick check: can the gateway send to Telegram right now (no Ollama involved)?
openclaw message send --channel telegram --target <YOUR_TG_USER_ID> --message "telegram send test"
- If this fails â itâs still Telegram network/DNS/IPv6.
- If this succeeds â Telegram is fine; the failing
fetchis likely Ollama (or another internal fetch).
3) If it is Telegram network again: force Node to prefer IPv4 (most reliable)
Even with gai.conf, Node can still end up on IPv6 sometimes. Add this to the openclaw gateway systemd user service:
systemctl --user edit openclaw-gateway.service
Add:
[Service]
Environment="NODE_OPTIONS=--dns-result-order=ipv4first"
Then:
systemctl --user daemon-reload
systemctl --user restart openclaw-gateway.service
This makes all Node fetch() calls (including Telegram) prefer IPv4 first, which avoids your broken IPv6 route.
Send me:
- the output of
openclaw message send âŚ(success/failure text), and - the
journalctl --since "3 minutes ago"chunk,
and Iâll tell you exactly which side (Telegram vs Ollama) that fetch failed is coming from.
Feb 10 04:10:26 ai-companion node[71547]: 2026-02-10T09:10:26.799Z [agent/embedded] workspace bootstrap file AGENTS.md is 7804 chars (limit 500); truncating in injected context (sessionKey=agent:main:main)
Feb 10 04:10:26 ai-companion node[71547]: 2026-02-10T09:10:26.801Z [agent/embedded] workspace bootstrap file SOUL.md is 1664 chars (limit 500); truncating in injected context (sessionKey=agent:main:main)
Feb 10 04:10:26 ai-companion node[71547]: 2026-02-10T09:10:26.803Z [agent/embedded] workspace bootstrap file TOOLS.md is 850 chars (limit 500); truncating in injected context (sessionKey=agent:main:main)
Feb 10 04:10:26 ai-companion node[71547]: 2026-02-10T09:10:26.805Z [agent/embedded] workspace bootstrap file IDENTITY.md is 633 chars (limit 500); truncating in injected context (sessionKey=agent:main:main)
Feb 10 04:10:26 ai-companion node[71547]: 2026-02-10T09:10:26.807Z [agent/embedded] workspace bootstrap file BOOTSTRAP.md is 1449 chars (limit 500); truncating in injected context (sessionKey=agent:main:main)
Yep â run exactly that command on the server, then paste what it outputs here.
journalctl --user -u openclaw-gateway.service --since "3 minutes ago" --no-pager
If it outputs nothing, widen it to 10 minutes:
journalctl --user -u openclaw-gateway.service --since "10 minutes ago" --no-pager
Also, in parallel, run this (itâs the fastest âis Telegram sending broken right now?â test):
openclaw message send --channel telegram --target <YOUR_TG_USER_ID> --message "send test (now)"
If you paste the journal output + whether that send test arrived, we can pinpoint whether fetch failed is Telegram API or something else.
Those lines mean: OpenClaw started building the prompt (itâs truncating the bootstrap files), but we still donât see what happens after that (Ollama call? sendMessage? timeout?).
Letâs split this into two yes/no tests and one âcapture the runâ:
1) Can the gateway send to Telegram right now? (no Ollama involved)
Run:
openclaw message send --channel telegram --target <YOUR_TG_USER_ID> --message "send test right now"
- If you donât receive it â Telegram sending is still broken (network/DNS/IPv6).
- If you do receive it â Telegram is fine; the issue is in the agent/Ollama run.
2) Capture the full log for one /new ⌠message (live follow)
On the server, start this and leave it running:
journalctl --user -u openclaw-gateway.service -f --no-pager
Then in Telegram DM send exactly one message:
/new Reply with exactly: pong
Wait 30â90 seconds, then paste whatever new lines appear in journalctl after the bootstrap-truncation lines (weâre looking for embedded run start, fetch failed, sendMessage, or embedded run timeout).
3) If Telegram sending is flaky: force IPv4 first for the gatewayâs Node process (most reliable)
This prevents âfetch failedâ caused by broken IPv6 selection:
systemctl --user edit openclaw-gateway.service
Add:
[Service]
Environment="NODE_OPTIONS=--dns-result-order=ipv4first"
Then:
systemctl --user daemon-reload
systemctl --user restart openclaw-gateway.service
â
Reply with:
- whether the
openclaw message send âŚarrived, and - the
journalctl -flines after you send/new Reply with exactly: pong.
Feb 10 04:13:38 ai-companion systemd[17652]: Stopping openclaw-gateway.service - OpenClaw Gateway (v2026.2.6-3)...
Feb 10 04:13:38 ai-companion node[71547]: 2026-02-10T09:13:38.229Z [gateway] signal SIGTERM received
Feb 10 04:13:38 ai-companion node[71547]: 2026-02-10T09:13:38.233Z [gateway] received SIGTERM; shutting down
Feb 10 04:13:38 ai-companion node[71547]: 2026-02-10T09:13:38.270Z [gmail-watcher] gmail watcher stopped
Feb 10 04:13:39 ai-companion systemd[17652]: Stopped openclaw-gateway.service - OpenClaw Gateway (v2026.2.6-3).
Feb 10 04:13:39 ai-companion systemd[17652]: openclaw-gateway.service: Consumed 1min 769ms CPU time, 1.1G memory peak, 0B memory swap peak.
Feb 10 04:13:39 ai-companion systemd[17652]: Started openclaw-gateway.service - OpenClaw Gateway (v2026.2.6-3).
krill?
Here.
At this point the fastest path is:
1) Run the âsend testâ (tells us if Telegram is broken or the model run is broken)
On the server:
openclaw message send --channel telegram --target <YOUR_TG_USER_ID> --message "send test right now"
Did you receive that message in Telegram: yes or no?
2) If you did not receive it â fix Node to prefer IPv4 (this stops the fetch failed)
Run:
systemctl --user edit openclaw-gateway.service
Add:
[Service]
Environment="NODE_OPTIONS=--dns-result-order=ipv4first"
Then:
systemctl --user daemon-reload
systemctl --user restart openclaw-gateway.service
3) If you did receive it â Telegram is fine, so test the model run
In Telegram DM send:
/new Reply with exactly: pong
and then weâll look at the live log (journalctl -f) for embedded run timeout vs success.
Tell me the answer to #1 (did the âsend testâ arrive?).
Feb 10 04:27:39 ai-companion openclaw[74050]: openclaw message send --channel telegram --target @mychat --message "Hi"
Feb 10 04:27:39 ai-companion openclaw[74050]: Send via your Telegram bot.
Feb 10 04:27:39 ai-companion openclaw[74050]: Docs: https://docs.openclaw.ai/cli
Feb 10 04:27:39 ai-companion systemd[1]: openclaw.service: Main process exited, code=exited, status=1/FAILURE
Feb 10 04:27:39 ai-companion systemd[1]: openclaw.service: Failed with result 'exit-code'.
Feb 10 04:27:39 ai-companion systemd[1]: openclaw.service: Consumed 47.151s CPU time.
Feb 10 04:27:42 ai-companion wpa_supplicant[531]: wlan0: Failed to initiate sched scan
Feb 10 04:27:49 ai-companion systemd[1]: openclaw.service: Scheduled restart job, restart counter is at 5724.
Feb 10 04:27:49 ai-companion systemd[1]: Started openclaw.service - OpenClaw AI Agent.
Feb 10 04:27:54 ai-companion wpa_supplicant[531]: wlan0: Failed to initiate sched scan
CFeb 10 04:28:05 ai-companion wpa_supplicant[531]: wlan0: Failed to initiate sched scan
Feb 10 04:28:17 ai-companion wpa_supplicant[531]: wlan0: Failed to initiate sched scan
Feb 10 04:28:19 ai-companion openclaw[74069]: đŚ OpenClaw 2026.2.6-3 (85ed6c7) â I'm the assistant your terminal demanded, not the one your sleep schedule requested.
Feb 10 04:28:19 ai-companion openclaw[74069]: Usage: openclaw [options] [command]
Feb 10 04:28:19 ai-companion openclaw[74069]: Options:
Feb 10 04:28:19 ai-companion openclaw[74069]: --dev Dev profile: isolate state under ~/.openclaw-dev, default
Feb 10 04:28:19 ai-companion openclaw[74069]: gateway port 19001, and shift derived ports (browser/canvas)
Feb 10 04:28:19 ai-companion openclaw[74069]: -h, --help display help for command
Feb 10 04:28:19 ai-companion openclaw[74069]: --no-color Disable ANSI colors
Feb 10 04:28:19 ai-companion openclaw[74069]: --profile <name> Use a named profile (isolates
Feb 10 04:28:19 ai-companion openclaw[74069]: OPENCLAW_STATE_DIR/OPENCLAW_CONFIG_PATH under
Feb 10 04:28:19 ai-companion openclaw[74069]: ~/.openclaw-<name>)
Feb 10 04:28:19 ai-companion openclaw[74069]: -V, --version output the version number
Feb 10 04:28:19 ai-companion openclaw[74069]: Commands:
Feb 10 04:28:19 ai-companion openclaw[74069]: acp Agent Control Protocol tools
Feb 10 04:28:19 ai-companion openclaw[74069]: agent Run an agent turn via the Gateway (use --local for embedded)
Feb 10 04:28:19 ai-companion openclaw[74069]: agents Manage isolated agents (workspaces + auth + routing)
Feb 10 04:28:19 ai-companion openclaw[74069]: approvals Exec approvals
Feb 10 04:28:19 ai-companion openclaw[74069]: browser Manage OpenClaw's dedicated browser (Chrome/Chromium)
Feb 10 04:28:19 ai-companion openclaw[74069]: channels Channel management
Feb 10 04:28:19 ai-companion openclaw[74069]: completion Generate shell completion script
Feb 10 04:28:19 ai-companion openclaw[74069]: config Config helpers (get/set/unset). Run without subcommand for
Feb 10 04:28:19 ai-companion openclaw[74069]: the wizard.
Feb 10 04:28:19 ai-companion openclaw[74069]: configure Interactive prompt to set up credentials, devices, and agent
Feb 10 04:28:19 ai-companion openclaw[74069]: defaults
Feb 10 04:28:19 ai-companion openclaw[74069]: cron Cron scheduler
Feb 10 04:28:19 ai-companion openclaw[74069]: daemon Gateway service (legacy alias)
Feb 10 04:28:19 ai-companion openclaw[74069]: dashboard Open the Control UI with your current token
Feb 10 04:28:19 ai-companion openclaw[74069]: devices Device pairing + token management
Feb 10 04:28:19 ai-companion openclaw[74069]: directory Directory commands
Feb 10 04:28:19 ai-companion openclaw[74069]: dns DNS helpers
Feb 10 04:28:19 ai-companion openclaw[74069]: docs Docs helpers
Feb 10 04:28:19 ai-companion openclaw[74069]: doctor Health checks + quick fixes for the gateway and channels
Feb 10 04:28:19 ai-companion openclaw[74069]: gateway Gateway control
Feb 10 04:28:19 ai-companion openclaw[74069]: health Fetch health from the running gateway
Feb 10 04:28:19 ai-companion openclaw[74069]: help display help for command
Feb 10 04:28:19 ai-companion openclaw[74069]: hooks Hooks tooling
Feb 10 04:28:19 ai-companion openclaw[74069]: logs Gateway logs
Feb 10 04:28:19 ai-companion openclaw[74069]: memory Memory search tools
Feb 10 04:28:19 ai-companion openclaw[74069]: message Send messages and channel actions
Feb 10 04:28:19 ai-companion openclaw[74069]: models Model configuration
Feb 10 04:28:19 ai-companion openclaw[74069]: node Node control
Feb 10 04:28:19 ai-companion openclaw[74069]: nodes Node commands
Feb 10 04:28:19 ai-companion openclaw[74069]: onboard Interactive wizard to set up the gateway, workspace, and
Feb 10 04:28:19 ai-companion openclaw[74069]: skills
Feb 10 04:28:19 ai-companion openclaw[74069]: pairing Pairing helpers
Feb 10 04:28:19 ai-companion openclaw[74069]: plugins Plugin management
Feb 10 04:28:19 ai-companion openclaw[74069]: reset Reset local config/state (keeps the CLI installed)
Feb 10 04:28:19 ai-companion openclaw[74069]: sandbox Sandbox tools
Feb 10 04:28:19 a
Feb 10 04:28:19 ai-companion openclaw[74069]:  tui        Terminal UI
Feb 10 04:28:19 ai-companion openclaw[74069]:  uninstall     Uninstall the gateway service + local data (CLI remains)
Feb 10 04:28:19 ai-companion openclaw[74069]:  update       CLI update helpers
Feb 10 04:28:19 ai-companion openclaw[74069]:  webhooks      Webhook helpers
Feb 10 04:28:19 ai-companion openclaw[74069]: Examples:
Feb 10 04:28:19 ai-companion openclaw[74069]: Â openclaw channels login --verbose
Feb 10 04:28:19 ai-companion openclaw[74069]: Â Â Link personal WhatsApp Web and show QR + connection logs.
Feb 10 04:28:19 ai-companion openclaw[74069]: Â openclaw message send --target +15555550123 --message "Hi" --json
Feb 10 04:28:19 ai-companion openclaw[74069]: Â Â Send via your web session and print JSON result.
Feb 10 04:28:19 ai-companion openclaw[74069]: Â openclaw gateway --port 18789
Feb 10 04:28:19 ai-companion openclaw[74069]: Â Â Run the WebSocket Gateway locally.
Feb 10 04:28:19 ai-companion openclaw[74069]: Â openclaw --dev gateway
Feb 10 04:28:19 ai-companion openclaw[74069]: Â Â Run a dev Gateway (isolated state/config) on ws://127.0.0.1:19001.
Feb 10 04:28:19 ai-companion openclaw[74069]: Â openclaw gateway --force
Feb 10 04:28:19 ai-companion openclaw[74069]: Â Â Kill anything bound to the default gateway port, then start it.
Feb 10 04:28:19 ai-companion openclaw[74069]: Â openclaw gateway ...
Feb 10 04:28:19 ai-companion openclaw[74069]: Â Â Gateway control via WebSocket.
Feb 10 04:28:19 ai-companion openclaw[74069]: Â openclaw agent --to +15555550123 --message "Run summary" --deliver
Feb 10 04:28:19 ai-companion openclaw[74069]: Â Â Talk directly to the agent using the Gateway; optionally send the WhatsApp reply.
Feb 10 04:28:19 ai-companion openclaw[74069]: Â openclaw message send --channel telegram --target @mychat --message "Hi"
Feb 10 04:28:19 ai-companion openclaw[74069]: Â Â Send via your Telegram bot.
Feb 10 04:28:19 ai-companion openclaw[74069]: Docs: https://docs.openclaw.ai/cli
Feb 10 04:28:19 ai-companion systemd[1]: openclaw.service: Main process exited, code=exited, status=1/FAILURE
Feb 10 04:28:19 ai-companion systemd[1]: openclaw.service: Failed with result 'exit-code'.
Feb 10 04:28:19 ai-companion systemd[1]: openclaw.service: Consumed 47.154s CPU time.
Feb 10 04:28:28 ai-companion wpa_supplicant[531]: wlan0: Failed to initiate sched scan
Feb 10 04:28:30 ai-companion systemd[1]: openclaw.service: Scheduled restart job, restart counter is at 5725.
Feb 10 04:28:30 ai-companion systemd[1]: Started openclaw.service - OpenClaw AI Agent.
Feb 10 04:28:40 ai-companion wpa_supplicant[531]: wlan0: Failed to initiate sched scan
Feb 10 04:28:52 ai-companion wpa_supplicant[531]: wlan0: Failed to initiate sched scan
Those logs show something else going on: you have a system-wide service called openclaw.service thatâs crash-looping (restart counter is at 5724). Thatâs not the normal Telegram/Gateway service (which is openclaw-gateway.service under --user).
1) First question: did the âHiâ message arrive in Telegram?
Because the log you pasted doesnât show whether openclaw message send ⌠succeeded or failed â it just shows the command text and then the unrelated openclaw.service restart.
2) Donât use --target @mychat
For Telegram, use your numeric Telegram user id (the one the bot showed you during pairing).
Run this in your SSH shell (not in a service):
openclaw message send --channel telegram --target <YOUR_TELEGRAM_NUMERIC_ID> --message "Hi"
3) That crash-looping openclaw.service is a problem
Itâs separate from the gateway and can cause confusion / load / restarts.
Please paste these two outputs:
systemctl --user status openclaw-gateway.service --no-pager -n 20
sudo systemctl status openclaw.service --no-pager -n 40
If openclaw.service is something you donât intentionally need, the fix is usually:
sudo systemctl disable --now openclaw.service
âŚbut I want to see what it is first (from status) before telling you to disable it.
Once we confirm the direct openclaw message send ⌠--target <id> works, we can go back to fixing âbot typing but no replyâ (which earlier was Telegram network/IPv6 + Ollama timeouts).
Those logs are showing a different service than the one weâve been debugging:
openclaw-gateway.service= the correct user service that runs the Gateway + Telegramopenclaw.service= a system-wide service (âOpenClaw AI Agentâ) that is crash-looping (restart counter in the thousands)
And the line:
openclaw message send --channel telegram --target @mychat --message "Hi"
is not a real send â itâs the example text from OpenClawâs help output, which got printed because openclaw.service is basically just running openclaw (or something invalid) and exiting.
1) Confirm both services
Run these and paste the output:
systemctl --user status openclaw-gateway.service --no-pager -n 20
sudo systemctl status openclaw.service --no-pager -n 60
2) If you did NOT intentionally set up openclaw.service, disable it
(This will stop the noise + stop it from interfering/confusing logs.)
sudo systemctl disable --now openclaw.service
3) To test Telegram sending, run the command in your shell (as user jason)
Use your numeric Telegram user id (not @mychat, thatâs a placeholder example):
openclaw message send --channel telegram --target <YOUR_TG_NUMERIC_ID> --message "Hi" --json
Then tell me: did it arrive?
Once openclaw.service is out of the way and weâre sure the CLI send works, we can go back to the âbot typing but no replyâ case with clean logs from:
journalctl --user -u openclaw-gateway.service -f --no-pager
Feb 10 04:25:43 ai-companion systemd[17652]: Started openclaw-gateway.service - OpenClaw Gateway (v2026.2.6-3).
Feb 10 04:26:20 ai-companion node[74004]: 2026-02-10T09:26:20.359Z [canvas] host mounted at http://127.0.0.1:18âŚ/canvas)
Feb 10 04:26:20 ai-companion node[74004]: 2026-02-10T09:26:20.483Z [heartbeat] started
Feb 10 04:26:20 ai-companion node[74004]: 2026-02-10T09:26:20.489Z [gateway] agent model: ollama/llama3.2:1b
Feb 10 04:26:20 ai-companion node[74004]: 2026-02-10T09:26:20.492Z [gateway] listening on ws://127.0.0.1:18789 âŚD 74004)
Feb 10 04:26:20 ai-companion node[74004]: 2026-02-10T09:26:20.494Z [gateway] listening on ws://[::1]:18789
Feb 10 04:26:20 ai-companion node[74004]: 2026-02-10T09:26:20.497Z [gateway] log file: /tmp/openclaw/openclaw-2âŚ2-10.log
Feb 10 04:26:20 ai-companion node[74004]: 2026-02-10T09:26:20.523Z [browser/service] Browser control service reâŚfiles=2)
Feb 10 04:26:21 ai-companion node[74004]: 2026-02-10T09:26:21.209Z [telegram] [default] starting provider (@Tr1nbot)
Feb 10 04:26:21 ai-companion node[74004]: 2026-02-10T09:26:21.233Z [telegram] autoSelectFamily=true (config)
Hint: Some lines were ellipsized, use -l to show in full.
â openclaw.service - OpenClaw AI Agent
Loaded: loaded (/etc/systemd/system/openclaw.service; enabled; preset: enabled)
Active: active (running) since Tue 2026-02-10 04:32:27 EST; 26s ago
Main PID: 74219 (openclaw)
Tasks: 14 (limit: 9067)
Memory: 917.4M (peak: 917.6M)
CPU: 41.304s
CGroup: /system.slice/openclaw.service
ââ74219 openclaw
ââ74226 openclaw
Feb 10 04:32:27 ai-companion systemd[1]: openclaw.service: Scheduled restart job, restart counter is at 5731.
Feb 10 04:32:27 ai-companion systemd[1]: Started openclaw.service - OpenClaw AI Agent.
the telegram message arrived
starting to wonder if its fixable
Nice â that means Telegram outbound from the gateway is working right now. So the remaining issue is specifically: agent run â model output â send reply.
Letâs do one clean âdoes the bot reply?â test, with zero ambiguity.
1) In Telegram DM (to the bot)
Send these as separate messages:
/stop/new Reply with exactly: pong
Then wait up to ~90 seconds.
2) If you still get no reply: watch the gateway logs live while you send it
On the server (as user jason):
journalctl --user -u openclaw-gateway.service -f --no-pager
Now send the /new Reply with exactly: pong message again and paste the new log lines that appear after embedded run start (or after the bootstrap truncation lines). Weâre looking for either:
sendMessage failed(Telegram send problem)embedded run timeout(Ollama/prompt too slow)- a normal completion/send
3) Also: you should disable the crash-looping system service (openclaw.service)
Itâs separate from the gateway and has been spamming logs/confusing the situation.
Check it:
sudo systemctl status openclaw.service --no-pager -n 40
Itâs fixable. Youâve already proven the hard parts work:
- Gateway runs
- Telegram connects
- Telegram outbound works (
openclaw message send âŚarrived) - Ollama
/v1/chat/completionsis now fast (seconds)
So whatâs left is just one bug/setting in the âagent run â reply sendâ path, and we can nail it with one clean capture.
Do this one last tight loop (2 minutes)
- On the server, start live logs:
journalctl --user -u openclaw-gateway.service -f --no-pager
- In Telegram DM send exactly:
If you didnât intentionally set it up, disable it:
sudo systemctl disable --now openclaw.service
Reply with what happens in step (1) (did you get pong?), and if not, paste the journalctl -f lines for that attempt.
/stop
/new Reply with exactly: pong
- Wait 30â60 seconds, then paste the new log lines that appear after
embedded run start(or after the bootstrap truncation lines).
That will tell us precisely which of these it is:
embedded run timeoutâ increase timeout / keep-alive / shrink promptsendMessage failed/fetch failedâ still occasional Telegram networking, fix with ipv4first Node option- model output/tool-json weirdness â disable tools for ollama
If you want the âmost likelyâ quick fix without logs, itâs this (safe):
systemctl --user edit openclaw-gateway.service
Add:
[Service]
Environment="NODE_OPTIONS=--dns-result-order=ipv4first"
Then:
systemctl --user daemon-reload
systemctl --user restart openclaw-gateway.service
Because youâve repeatedly had fetch failed from undici, and forcing IPv4 first makes that go away on hosts with broken IPv6.
But please paste the journalctl -f snippet from the /new ⌠pong attempt â thatâs the fastest way to end this cleanly.
Ă openclaw.service - OpenClaw AI Agent
Loaded: loaded (/etc/systemd/system/openclaw.service; disabled; preset: enabled)
Active: failed (Result: exit-code) since Tue 2026-02-10 04:33:36 EST; 10min ago
Duration: 2.985s
Process: 74242 ExecStart=/usr/bin/openclaw (code=exited, status=1/FAILURE)
Main PID: 74242 (code=exited, status=1/FAILURE)
CPU: 46.027s
Feb 10 04:33:36 ai-companion openclaw[74249]: node Node control
Feb 10 04:33:36 ai-companion openclaw[74249]: nodes Node commands
Feb 10 04:33:36 ai-companion openclaw[74249]: onboard Interactive wizard to set up the gateway, workâŚce, and
Feb 10 04:33:36 ai-companion openclaw[74249]: skills
Feb 10 04:33:36 ai-companion openclaw[74249]: pairing Pairing helpers
Feb 10 04:33:36 ai-companion openclaw[74249]: plugins Plugin management
Feb 10 04:33:36 ai-companion openclaw[74249]: reset Reset local config/state (keeps the CLI installed)
Feb 10 04:33:36 ai-companion openclaw[74249]: sandbox Sandbox tools
Feb 10 04:33:36 ai-companion openclaw[74249]: security Security helpers
Feb 10 04:33:36 ai-companion openclaw[74249]: sessions List stored conversation sessions
Feb 10 04:33:36 ai-companion openclaw[74249]: setup Initialize ~/.openclaw/openclaw.json and the aâŚrkspace
Feb 10 04:33:36 ai-companion openclaw[74249]: skills Skills management
Feb 10 04:33:36 ai-companion openclaw[74249]: status Show channel health and recent session recipients
Feb 10 04:33:36 ai-companion openclaw[74249]: system System events, heartbeat, and presence
Feb 10 04:33:36 ai-companion openclaw[74249]: tui Terminal UI
Feb 10 04:33:36 ai-companion openclaw[74249]: uninstall Uninstall the gateway service + local data (CLâŚemains)
Feb 10 04:33:36 ai-companion openclaw[74249]: update CLI update helpers
Feb 10 04:33:36 ai-companion openclaw[74249]: webhooks Webhook helpers
Feb 10 04:33:36 ai-companion openclaw[74249]: Examples:
Feb 10 04:33:36 ai-companion openclaw[74249]: openclaw channels login --verbose
Feb 10 04:33:36 ai-companion openclaw[74249]: Link personal WhatsApp Web and show QR + connection logs.
Feb 10 04:33:36 ai-companion openclaw[74249]: openclaw message send --target +15555550123 --message "Hi" --json
Feb 10 04:33:36 ai-companion openclaw[74249]: Send via your web session and print JSON result.
Feb 10 04:33:36 ai-companion openclaw[74249]: openclaw gateway --port 18789
Feb 10 04:33:36 ai-companion openclaw[74249]: Run the WebSocket Gateway locally.
Feb 10 04:33:36 ai-companion openclaw[74249]: openclaw --dev gateway
Feb 10 04:33:36 ai-companion openclaw[74249]: Run a dev Gateway (isolated state/config) on ws://127.0.0.1:19001.
Feb 10 04:33:36 ai-companion openclaw[74249]: openclaw gateway --force
Feb 10 04:33:36 ai-companion openclaw[74249]: Kill anything bound to the default gateway port, then start it.
Feb 10 04:33:36 ai-companion openclaw[74249]: openclaw gateway ...
Feb 10 04:33:36 ai-companion openclaw[74249]: Gateway control via WebSocket.
Feb 10 04:33:36 ai-companion openclaw[74249]: openclaw agent --to +15555550123 --message "Run summary" --deliver
Feb 10 04:33:36 ai-companion openclaw[74249]: Talk directly to the agent using the Gateway; optionally send ⌠reply.
Feb 10 04:33:36 ai-companion openclaw[74249]: openclaw message send --channel telegram --target @mychat --message "Hi"
Feb 10 04:33:36 ai-companion openclaw[74249]: Send via your Telegram bot.
Feb 10 04:33:36 ai-companion openclaw[74249]: Docs: https://docs.openclaw.ai/cli
Feb 10 04:33:36 ai-companion systemd[1]: openclaw.service: Main process exited, code=exited, status=1/FAILURE
Feb 10 04:33:36 ai-companion systemd[1]: openclaw.service: Failed with result 'exit-code'.
Feb 10 04:33:36 ai-companion systemd[1]: Stopped openclaw.service - OpenClaw AI Agent.
Feb 10 04:33:36 ai-companion systemd[1]: openclaw.service: Consumed 46.027s CPU time, 202.3M memory peak, 0B meâŚap peak.
Hint: Some lines were ellipsized, use -l to show in full.
This log is not the gateway handling your Telegram message. Itâs the crash-looping system service openclaw.service printing OpenClawâs help/examples and then exiting.
That service is noise and is confusing everything. The gateway service we care about is:
openclaw-gateway.service (user service)
1) Disable the broken system service (safe, and you want it gone)
Run:
sudo systemctl disable --now openclaw.service
Then confirm itâs dead:
sudo systemctl status openclaw.service --no-pager -n 20
2) Now capture the right logs (gateway service)
On the server:
journalctl --user -u openclaw-gateway.service -f --no-pager
(Notice: openclaw-gateway, not openclaw.)
Then in Telegram DM send:
/stop
/new Reply with exactly: pong
Paste what appears in that journalctl --user -u openclaw-gateway.service -f window.
Why Iâm confident itâs fixable
You already proved openclaw message send --channel telegram ... arrives, so the gateway can send to Telegram. We just need the gateway logs for the /new ... run â right now youâre showing the wrong service.
Do step 1 (disable openclaw.service) first; then step 2 will produce clean, actionable logs.
Feb 10 04:42:27 ai-companion node[74004]: 2026-02-10T09:42:27.644Z [agent/embedded] workspace bootstrap file AGENTS.md is 7804 chars (limit 500); truncating in injected context (sessionKey=agent:main:main)
Feb 10 04:42:27 ai-companion node[74004]: 2026-02-10T09:42:27.646Z [agent/embedded] workspace bootstrap file SOUL.md is 1664 chars (limit 500); truncating in injected context (sessionKey=agent:main:main)
Feb 10 04:42:27 ai-companion node[74004]: 2026-02-10T09:42:27.648Z [agent/embedded] workspace bootstrap file TOOLS.md is 850 chars (limit 500); truncating in injected context (sessionKey=agent:main:main)
Feb 10 04:42:27 ai-companion node[74004]: 2026-02-10T09:42:27.650Z [agent/embedded] workspace bootstrap file IDENTITY.md is 633 chars (limit 500); truncating in injected context (sessionKey=agent:main:main)
Feb 10 04:42:27 ai-companion node[74004]: 2026-02-10T09:42:27.652Z [agent/embedded] workspace bootstrap file BOOTSTRAP.md is 1449 chars (limit 500); truncating in injected context (sessionKey=agent:main:main)
Feb 10 04:43:16 ai-companion node[74004]: 2026-02-10T09:43:16.420Z [agent/embedded] workspace bootstrap file AGENTS.md is 7804 chars (limit 500); truncating in injected context (sessionKey=agent:main:main)
Feb 10 04:43:16 ai-companion node[74004]: 2026-02-10T09:43:16.422Z [agent/embedded] workspace bootstrap file SOUL.md is 1664 chars (limit 500); truncating in injected context (sessionKey=agent:main:main)
Feb 10 04:43:16 ai-companion node[74004]: 2026-02-10T09:43:16.424Z [agent/embedded] workspace bootstrap file TOOLS.md is 850 chars (limit 500); truncating in injected context (sessionKey=agent:main:main)
Feb 10 04:43:16 ai-companion node[74004]: 2026-02-10T09:43:16.425Z [agent/embedded] workspace bootstrap file IDENTITY.md is 633 chars (limit 500); truncating in injected context (sessionKey=agent:main:main)
Feb 10 04:43:16 ai-companion node[74004]: 2026-02-10T09:43:16.427Z [agent/embedded] workspace bootstrap file BOOTSTRAP.md is 1449 chars (limit 500); truncating in injected context (sessionKey=agent:main:main)
Those lines mean the Gateway is starting a run (itâs building the prompt and truncating the injected files), but weâre still missing the part right after that (the actual Ollama call + the Telegram send).
Two things to do that will usually make this âfinally replyâ on Ollama:
1) Disable tools for Ollama (prevents tool-call weirdness / JSON blobs)
On the server:
openclaw config set tools.byProvider.ollama.deny '["*"]' --json
systemctl --user restart openclaw-gateway.service
Then in Telegram DM send one message:
/new Reply with exactly: pong
2) Capture the next lines after the truncation (so we can see success vs failure)
Right after you send that message, run:
journalctl --user -u openclaw-gateway.service --since "2 minutes ago" --no-pager
and paste the output. Weâre looking for either:
- an Ollama request completing, or
sendMessage failed, orembedded run timeout, or- another
fetch failed(with context above it).
Quick sanity check
Also: did you disable the crash-looping system service yet?
sudo systemctl disable --now openclaw.service
(Itâs separate from the gateway and can confuse logs.)
Do step 1, test /new ⌠pong, then paste the âsince 2 minutes agoâ journal output. That will tell us exactly whatâs still blocking the reply.
Feb 10 04:51:31 ai-companion systemd[17652]: Stopping openclaw-gateway.service - OpenClaw Gateway (v2026.2.6-3)...
Feb 10 04:51:31 ai-companion node[74004]: 2026-02-10T09:51:31.133Z [gateway] signal SIGTERM received
Feb 10 04:51:31 ai-companion node[74004]: 2026-02-10T09:51:31.137Z [gateway] received SIGTERM; shutting down
Feb 10 04:51:31 ai-companion node[74004]: 2026-02-10T09:51:31.172Z [gmail-watcher] gmail watcher stopped
Feb 10 04:51:31 ai-companion systemd[17652]: Stopped openclaw-gateway.service - OpenClaw Gateway (v2026.2.6-3).
Feb 10 04:51:31 ai-companion systemd[17652]: openclaw-gateway.service: Consumed 1min 3.103s CPU time, 1.1G memory peak, 0B memory swap peak.
Feb 10 04:51:31 ai-companion systemd[17652]: Started openclaw-gateway.service - OpenClaw Gateway (v2026.2.6-3).
Feb 10 04:52:00 ai-companion node[74746]: 2026-02-10T09:52:00.578Z [canvas] host mounted at http://127.0.0.1:18789/__openclaw__/canvas/ (root /home/jason/.openclaw/canvas)
Feb 10 04:52:00 ai-companion node[74746]: 2026-02-10T09:52:00.689Z [heartbeat] started
Feb 10 04:52:00 ai-companion node[74746]: 2026-02-10T09:52:00.695Z [gateway] agent model: ollama/llama3.2:1b
Feb 10 04:52:00 ai-companion node[74746]: 2026-02-10T09:52:00.697Z [gateway] listening on ws://127.0.0.1:18789 (PID 74746)
Feb 10 04:52:00 ai-companion node[74746]: 2026-02-10T09:52:00.700Z [gateway] listening on ws://[::1]:18789
Feb 10 04:52:00 ai-companion node[74746]: 2026-02-10T09:52:00.703Z [gateway] log file: /tmp/openclaw/openclaw-2026-02-10.log
Feb 10 04:52:00 ai-companion node[74746]: 2026-02-10T09:52:00.729Z [browser/service] Browser control service ready (profiles=2)
Feb 10 04:52:01 ai-companion node[74746]: 2026-02-10T09:52:01.200Z [telegram] [default] starting provider (@Tr1nbot)
Feb 10 04:52:01 ai-companion node[74746]: 2026-02-10T09:52:01.224Z [telegram] autoSelectFamily=true (config)
Feb 10 04:52:01 ai-companion node[74746]: 2026-02-10T09:52:01.813Z [openclaw] Non-fatal unhandled rejection (continuing): TypeError: fetch failed
Feb 10 04:52:01 ai-companion node[74746]: at node:internal/deps/undici/undici:14902:13
Feb 10 04:52:01 ai-companion node[74746]: at processTicksAndRejections (node:internal/process/task_queues:105:5)
Feb 10 04:52:02 ai-companion node[74746]: 2026-02-10T09:52:02.709Z [agent/embedded] workspace bootstrap file AGENTS.md is 7804 chars (limit 500); truncating in injected context (sessionKey=agent:main:main)
Feb 10 04:52:02 ai-companion node[74746]: 2026-02-10T09:52:02.711Z [agent/embedded] workspace bootstrap file SOUL.md is 1664 chars (limit 500); truncating in injected context (sessionKey=agent:main:main)
Feb 10 04:52:02 ai-companion node[74746]: 2026-02-10T09:52:02.713Z [agent/embedded] workspace bootstrap file TOOLS.md is 850 chars (limit 500); truncating in injected context (sessionKey=agent:main:main)
Feb 10 04:52:02 ai-companion node[74746]: 2026-02-10T09:52:02.715Z [agent/embedded] workspace bootstrap file IDENTITY.md is 633 chars (limit 500); truncating in injected context (sessionKey=agent:main:main)
Feb 10 04:52:02 ai-companion node[74746]: 2026-02-10T09:52:02.717Z [agent/embedded] workspace bootstrap file BOOTSTRAP.md is 1449 chars (limit 500); truncating in injected context (sessionKey=agent:main:main)
That log is super helpful. The important line is:
[openclaw] ⌠TypeError: fetch failed
âŚand it happens right after Telegram starts. So the gateway is still failing an outbound HTTPS request (almost certainly to Telegramâs API) even though you set autoSelectFamily=true.
On hosts with âIPv6 DNS exists but IPv6 egress is brokenâ, the most reliable fix is to force Node itself to prefer IPv4.
Fix: force IPv4-first for the Gateway process (systemd user service)
Run:
systemctl --user edit openclaw-gateway.service
Paste this in the editor:
[Service]
Environment="NODE_OPTIONS=--dns-result-order=ipv4first"
Save/exit, then:
systemctl --user daemon-reload
systemctl --user restart openclaw-gateway.service
Quick verification (no Ollama involved)
- Send a test message from the server:
openclaw message send --channel telegram --target <YOUR_TG_NUMERIC_ID> --message "send test after ipv4first"
- If that arrives, try in Telegram:
/stop
/new Reply with exactly: pong
If it still âtypes but no replyâ
Run this right after sending the Telegram message and paste it:
journalctl --user -u openclaw-gateway.service --since "2 minutes ago" --no-pager
One more note: earlier your logs showed wpa_supplicant ⌠Failed to initiate sched scan a lot. If youâre on WiâFi, intermittent WiâFi drops can also cause fetch failed. If IPv4-first doesnât fix it completely, try (even temporarily) Ethernet or check connectivity during the send:
ping -c 3 api.telegram.org
Feb 10 04:58:23 ai-companion node[74897]: 2026-02-10T09:58:23.349Z [openclaw] Non-fatal unhandled rejection (continuing): TypeError: fetch failed
Feb 10 04:58:23 ai-companion node[74897]: at node:internal/deps/undici/undici:14902:13
Feb 10 04:58:23 ai-companion node[74897]: at processTicksAndRejections (node:internal/process/task_queues:105:5)
Feb 10 04:58:23 ai-companion node[74897]: at runNextTicks (node:internal/process/task_queues:69:3)
Feb 10 04:58:23 ai-companion node[74897]: at processTimers (node:internal/timers:520:9)
Feb 10 04:58:23 ai-companion node[74897]: 2026-02-10T09:58:23.737Z [agent/embedded] workspace bootstrap file AGENTS.md is 7804 chars (limit 500); truncating in injected context (sessionKey=agent:main:main)
Feb 10 04:58:23 ai-companion node[74897]: 2026-02-10T09:58:23.741Z [agent/embedded] workspace bootstrap file SOUL.md is 1664 chars (limit 500); truncating in injected context (sessionKey=agent:main:main)
Feb 10 04:58:23 ai-companion node[74897]: 2026-02-10T09:58:23.744Z [agent/embedded] workspace bootstrap file TOOLS.md is 850 chars (limit 500); truncating in injected context (sessionKey=agent:main:main)
Feb 10 04:58:23 ai-companion node[74897]: 2026-02-10T09:58:23.748Z [agent/embedded] workspace bootstrap file IDENTITY.md is 633 chars (limit 500); truncating in injected context (sessionKey=agent:main:main)
Feb 10 04:58:23 ai-companion node[74897]: 2026-02-10T09:58:23.751Z [agent/embedded] workspace bootstrap file BOOTSTRAP.md is 1449 chars (limit 500); truncating in injected context (sessionKey=agent:main:main)
PING api.telegram.org (149.154.166.110) 56(84) bytes of data.
64 bytes from 149.154.166.110: icmp_seq=1 ttl=45 time=105 ms
64 bytes from 149.154.166.110: icmp_seq=2 ttl=45 time=105 ms
64 bytes from 149.154.166.110: icmp_seq=3 ttl=45 time=105 ms
--- api.telegram.org ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 105.251/105.279/105.295/0.019 ms
Itâs fixable â youâre very close now.
Youâve proven two key things:
- Telegram can send (your
openclaw message send âŚarrived) - Ollama /v1 is fast now (2.2s / 1.6s)
So the remaining blocker is that the Gateway is still intermittently hitting:
TypeError: fetch failed
Thatâs almost always Nodeâs fetch() failing due to network flakiness (often IPv6 selection, or WiâFi drops). Letâs harden it.
1) Force IPv4-first for the Gatewayâs Node process (most reliable)
Even with gai.conf + autoSelectFamily, this eliminates a ton of âfetch failedâ on broken IPv6 hosts.
Good â IPv4 connectivity to Telegram is solid right now.
So the next step is to stop Node from ever picking the broken IPv6 path and to reduce unnecessary Telegram calls.
Do these two changes
1) Force IPv4-first for the gateway process (most important)
systemctl --user edit openclaw-gateway.service
Add:
[Service]
Environment="NODE_OPTIONS=--dns-result-order=ipv4first"
systemctl --user edit openclaw-gateway.service
Add:
[Service]
Environment="NODE_OPTIONS=--dns-result-order=ipv4first"
Then:
systemctl --user daemon-reload
systemctl --user restart openclaw-gateway.service
Then:
systemctl --user daemon-reload
systemctl --user restart openclaw-gateway.service
2) Disable typing indicators (optional but helps stability)
openclaw config set agents.defaults.typingMode "never"
systemctl --user restart openclaw-gateway.service
Then run one deterministic test
From the server (this bypasses any Telegram inbound weirdness and just checks âcan OpenClaw deliver a reply to Telegramâ):
this is already in there [Service]
Environment="NODE_OPTIONS=--dns-result-order=ipv4first"
2) Disable typing indicators (optional, but reduces Telegram API calls)
This avoids the repeated sendChatAction calls (which are often the first thing to fail on flaky networks):
openclaw config set agents.defaults.typingMode "never"
systemctl --user restart openclaw-gateway.service
3) Do a deterministic end-to-end test (no guessing)
Run an agent turn and deliver it to Telegram from the server:
openclaw agent --agent main --session-id tg-test --message "Reply with exactly: pong" --deliver --reply-channel telegram --reply-to <YOUR_TG_NUMERIC_ID>
- If this delivers
pongâ the core âagent â telegram replyâ path is good. - If it fails, the CLI will usually print a concrete error.
openclaw agent --agent main --session-id tg-test --message "Reply with exactly: pong" --deliver --reply-channel telegram --reply-to <YOUR_TG_NUMERIC_ID>
If you get pong in Telegram from that command, youâre basically fixed. Then normal âhiâ messages should also work much more reliably.
If it still fails, paste:
journalctl --user -u openclaw-gateway.service --since "2 minutes ago" --no-pager
and weâll see exactly what fetch failed is trying to reach.
4) If youâre on WiâFi: check for drops
Your earlier logs had a lot of wpa_supplicant complaints. If possible, try Ethernet (even temporarily). Network drops will absolutely manifest as fetch failed.
If you want, paste:
systemctl --user show openclaw-gateway.service -p Environment
(so we can confirm NODE_OPTIONS=... is actually applied)
And tell me whether step #3 delivered pong.
step 3 delivered ping
Good â that means the âprefer IPv4â fix is already applied.
So now we need to do the one deterministic test that tells us whether the agent â telegram reply pipeline works end-to-end.
1) Disable typing indicators (reduces Telegram API calls)
Even if sending works, typing can spam sendChatAction and trigger errors on flaky links:
openclaw config set agents.defaults.typingMode "never"
systemctl --user restart openclaw-gateway.service
2) Run a deterministic âdeliver pong to Telegramâ test (from the server)
Use your numeric Telegram user id:
openclaw agent --agent main --session-id tg-test --message "Reply with exactly: pong" --deliver --reply-channel telegram --reply-to <YOUR_TG_NUMERIC_ID>
Tell me: did you receive pong?
3) If you did NOT receive it: paste the last 3 minutes of gateway logs
journalctl --user -u openclaw-gateway.service --since "3 minutes ago" --no-pager
That will show whether itâs:
- still
fetch failed - an embedded run timeout
- or a delivery routing error.
(Also: make sure youâre not using @mychatâthat was just an example from help output; use the numeric id.)
I recieved pong
Perfect. That means the whole pipeline works:
OpenClaw agent â Ollama â Telegram send is functional.
So whatâs left is just the ânormal DM chat message sometimes doesnât replyâ behavior, which is usually one of:
- a stuck/previous run holding the session
- you sending
/newand then another message too quickly (causing the âorphaned user messageâ drop) - occasional
fetch failedspikes (WiâFi) â mitigated by ipv4first + typingMode=never
What to do now (practical recipe)
1) In Telegram, reset cleanly and test normal chat
Send one message:
/new Hi
Donât send /new and then a second message immediately.
2) If it ever âhangs typingâ, use:
/stopto cancel the stuck run- then send your message again
3) Keep the stability settings you now have
NODE_OPTIONS=--dns-result-order=ipv4firstâchannels.telegram.network.autoSelectFamily=trueâ (fine to keep)agents.defaults.typingMode="never"â (recommended on flaky links)- Keep the Ollama explicit provider block (avoids discovery timeouts)
4) Kill the unrelated crash-looping system service (if you havenât)
This was polluting your logs:
sudo systemctl disable --now openclaw.service
If you want, paste the output of openclaw channels status --probe now â it should show Telegram as running/works.
And if this solved it, please mark the solution in Discord (rightâclick â Apps â â Mark Solution) so itâs indexed for the next person.
omg it speaks!
Hearty welcome back! đ > Hey, what are your goals for today? What tasks do you want to accomplish? > How can I help streamline our workflow together? [...truncated response due to context limit] ##
Great â that confirms youâre fully operational now: Gateway â Ollama â Telegram reply works.
What you should do going forward:
- For a clean start in Telegram, use one message:
/new Hi
(avoid sending /new and then immediately another message â thatâs what caused the âorphaned user messageâ drops earlier)
- If it ever gets stuck âtypingâ, send:
/stop
then try again.
- Keep these stability fixes:
NODE_OPTIONS=--dns-result-order=ipv4firstin the openclaw-gateway user service (prevents broken IPv6 issues)agents.defaults.typingMode="never"(reduces Telegram API calls / fewerfetch failedchances)- explicit
models.providers.ollamaconfig (avoids discovery timeouts)
- If you havenât yet, disable the unrelated crash-looping system service:
sudo systemctl disable --now openclaw.service
If this fixed it, please rightâclick the solution message â Apps â â Mark Solution so it gets indexed for others.
everything I copypasted like ip stuff isnt listed correct?
That message means the pipeline is working (youâre getting a real model reply), but the model is being way too verbose and youâre seeing it clipped/truncated in the chat UI.
Two practical tweaks:
1) Force shorter replies from Ollama (best fix)
Limit output tokens for your Ollama model:
openclaw config set 'agents.defaults.models["ollama/llama3.2:1b"].params.maxTokens' 128 --json
systemctl --user restart openclaw-gateway.service
(If youâre using llama3.2:3b instead, swap the model id in the brackets.)
Then in Telegram try:
Correct â not everything you copy/pasted will show up in openclaw config get âŚ, because we changed things in three different places:
A) OpenClaw config (~/.openclaw/openclaw.json)
These should be listed via openclaw config get âŚ:
openclaw config get channels.telegram.network.autoSelectFamily
openclaw config get agents.defaults.typingMode
openclaw config get channels.telegram.dmHistoryLimit
openclaw config get agents.defaults.bootstrapMaxChars
openclaw config get tools.byProvider.ollama.profile
openclaw config get models.providers.ollama.baseUrl
B) systemd service override (NOT in openclaw.json)
This is where the IPv4 preference lives:
/new Hi
2) Make Telegram split long replies into multiple messages (instead of one huge blob)
openclaw config set channels.telegram.textChunkLimit 3500 --json
openclaw config set channels.telegram.chunkMode "newline"
systemctl --user restart openclaw-gateway.service
Tip (avoids âorphaned user messageâ drops)
When you reset, do it in one message:
/new <your message>
Environment="NODE_OPTIONS=--dns-result-order=ipv4first"
To verify itâs applied:
systemctl --user show openclaw-gateway.service -p Environment
systemctl --user cat openclaw-gateway.service
C) OS-level networking (/etc/gai.conf) (NOT in openclaw.json)
This line:
precedence ::ffff:0:0/96 100
If you want, paste your current:
openclaw config get agents.defaults.model
(redact nothing needed there) and Iâll give you the exact maxTokens path for the model youâre actually running.
Also: if this is solved now, please rightâclick the solution message â Apps â â Mark Solution so it gets indexed for the next person.
Verify with:
grep -n "precedence ::ffff:0:0/96" /etc/gai.conf
So if you were expecting the âIP stuffâ to appear in OpenClawâs config, it wonât â itâs an OS resolver setting + a systemd env override.
If you paste the output of:
openclaw config get channels.telegram.network.autoSelectFamily
systemctl --user show openclaw-gateway.service -p Environment
(with tokens redacted if any), I can confirm everything is in the right place.
It's being helpful but when I type to reply its about a minute, should I keep it like that or ?
A ~1 minute reply time on a Raspberry Pi + Ollama is normal-ish, but you can tune it depending on what you want.
If youâre happy enough: keep it
If the bot is stable and you donât mind the latency, donât over-tune. Stability > speed.
If you want it faster, here are the highestâimpact knobs (in order)
1) Use the smaller/faster model
Youâre already on llama3.2:1b which is the right direction. If you switch to 3b, it will usually get slower.
Verify what youâre using:
openclaw config get agents.defaults.model.primary
2) Cap response length (big speed win)
Shorter outputs = much faster generation:
openclaw config set 'agents.defaults.models["ollama/llama3.2:1b"].params.maxTokens' 128 --json
systemctl --user restart openclaw-gateway.service
Try 64 if you want it snappier.
3) Keep Ollama warm (prevents âfirst request after idleâ being super slow)
Check if a model is loaded:
ollama ps
If you use systemd for Ollama, set keep-alive (example 30 minutes):
sudo systemctl edit ollama
Add:
[Service]
Environment="OLLAMA_KEEP_ALIVE=30m"
Then:
sudo systemctl daemon-reload
sudo systemctl restart ollama
4) Keep prompt small (you already did most of this)
tools.byProvider.ollama.profile = minimalbootstrapMaxCharslowdmHistoryLimit = 0
My recommendation
Set maxTokens to 128 (or 64) and keep keep-alive at 30m. That usually takes â~1 minuteâ down to something more like â10â30sâ on modest hardware.
If you tell me your exact hardware (Pi model + RAM), I can give a realistic expectation for best-case latency.
command to restart openclaw? I made changes to its personality
If youâre running it via the systemd user service (most likely), restart like this:
systemctl --user restart openclaw-gateway.service
If you changed a workspace/personality file (like SOUL.md, IDENTITY.md, USER.md, etc.), the gateway often hot-reloads, but a restart is fine.
Useful checks:
systemctl --user status openclaw-gateway.service --no-pager -n 20
openclaw status
If youâre using a different profile/service name, run: