openclaw - 💡(How to fix) Fix Bug: xAI Grok 4.20 multi-agent fails in Telegram topic with 400 no body

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…

Switching a Telegram forum topic session to xai/grok-4.20-multi-agent-0309 using the configured xAI API-key auth caused every assistant turn in that topic to fail before producing content.

The same Telegram Projects group/topics work normally with openai-codex/gpt-5.5; the failure appears specific to the xAI/Grok 4.20 multi-agent model path in a Telegram topic session.

Error Message

{"type":"message","timestamp":"2026-05-21T21:24:00.396Z","message":{"role":"assistant","content":[{"type":"text","text":"[assistant turn failed before producing content]"}],"api":"openai-completions","provider":"xai","model":"grok-4.20-multi-agent-0309","usage":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0,"totalTokens":0},"stopReason":"error","timestamp":1779398640211,"errorMessage":"400 status code (no body)"}} {"type":"message","timestamp":"2026-05-21T21:24:03.461Z","message":{"role":"assistant","content":[{"type":"text","text":"[assistant turn failed before producing content]"}],"api":"openai-completions","provider":"xai","model":"grok-4.20-multi-agent-0309","usage":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0,"totalTokens":0},"stopReason":"error","timestamp":1779398643345,"errorMessage":"400 status code (no body)"}} {"type":"message","timestamp":"2026-05-21T21:25:21.408Z","message":{"role":"assistant","content":[{"type":"text","text":"[assistant turn failed before producing content]"}],"api":"openai-completions","provider":"xai","model":"grok-4.20-multi-agent-0309","usage":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0,"totalTokens":0},"stopReason":"error","timestamp":1779398719111,"errorMessage":"400 status code (no body)"}} {"type":"message","timestamp":"2026-05-21T21:25:24.912Z","message":{"role":"assistant","content":[{"type":"text","text":"[assistant turn failed before producing content]"}],"api":"openai-completions","provider":"xai","model":"grok-4.20-multi-agent-0309","usage":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0,"totalTokens":0},"stopReason":"error","timestamp":1779398724381,"errorMessage":"400 status code (no body)"}} 2. OpenClaw should surface a clearer validation/provider error if grok-4.20-multi-agent-0309 is not usable with the configured xAI API/OpenAI-completions adapter. stopReason: error

Root Cause

Switching a Telegram forum topic session to xai/grok-4.20-multi-agent-0309 using the configured xAI API-key auth caused every assistant turn in that topic to fail before producing content.

The same Telegram Projects group/topics work normally with openai-codex/gpt-5.5; the failure appears specific to the xAI/Grok 4.20 multi-agent model path in a Telegram topic session.

Code Example

model: grok-4.20-multi-agent-0309
modelProvider: xai
modelOverride: grok-4.20-multi-agent-0309
modelOverrideSource: user

---

Model: xai/grok-4.20-multi-agent-0309 · api-key (models.json)
Session: agent:personal:telegram:group:<redacted>:topic:22
Activation: mention
Runtime: OpenClaw Pi Default

---

{"type":"model_change","timestamp":"2026-05-21T21:23:57.235Z","provider":"xai","modelId":"grok-4.20-multi-agent-0309"}
{"type":"custom","customType":"model-snapshot","data":{"timestamp":1779398637255,"provider":"xai","modelApi":"openai-completions","modelId":"grok-4.20-multi-agent-0309"},"timestamp":"2026-05-21T21:23:57.255Z"}
{"type":"message","timestamp":"2026-05-21T21:24:00.396Z","message":{"role":"assistant","content":[{"type":"text","text":"[assistant turn failed before producing content]"}],"api":"openai-completions","provider":"xai","model":"grok-4.20-multi-agent-0309","usage":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0,"totalTokens":0},"stopReason":"error","timestamp":1779398640211,"errorMessage":"400 status code (no body)"}}
{"type":"message","timestamp":"2026-05-21T21:24:03.461Z","message":{"role":"assistant","content":[{"type":"text","text":"[assistant turn failed before producing content]"}],"api":"openai-completions","provider":"xai","model":"grok-4.20-multi-agent-0309","usage":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0,"totalTokens":0},"stopReason":"error","timestamp":1779398643345,"errorMessage":"400 status code (no body)"}}
{"type":"message","timestamp":"2026-05-21T21:25:21.408Z","message":{"role":"assistant","content":[{"type":"text","text":"[assistant turn failed before producing content]"}],"api":"openai-completions","provider":"xai","model":"grok-4.20-multi-agent-0309","usage":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0,"totalTokens":0},"stopReason":"error","timestamp":1779398719111,"errorMessage":"400 status code (no body)"}}
{"type":"message","timestamp":"2026-05-21T21:25:24.912Z","message":{"role":"assistant","content":[{"type":"text","text":"[assistant turn failed before producing content]"}],"api":"openai-completions","provider":"xai","model":"grok-4.20-multi-agent-0309","usage":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0,"totalTokens":0},"stopReason":"error","timestamp":1779398724381,"errorMessage":"400 status code (no body)"}}

---

provider: xai
modelId: grok-4.20-multi-agent-0309
modelApi: openai-completions
assistantTexts: []
promptCache.lastCallUsage: input=0 output=0 total=0

---

stopReason: error
errorMessage: 400 status code (no body)
usage: input=0, output=0, totalTokens=0
content: [assistant turn failed before producing content]
RAW_BUFFERClick to expand / collapse

Summary

Switching a Telegram forum topic session to xai/grok-4.20-multi-agent-0309 using the configured xAI API-key auth caused every assistant turn in that topic to fail before producing content.

The same Telegram Projects group/topics work normally with openai-codex/gpt-5.5; the failure appears specific to the xAI/Grok 4.20 multi-agent model path in a Telegram topic session.

Environment

  • OpenClaw: 2026.5.6 (c97b9f7)
  • Host OS: macOS 15.7.3 / Darwin 24.6.0 / x64 Intel
  • Runtime: OpenClaw Pi Default, execution direct
  • Channel: Telegram group/forum topic
  • Agent: personal
  • Auth profile for xAI: API key (xai:default, from models/auth config)
  • Model selected in failing topic: xai/grok-4.20-multi-agent-0309
  • Model API recorded by runtime: openai-completions

What happened

A Telegram topic session was switched to Grok 4.20 multi-agent. After that, every user message in the topic produced an assistant failure with no content returned.

Session state showed the model override as user-selected:

model: grok-4.20-multi-agent-0309
modelProvider: xai
modelOverride: grok-4.20-multi-agent-0309
modelOverrideSource: user

Runtime/session status showed:

Model: xai/grok-4.20-multi-agent-0309 · api-key (models.json)
Session: agent:personal:telegram:group:<redacted>:topic:22
Activation: mention
Runtime: OpenClaw Pi Default

Log excerpts

From the failing Telegram topic session jsonl:

{"type":"model_change","timestamp":"2026-05-21T21:23:57.235Z","provider":"xai","modelId":"grok-4.20-multi-agent-0309"}
{"type":"custom","customType":"model-snapshot","data":{"timestamp":1779398637255,"provider":"xai","modelApi":"openai-completions","modelId":"grok-4.20-multi-agent-0309"},"timestamp":"2026-05-21T21:23:57.255Z"}
{"type":"message","timestamp":"2026-05-21T21:24:00.396Z","message":{"role":"assistant","content":[{"type":"text","text":"[assistant turn failed before producing content]"}],"api":"openai-completions","provider":"xai","model":"grok-4.20-multi-agent-0309","usage":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0,"totalTokens":0},"stopReason":"error","timestamp":1779398640211,"errorMessage":"400 status code (no body)"}}
{"type":"message","timestamp":"2026-05-21T21:24:03.461Z","message":{"role":"assistant","content":[{"type":"text","text":"[assistant turn failed before producing content]"}],"api":"openai-completions","provider":"xai","model":"grok-4.20-multi-agent-0309","usage":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0,"totalTokens":0},"stopReason":"error","timestamp":1779398643345,"errorMessage":"400 status code (no body)"}}
{"type":"message","timestamp":"2026-05-21T21:25:21.408Z","message":{"role":"assistant","content":[{"type":"text","text":"[assistant turn failed before producing content]"}],"api":"openai-completions","provider":"xai","model":"grok-4.20-multi-agent-0309","usage":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0,"totalTokens":0},"stopReason":"error","timestamp":1779398719111,"errorMessage":"400 status code (no body)"}}
{"type":"message","timestamp":"2026-05-21T21:25:24.912Z","message":{"role":"assistant","content":[{"type":"text","text":"[assistant turn failed before producing content]"}],"api":"openai-completions","provider":"xai","model":"grok-4.20-multi-agent-0309","usage":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0,"totalTokens":0},"stopReason":"error","timestamp":1779398724381,"errorMessage":"400 status code (no body)"}}

The trajectory also recorded successful runtime completion at the wrapper level but no assistant text, with usage all zero:

provider: xai
modelId: grok-4.20-multi-agent-0309
modelApi: openai-completions
assistantTexts: []
promptCache.lastCallUsage: input=0 output=0 total=0

Expected behavior

Either:

  1. The selected Grok model should work in the Telegram topic session, or
  2. OpenClaw should surface a clearer validation/provider error if grok-4.20-multi-agent-0309 is not usable with the configured xAI API/OpenAI-completions adapter.

Actual behavior

The topic silently failed from the user's point of view. Each attempted assistant turn recorded:

stopReason: error
errorMessage: 400 status code (no body)
usage: input=0, output=0, totalTokens=0
content: [assistant turn failed before producing content]

No reply was delivered in the Telegram topic until the model was switched back to gpt-5.5.

Notes

This may be one of:

  • xAI rejecting the request payload shape for this specific model
  • the grok-4.20-multi-agent-0309 catalog entry being unavailable/invalid for API-key use
  • the model requiring a different adapter/options than openai-completions
  • missing/unclear validation before allowing the model override in a chat session

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

Either:

  1. The selected Grok model should work in the Telegram topic session, or
  2. OpenClaw should surface a clearer validation/provider error if grok-4.20-multi-agent-0309 is not usable with the configured xAI API/OpenAI-completions adapter.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING