openclaw - 💡(How to fix) Fix [Bug]: Telegram Connection Bot [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#78571Fetched 2026-05-07 03:35:13
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
2
Timeline (top)
labeled ×2commented ×1mentioned ×1

First time configuration. I set the bot in telegram. When i sent a text it couldnt reply

Error Message

process/supervisor spawn failed: ... reason=Error: spawn claude ENOENT process/supervisor spawn failed: ... reason=Error: spawn EINVAL

Root Cause

First time configuration. I set the bot in telegram. When i sent a text it couldnt reply

Fix Action

Fix / Workaround

process/supervisor spawn failed: ... reason=Error: spawn EINVAL Node 18.20+/20.12+/22 refuses to spawn() .cmd/.bat files without shell: true per CVE-2024-27980 mitigation.

agent/cli-backend cli exec: provider=claude-cli model=opus agent/cli-backend claude live session start: provider=claude-cli model=claude-opus-4-7 activeSessions=1 agent/cli-backend claude live session turn: provider=claude-cli model=claude-opus-4-7 durationMs=4128 rawLines=12 diagnostic message processed: ... outcome=completed duration=25466ms telegram/silent-reply-dispatch {"queuedFinal":false,"sentFallback":false} telegram turn ended without visible final response Spawn succeeds, claude.exe runs and emits output (12 raw lines in ~4s), but OpenClaw's reply dispatcher can't extract a final assistant message from the output. Adding the documented defaults to the override doesn't help:

{ "command": "C:\Users\<user>\AppData\Roaming\npm\node_modules\@anthropic-ai\claude-code\bin\claude.exe", "args": ["--input-format=stream-json", "--output-format=stream-json", "--verbose"], "input": "stdin", "output": "jsonl", "liveSession": "claude-stdio" } Adding/removing --print tested; same outcome. Result: rawLines=12 but silent-reply-dispatch reports no visible final response.

RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

First time configuration. I set the bot in telegram. When i sent a text it couldnt reply

Steps to reproduce

Environment OS: Windows 11 Pro 10.0.26200 (x64) Node: 24.15.0 (installed via winget by OpenClaw installer) OpenClaw: 2026.5.5 (b1abf9d), installed via npm i -g openclaw Claude Code: @anthropic-ai/claude-code 2.1.131, installed via npm i -g @anthropic-ai/claude-code Binary location: %APPDATA%\npm\node_modules@anthropic-ai\claude-code\bin\claude.exe Shim location: %APPDATA%\npm\claude.cmd (and claude.ps1, bare claude) Auth: Claude Max subscription, logged in via claude login (OAuth). Claude project dir confirmed present. Channel: Telegram (first-class plugin, not WhatsApp/wacli) Gateway: runs as Windows Scheduled Task, launched via Startup-folder login item that calls C:\Users<user>.openclaw\gateway.cmd PATH: persistent user PATH includes %APPDATA%\npm. Confirmed:

[Environment]::GetEnvironmentVariable("Path", "User") -split ';' | Where-Object { $_ -match 'npm' }

→ C:\Users<user>\AppData\Roaming\npm

Pre-conditions (all green) openclaw status shows: Gateway: running, Telegram: ON OK, Agents: 1, Auth profile: anthropic:claude-cli (claude-cli/oauth) claude.exe -p "say hi" works standalone, returns plain-text response within ~5 seconds Telegram bot pairing approved, commands.ownerAllowFrom set to the operator's telegram:<id> coding-agent skill enabled (skills.entries.coding-agent.enabled: true) agents.defaults.agentRuntime.id: "claude-cli" agents.defaults.model.primary: "anthropic/claude-opus-4-7" Reproduction Complete fresh install via iwr -useb https://openclaw.ai/install.ps1 | iex (PowerShell, non-admin) Run openclaw onboard and pick Claude CLI auth route Configure Telegram bot per docs (channels.telegram.{enabled,botToken,dmPolicy}) openclaw doctor until all warnings are addressed (gateway service installed, command owner set, auth profile present) openclaw gateway start, confirm running in openclaw status From Telegram, send any text message to the bot (e.g. hi) Expected: Bot replies via Claude using the Max subscription.

Actual: Bot answers with something went wrong (or stays silent). Logs reveal one of three failure modes depending on agents.defaults.cliBackends.claude-cli.command:

Failure mode 1 — no cliBackends.claude-cli override (default behavior)

agent/cli-backend cli exec: provider=claude-cli model=opus promptChars=353 ... process/supervisor spawn failed: ... reason=Error: spawn claude ENOENT Node's child_process.spawn('claude', ...) cannot resolve claude on Windows. Bare claude (no extension) shim is a Bash text file, claude.cmd is a Windows shim, claude.ps1 is the PS shim. Node spawn doesn't honor PATHEXT without shell: true, so none of those resolve.

Failure mode 2 — command: "...\npm\claude.cmd"

process/supervisor spawn failed: ... reason=Error: spawn EINVAL Node 18.20+/20.12+/22 refuses to spawn() .cmd/.bat files without shell: true per CVE-2024-27980 mitigation.

Failure mode 3 — command: "...\node_modules\@anthropic-ai\claude-code\bin\claude.exe"

agent/cli-backend cli exec: provider=claude-cli model=opus agent/cli-backend claude live session start: provider=claude-cli model=claude-opus-4-7 activeSessions=1 agent/cli-backend claude live session turn: provider=claude-cli model=claude-opus-4-7 durationMs=4128 rawLines=12 diagnostic message processed: ... outcome=completed duration=25466ms telegram/silent-reply-dispatch {"queuedFinal":false,"sentFallback":false} telegram turn ended without visible final response Spawn succeeds, claude.exe runs and emits output (12 raw lines in ~4s), but OpenClaw's reply dispatcher can't extract a final assistant message from the output. Adding the documented defaults to the override doesn't help:

{ "command": "C:\Users\<user>\AppData\Roaming\npm\node_modules\@anthropic-ai\claude-code\bin\claude.exe", "args": ["--input-format=stream-json", "--output-format=stream-json", "--verbose"], "input": "stdin", "output": "jsonl", "liveSession": "claude-stdio" } Adding/removing --print tested; same outcome. Result: rawLines=12 but silent-reply-dispatch reports no visible final response.

Workarounds attempted (none worked end-to-end) Adding set "PATH=%APPDATA%\npm;%APPDATA%\npm\node_modules@anthropic-ai\claude-code\bin;%PATH%" to ~.openclaw\gateway.cmd (so the gateway process can resolve claude by PATH) — verified file edit landed but spawn claude ENOENT persisted on fresh gateway PID Hard-killing all node processes + forcing fresh launch via schtasks /Run and openclaw gateway start — verified new PID, no change in behavior Toggling --print flag in args — no behavioral change Asks Documented complete reference for agents.defaults.cliBackends.claude-cli — analogous to the codex-cli block in docs.openclaw.ai/gateway/cli-backends. The page mentions defaults (liveSession: 'claude-stdio', output: 'jsonl', input: 'stdin') but never publishes a complete working example. Windows-specific guidance — given Node CVE-2024-27980 makes .cmd spawn fail and bare-name resolution doesn't honor PATHEXT, OpenClaw's default invocation needs to either: Resolve to claude.exe automatically on Windows, OR Use shell: true for the spawn, OR Document the user-side override required to make it work Why does failure mode #3 produce silent-reply-dispatch even when claude.exe is invoked correctly? Output format mismatch? Missing args we can't see in docs?

Expected behavior

send a message and receive a reply

Actual behavior

send a message and didnt receive a reply

OpenClaw version

2026.5.5 (b1abf9d)

Operating system

Windows 11

Install method

npm i -g openclaw

Model

claude opus 4.7

Provider / routing chain

Telegram message → agent → claude.exe subprocess

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

No response

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

send a message and receive a reply

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix [Bug]: Telegram Connection Bot [1 comments, 2 participants]