#OpenClaw isnt talking through Telegram. This is the initial setup

1 messages ¡ Page 1 of 1 (latest)

brisk willowBOT
#

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

wet beaconBOT
#

A few common “Telegram is set up but nothing replies” causes in OpenClaw are:

  1. the Gateway isn’t the process you think it is (wrong user/profile/config path, or service not actually running)
  2. Telegram is running, but DMs are blocked by pairing/allowlist policy
  3. Telegram can’t reach api.telegram.org (DNS/IPv6/egress), so it never sends/receives
  4. 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?

jaunty cobalt
#

And my personal info wont be seen correct

wet beaconBOT
# jaunty cobalt 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 --follow can 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.

jaunty cobalt
#

🦞 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:

  1. openclaw start
  2. Or: openclaw gateway start
  3. Check: ss -ltn | grep 18789 or netstat -ltn | grep 18789
  4. Logs: openclaw logs --tail or journalctl -u openclaw-gateway (if systemd)

Docs: https://docs.openclaw.ai/troubleshooting

wet beaconBOT
# jaunty cobalt 🦞 OpenClaw 2026.2.6-3 (85ed6c7) Version: 2026.2.6-3 OS: ...

That output explains it: your Gateway is not running, so Telegram can’t possibly work yet.

  • Gateway: ... unreachable (ECONNREFUSED)
  • Gateway service: systemd installed ¡ enabled ¡ stopped
  • Channels: (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.).

jaunty cobalt
#

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

wet beaconBOT
# jaunty cobalt File logs: /tmp/openclaw/openclaw-2026-02-09.log Command: /usr/bin/node /home/ja...

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)

  1. Stop the restart loop so logs are readable:
systemctl --user stop openclaw-gateway.service
systemctl --user reset-failed openclaw-gateway.service
  1. Paste the last ~200 lines of the service journal:
journalctl --user -u openclaw-gateway.service -n 200 --no-pager
  1. 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
  • Port already in use: EADDRINUSE
    • check: ss -ltnp | grep 18789
  • 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.

jaunty cobalt
#

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-

wet beaconBOT
# jaunty cobalt ▀▀▀▀▀▀▀▀\n 🦞 OPENCLAW 🦞 \n ","_meta":{"run...

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.mode is missing/not local, 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.).

jaunty cobalt
#

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.

wet beaconBOT
# jaunty cobalt pass --allow-unconfigured. Feb 09 18:58:32 ai-companion systemd[17652]: openclaw...

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.

jaunty cobalt
#

I havent ran this yet openclaw pairing list telegram
openclaw pairing approve telegram <CODE> but its says gateway is reachable

wet beaconBOT
# jaunty cobalt I havent ran this yet openclaw pairing list telegram openclaw pairing approve t...

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.botToken not 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.

jaunty cobalt
#

nothing is pending, going to step 3)

wet beaconBOT
# jaunty cobalt nothing is pending, going to step 3)

If openclaw pairing list telegram shows nothing pending, it usually means one of these is true:

  1. your Telegram DM never reached the Gateway (Telegram channel not running, wrong token, webhook misconfigured, network/DNS issue), or
  2. 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: true
  • botToken present (or tokenFile / env)
  • dmPolicy value (pairing vs allowlist vs open vs disabled)
  • if dmPolicy: "allowlist" → your allowFrom must 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.

jaunty cobalt
#

step A telegram isnt listed

wet beaconBOT
# jaunty cobalt 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: botToken or tokenFile (or you’re using TELEGRAM_BOT_TOKEN env)

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.

elder shell
#

discord fail to use "/restart" comands
return message "⚠️ /restart is disabled. Set commands.restart=true to enable."

jaunty cobalt
#

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

wet beaconBOT
#

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

  1. DM your bot in Telegram (“hi”)
  2. 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.

jaunty cobalt
#

what is this nano ~/.openclaw/.env supposed to look like mine is blank

wet beaconBOT
# jaunty cobalt 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 export needed.
#
  • Quotes are optional; usually just KEY=value is 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):

  1. Put the token in ~/.openclaw/.env as above
  2. 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
jaunty cobalt
#

so copy paste option a into nano?

wet beaconBOT
# jaunty cobalt 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.

jaunty cobalt
#
  • Telegram default: enabled, not configured, stopped, mode:polling, token:none, error:not configured
wet beaconBOT
# jaunty cobalt - Telegram default: enabled, not configured, stopped, mode:polling, token:none, ...

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), or
  • channels.telegram.tokenFile, or
  • TELEGRAM_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.

jaunty cobalt
#

openclaw config set channels.telegram.botToken REDACTED
error: missing required argument 'value'

wet beaconBOT
# jaunty cobalt openclaw config set channels.telegram.botToken REDACTED error: missing required ...

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 botToken and the value.
  • Use normal quotes " (sometimes copy/paste turns them into weird unicode quotes).
  • Don’t include the word REDACTED in 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.

jaunty cobalt
#

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
wet beaconBOT
# jaunty cobalt Gateway not reachable: Error: gateway closed (1006 abnormal closure (no close fr...

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 --probe is 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).

jaunty cobalt
#

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)

wet beaconBOT
# jaunty cobalt Feb 09 19:51:59 ai-companion node[52421]: 2026-02-10T00:51:59.883Z [gateway] lis...

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:18789 and ws://[::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)

  1. On the server:
openclaw logs --follow
  1. On your phone, DM the bot “hi” (not in a group).

  2. 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.

jaunty cobalt
#
  • Telegram default: enabled, configured, running, mode:polling, bot:@Tr1nbot, token:config, works
wet beaconBOT
# jaunty cobalt - Telegram default: enabled, configured, running, mode:polling, bot:@Tr1nbot, to...

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

  1. On your phone, DM @Tr1nbot (send hi).

  2. On the server, run:

openclaw pairing list telegram
  • If it shows a pending entry with a code, approve it:
#
openclaw pairing approve telegram <CODE>
  1. 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 dmPolicy is allowlist, you must add your Telegram user id to allowFrom.
  • If dmPolicy is open, then allowFrom must 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.

jaunty cobalt
#

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

#

?

wet beaconBOT
jaunty cobalt
#

I got approved telegram sender

wet beaconBOT
# jaunty cobalt ?

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. hi or /status) and it should reply.

If you’re not sure what the pending code is, you can list it:

openclaw pairing list telegram
jaunty cobalt
#

⚠️ 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

wet beaconBOT
# jaunty cobalt ⚠️ Agent failed before reply: No API key found for provider "anthropic". Auth st...

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)

  1. Make sure Ollama is reachable on the server:
curl http://127.0.0.1:11434/api/tags
  1. 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)

  1. Pick an installed Ollama model name:
ollama list
  1. Set your default model to Ollama (replace <model> with something from ollama list):
#
openclaw config set agents.defaults.model.primary "ollama/<model>"
systemctl --user restart openclaw-gateway.service
  1. 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.

jaunty cobalt
#

how do I type out option A in nano?

wet beaconBOT
# jaunty cobalt 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.

jaunty cobalt
#

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.

wet beaconBOT
# jaunty cobalt jason@ai-companion:~$ openclaw config set agents.defaults.model.primary "ollama/...

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).

jaunty cobalt
#

$ 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:*

wet beaconBOT
# jaunty cobalt $ curl -m 3 http://127.0.0.1:11434/api/tags {"models":[{"name":"llama3.2:3b","mo...

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:

  1. You don’t have llama3.3 installed. You have: llama3.2:3b
  2. 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).

jaunty cobalt
#

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

wet beaconBOT
# jaunty cobalt openclaw config set agents.defaults.model.primary "ollama/llama3.2:3b" 🦞 OpenC...

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.

jaunty cobalt
#

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

wet beaconBOT
# jaunty cobalt journalctl --user -u openclaw-gateway.service -n 80 --no-pager | grep "agent mod...

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)

  1. On the server, run:
openclaw logs --follow
  1. 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.

jaunty cobalt
#

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
wet beaconBOT
# jaunty cobalt bot in telegram is typing but no posted response

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
jaunty cobalt
#

when I typed ping it never responded

wet beaconBOT
# jaunty cobalt 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 sendMessage failure
  • 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.

jaunty cobalt
#

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

wet beaconBOT
# jaunty cobalt I asked say hello in one sentence in the command line its takeing for ever and n...

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.

jaunty cobalt
#

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.

wet beaconBOT
# jaunty cobalt I did option 2) but got openclaw config set agents.defaults.model.primary "ollam...

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 ... pong test took (roughly).
jaunty cobalt
#

Failed to discover Ollama models: TimeoutError: The operation was aborted due to timeout
Config path not found: agents.defaults.models["ollama/llama3.2:3b"]

wet beaconBOT
# jaunty cobalt Failed to discover Ollama models: TimeoutError: The operation was aborted due to...

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.

jaunty cobalt
#

$ 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.

wet beaconBOT
# jaunty cobalt $ openclaw config set 'agents.defaults.models["ollama/llama3.2:3b"].params.maxTo...

That’s fine — it did write the setting:

Updated agents.defaults.models["ollama/llama3.2:3b"].params.maxTokens

Two important notes:

  1. That Ollama “discover timeout” warning is noisy but not the real failure here.
  2. 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.

jaunty cobalt
#

~$ time ollama run llama3.2:3b "Reply with exactly: pong"
pong

real 0m11.885s
user 0m0.045s
sys 0m0.051s

wet beaconBOT
# jaunty cobalt ~$ time ollama run llama3.2:3b "Reply with exactly: pong" pong real 0m11.88...

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 run test).
  • 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.

jaunty cobalt
#

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

wet beaconBOT
# jaunty cobalt I recieved the message in test one, heres the information of test 2 $ time openc...

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 /status works but normal messages don’t → it’s the Ollama run taking too long with OpenClaw’s full prompt/context.
  • If /status also 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.

jaunty cobalt
#

a) is still going ast 5 minutes b) /status was immediate and return with status information

#

ping gave no responce

wet beaconBOT
# jaunty cobalt a) is still going ast 5 minutes b) /status was immediate and return with status ...

That makes sense:

  • /status is 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 simple ollama run test (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

  1. Restrict tools for Ollama to “minimal” (this removes the huge tool JSON schemas from the prompt):
openclaw config set tools.byProvider.ollama.profile "minimal"
  1. Reduce injected bootstrap file size (also shrinks the prompt a lot):
openclaw config set agents.defaults.bootstrapMaxChars 2000 --json
#
  1. 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.

jaunty cobalt
#

its been several minutes should I stop it and look at the logs?

wet beaconBOT
# jaunty cobalt 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.

jaunty cobalt
#

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?

wet beaconBOT
# jaunty cobalt 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

  1. Open a terminal on the server and run:
openclaw logs --follow
  1. Now send ping in the Telegram DM.
#
  1. 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.

jaunty cobalt
#

openclaw logs --follow gives me that openclaw doctor stuff

wet beaconBOT
# jaunty cobalt 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.

jaunty cobalt
#

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

wet beaconBOT
# jaunty cobalt Feb 09 22:17:09 ai-companion node[57505]: 2026-02-10T03:17:09.369Z [telegram] [d...

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

  1. Stop the stuck run
    In Telegram DM send:
/stop
  1. Start a fresh session (clears accumulated context)
    In Telegram DM send:
#
/new
  1. 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 minimal removes the huge tool-schema blob from what gets sent to Ollama.
  • dmHistoryLimit 0 stops stuffing prior DM history into the prompt.
#
  1. 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.

jaunty cobalt
#

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

wet beaconBOT
# jaunty cobalt Feb 09 22:52:44 ai-companion node[57505]: 2026-02-10T03:52:44.309Z [gateway] log...

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)

  1. In Telegram DM:
  • send: /new
  • then send: ping
  1. 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 sendMessage errors), or
#
  • queue/session weirdness.

(And don’t worry about the AGENTS.md … truncating line—that’s fine and expected.)

jaunty cobalt
#

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)

wet beaconBOT
# jaunty cobalt Feb 09 22:54:05 ai-companion node[58971]: 2026-02-10T03:54:05.388Z [gateway] lis...

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.

jaunty cobalt
#

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)

wet beaconBOT
#

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 list output, 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.

jaunty cobalt
#

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"}

wet beaconBOT
# jaunty cobalt tail -n 400 /tmp/openclaw/openclaw-2026-02-09.log | grep -Ei 'telegram|ollama|op...

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
  • /new
  • ping

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.

jaunty cobalt
#

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

wet beaconBOT
# jaunty cobalt Feb 09 23:34:21 ai-companion node[60115]: 2026-02-10T04:34:21.827Z [diagnostic] ...

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:

  1. OpenClaw is starting an Ollama run (good).
  2. messageChannel=unknown strongly 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 list output, 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.

jaunty cobalt
#

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

wet beaconBOT
# jaunty cobalt Feb 09 23:34:21 ai-companion node[60115]: 2026-02-10T04:34:21.827Z [diagnostic] ...

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:

  1. Start following logs:
journalctl --user -u openclaw-gateway.service -f --no-pager
  1. In Telegram DM send:
  • /new
  • then ping
  1. 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=unknown issue).
jaunty cobalt
#

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"}}

wet beaconBOT
# jaunty cobalt Failed to discover Ollama models: TimeoutError: The operation was aborted due to...

“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).

jaunty cobalt
#

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

wet beaconBOT
# jaunty cobalt Feb 09 23:51:16 ai-companion node[61135]: 2026-02-10T04:51:16.063Z [gateway] rec...

This log is the smoking gun:

  • embedded run start … messageChannel=telegram
  • then embedded run timeout after ~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.

jaunty cobalt
#

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?

wet beaconBOT
# jaunty cobalt Failed to discover Ollama models: TimeoutError: The operation was aborted due to...

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.

jaunty cobalt
#

whats next?

wet beaconBOT
# jaunty cobalt 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.

jaunty cobalt
#

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).

wet beaconBOT
#

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:

wet beaconBOT
# jaunty cobalt Failed to read config at /home/jason/.openclaw/openclaw.json SyntaxError: JSON5:...

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.

wet beaconBOT
# jaunty cobalt Feb 10 00:18:45 ai-companion node[62779]: │ Feb 10 00:18:45 ai-companion node[62...

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.

jaunty cobalt
#

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 },

wet beaconBOT
# jaunty cobalt 65 "mode": "local", 66 "auth": { 67 "mode": "token", ...

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)

  1. Stop the crash loop while editing:
systemctl --user stop openclaw-gateway.service
systemctl --user reset-failed openclaw-gateway.service
  1. Edit the config:
#
nano ~/.openclaw/openclaw.json
  1. Go to the bad spot:
  • press Ctrl+_
  • type 78 and Enter
  1. 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.

  1. 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.

jaunty cobalt
#

like this? "plugins" : { ... },
models: { providers: { ... } }

wet beaconBOT
#

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.

jaunty cobalt
#

this is all Im supposed to mess with right? "plugins" : { ... },
models: { providers: { ... } }

wet beaconBOT
# jaunty cobalt this is all Im supposed to mess with right? "plugins" : { ... }, models: { p...

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)

jaunty cobalt
#

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

wet beaconBOT
# jaunty cobalt Failed to read config at /home/jason/.openclaw/openclaw.json SyntaxError: JSON5:...

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 plugins ends 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.

jaunty cobalt
#

its in openclaw doctor do I need to generate and configure a gateway token?

wet beaconBOT
# jaunty cobalt 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.

jaunty cobalt
#

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

wet beaconBOT
# jaunty cobalt } { "plugins" : { }, models: { providers: { } } } ollama: { ...

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

  1. Stop the gateway (so it stops crash-looping while you edit):
systemctl --user stop openclaw-gateway.service
systemctl --user reset-failed openclaw-gateway.service
  1. 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 of models.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

  1. Stop the gateway while editing:
systemctl --user stop openclaw-gateway.service
systemctl --user reset-failed openclaw-gateway.service
  1. Backup the broken file:
#
mv ~/.openclaw/openclaw.json ~/.openclaw/openclaw.json.bad
  1. 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" },
        ],
      },
    },
  },
}
  1. 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
  1. 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" },
        ],
      },
    },
  },
}
  1. 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.

jaunty cobalt
#

Help where do I find my gateway token?

wet beaconBOT
#

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:

  1. Stop gateway:
systemctl --user stop openclaw-gateway.service
systemctl --user reset-failed openclaw-gateway.service
  1. Move broken config out of the way:
mv ~/.openclaw/openclaw.json ~/.openclaw/openclaw.json.bad
  1. Create a new one:
#
nano ~/.openclaw/openclaw.json

Paste the clean config, fill in your gateway token + telegram bot token.

  1. 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.

jaunty cobalt
#

where do I find the gateway token?

#

I didnt right it down

wet beaconBOT
# jaunty cobalt where do I find the gateway token?

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.token inside ~/.openclaw/openclaw.json
  • Or env var: OPENCLAW_GATEWAY_TOKEN (often via ~/.openclaw/.env or 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.

jaunty cobalt
#

I ran this openclaw doctor --generate-gateway-token start gateway service now in wizard?

wet beaconBOT
# jaunty cobalt I ran this openclaw doctor --generate-gateway-token start gateway service now in...

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.

jaunty cobalt
#

open claw doctor created a token and is asking me to start the gate way service

wet beaconBOT
#
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
jaunty cobalt
#

● 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.

wet beaconBOT
# jaunty cobalt ● openclaw-gateway.service - OpenClaw Gateway (v2026.2.6-3) Loaded: loaded ...

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.

jaunty cobalt
#

step 2 result real 3m58.721s
user 0m0.008s
sys 0m0.015s

wet beaconBOT
# jaunty cobalt 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.

jaunty cobalt
#

the big time curl took seconds and the telegram response 40 seconds

wet beaconBOT
# jaunty cobalt 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.

jaunty cobalt
#

whats next? do I try to send my first message?

#

I sent Hi to the bot it typed and didnt respond

wet beaconBOT
# jaunty cobalt 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:

  1. the run is still working (often because Ollama had to cold-load the model again), or
  2. the run is timing out (you’ll see embedded run timeout in 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.

jaunty cobalt
#

(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!

wet beaconBOT
# jaunty cobalt (start|timeout)|typing TTL|sendMessage|error|ollama' Feb 10 01:51:18 ai-companio...

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 -4 works but curl -6 fails/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).

jaunty cobalt
#

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

wet beaconBOT
# jaunty cobalt 149.154.166.110 STREAM api.telegram.org 149.154.166.110 DGRAM 149.154.166.110 RA...

That’s the diagnosis: IPv4 works, IPv6 is broken on that box.

  • curl -4 … https://api.telegram.org ✅ works
  • curl -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.

jaunty cobalt
#

where do I put this in gai.conf? precedence ::ffff:0:0/96 100

wet beaconBOT
#
precedence ::ffff:0:0/96  100
  1. If you don’t find that line, add it near the top of the file (after the header comments is perfect).

  2. Save/exit nano:

  • Ctrl+O, Enter
  • Ctrl+X
  1. Restart the gateway:
systemctl --user restart openclaw-gateway.service
  1. 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.

jaunty cobalt
#

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

wet beaconBOT
# jaunty cobalt curl -4 -m 5 -I https://api.telegram.org # should work curl: (7) Failed to con...

That output looks like you accidentally pasted both results mixed together:

  • The HTTP/2 302 ... location: https://core.telegram.org/bots part 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.

wet beaconBOT
# jaunty cobalt bot still typing

“Bot still typing” can be either:

  1. it’s still waiting on Ollama (slow run), or
  2. 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.

jaunty cobalt
#

when I said Hi bot replied with: {"name": "openclaw", "parameters": {"model": "default", "sessionKey": "[123]"}}

wet beaconBOT
# jaunty cobalt when I said Hi bot replied with: {"name": "openclaw", "parameters": {"model": "d...

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 /)?

jaunty cobalt
#

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

wet beaconBOT
# jaunty cobalt dChatAction failed|fetch failed|typing TTL|embedded run timeout|embedded run sta...

Those log lines are two different failure modes mixed together:

  1. Telegram network failures (this is why you get “typing…” but no reply):
  • TypeError: fetch failed
  • sendChatAction failed
  • sendMessage failed
  1. 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.

jaunty cobalt
#

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?

wet beaconBOT
# jaunty cobalt 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.

jaunty cobalt
#

I got model started under telegram but no pong

wet beaconBOT
# jaunty cobalt 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:

  1. /stop
  2. /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 on channels.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/completions timing 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.

jaunty cobalt
#

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

jaunty cobalt
#

krill?

wet beaconBOT
# jaunty cobalt 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.

jaunty cobalt
#

journalctl doesnt print out anything

wet beaconBOT
# jaunty cobalt 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).

jaunty cobalt
#

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)

wet beaconBOT
# jaunty cobalt Feb 10 02:44:56 ai-companion node[69623]: 2026-02-10T07:44:56.986Z [canvas] host...

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 your agents.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.

jaunty cobalt
#

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

wet beaconBOT
# jaunty cobalt Feb 10 02:46:24 ai-companion node[69697]: 2026-02-10T07:46:24.906Z [telegram] [d...

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 this fetch failed might be Ollama’s /v1/chat/completions fetch (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:

  1. whether openclaw message send … succeeds, and
  2. the timing of the first vs second Ollama /v1/chat/completions call,

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).

jaunty cobalt
#

1st test: real 0m2.219s
user 0m0.002s
sys 0m0.010s 2nd test: real 0m1.569s
user 0m0.005s
sys 0m0.006s

wet beaconBOT
# jaunty cobalt 1st test: real 0m2.219s user 0m0.002s sys 0m0.010s ...

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.

jaunty cobalt
#

no messages

wet beaconBOT
# jaunty cobalt 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 /status does reply, Telegram send is working and we’re narrowing to the LLM-run path.
  • If /status doesn’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 /status replied
  • the journalctl --since "2 minutes ago" output after you send /new … pong
jaunty cobalt
#

): 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)

wet beaconBOT
# jaunty cobalt ): TypeError: fetch failed Feb 10 04:06:39 ai-companion node[71547]: at node...

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 fetch is 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:

  1. the output of openclaw message send … (success/failure text), and
  2. the journalctl --since "3 minutes ago" chunk,

and I’ll tell you exactly which side (Telegram vs Ollama) that fetch failed is coming from.

jaunty cobalt
#

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)

wet beaconBOT
#

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.

wet beaconBOT
# jaunty cobalt Feb 10 04:10:26 ai-companion node[71547]: 2026-02-10T09:10:26.799Z [agent/embedd...

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:

  1. whether the openclaw message send … arrived, and
  2. the journalctl -f lines after you send /new Reply with exactly: pong.
jaunty cobalt
#

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?

wet beaconBOT
# jaunty cobalt 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?).

jaunty cobalt
#

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

wet beaconBOT
# jaunty cobalt Feb 10 04:27:39 ai-companion openclaw[74050]: openclaw message send --channel ...

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 + Telegram
  • openclaw.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
jaunty cobalt
#

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

wet beaconBOT
# jaunty cobalt the telegram message arrived

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:

  1. /stop
  2. /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
wet beaconBOT
# jaunty cobalt starting to wonder if its fixable

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/completions is 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)

  1. On the server, start live logs:
journalctl --user -u openclaw-gateway.service -f --no-pager
  1. 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
  1. 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 prompt
  • sendMessage 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.

jaunty cobalt
#

× 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.

wet beaconBOT
# jaunty cobalt Feb 10 04:33:36 ai-companion openclaw[74249]: Gateway control via WebSocket....

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.

jaunty cobalt
#

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)

wet beaconBOT
# jaunty cobalt Feb 10 04:42:27 ai-companion node[74004]: 2026-02-10T09:42:27.644Z [agent/embedd...

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, or
  • embedded 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.

jaunty cobalt
#

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)

wet beaconBOT
# jaunty cobalt Feb 10 04:51:31 ai-companion systemd[17652]: Stopping openclaw-gateway.service -...

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)

  1. Send a test message from the server:
openclaw message send --channel telegram --target <YOUR_TG_NUMERIC_ID> --message "send test after ipv4first"
#
  1. 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
jaunty cobalt
#

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

wet beaconBOT
# jaunty cobalt Feb 10 04:58:23 ai-companion node[74897]: 2026-02-10T09:58:23.349Z [openclaw] No...

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.

wet beaconBOT
#
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”):

jaunty cobalt
#

this is already in there [Service]
Environment="NODE_OPTIONS=--dns-result-order=ipv4first"

wet beaconBOT
#

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.

jaunty cobalt
#

step 3 delivered ping

wet beaconBOT
# jaunty cobalt this is already in there [Service] Environment="NODE_OPTIONS=--dns-result-order=...

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.)

jaunty cobalt
#

I recieved pong

wet beaconBOT
# jaunty cobalt step 3 delivered ping

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 /new and then another message too quickly (causing the “orphaned user message” drop)
  • occasional fetch failed spikes (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:

  • /stop to 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.

jaunty cobalt
#

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] ##

wet beaconBOT
# jaunty cobalt I recieved pong

Great — that confirms you’re fully operational now: Gateway → Ollama → Telegram reply works.

What you should do going forward:

  1. 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)

  1. If it ever gets stuck “typing”, send:
/stop

then try again.

  1. Keep these stability fixes:
#
  • NODE_OPTIONS=--dns-result-order=ipv4first in the openclaw-gateway user service (prevents broken IPv6 issues)
  • agents.defaults.typingMode="never" (reduces Telegram API calls / fewer fetch failed chances)
  • explicit models.providers.ollama config (avoids discovery timeouts)
  1. 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.

jaunty cobalt
#

everything I copypasted like ip stuff isnt listed correct?

wet beaconBOT
# jaunty cobalt Hearty welcome back! 🎉 > Hey, what are your goals for today? What tasks do you ...

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:

wet beaconBOT
# jaunty cobalt everything I copypasted like ip stuff isnt listed correct?

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.

jaunty cobalt
#

It's being helpful but when I type to reply its about a minute, should I keep it like that or ?

wet beaconBOT
# jaunty cobalt It's being helpful but when I type to reply its about a minute, should I keep it...

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 = minimal
  • bootstrapMaxChars low
  • dmHistoryLimit = 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.

jaunty cobalt
#

command to restart openclaw? I made changes to its personality

wet beaconBOT
# jaunty cobalt 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: