Summary
When using cliBackends.claude-cli (Anthropic Max plan via OAuth) as the agent backend, Telegram channel shows no live text-streaming preview during model response generation. The same agent on the native API path (anthropic/claude-*-4-6 direct) streams correctly.
Environment
- OpenClaw: 2026.5.2 (also reproduced on 2026.4.29)
- Node: 20.x
- Channel: Telegram
- Model backend:
claude-cli/claude-opus-4-6 via ~/.local/bin/claude -p --output-format stream-json --include-partial-messages
Expected
Token-by-token text preview appears in Telegram while the model generates a response (same UX as native API path).
Actual
No preview. Only the final assembled message is delivered. Tool-progress indicators and the typing-action cue still work — just no text deltas.
Root cause (suspected)
- Native API path:
onPartialReply → signalTextDelta → Telegram draft stream ✅
- CLI backend path: only fires
emitAgentEvent({stream:"assistant"}) → not wired to the Telegram draft-stream sink ❌
The CLI subprocess is producing partial deltas (visible via --output-format stream-json --include-partial-messages), and the dialect parser handles them as assistant events, but they never reach the channel preview pipeline.
Config (relevant excerpt)
"cliBackends": {
"claude-cli": {
"command": "/home/ubuntu/.local/bin/claude",
"args": ["-p", "--output-format", "stream-json", "--include-partial-messages"],
"input": "arg",
"output": "jsonl",
"jsonlDialect": "claude-stream-json",
"serialize": true,
"sessionMode": "existing"
}
}
Reproduction
- Configure
agents.defaults.model.primary = "claude-cli/claude-opus-4-6" in openclaw.json
- Send a message via Telegram that triggers a long response
- Observe: typing indicator shows, no text preview updates until response is complete
Why it matters
Anthropic Max plan users are forced through the CLI backend (no API token access), so this affects all Max plan users on Telegram. Workaround would be to fall back to pay-per-use API, defeating the point of the Max subscription.
Suggested fix area
Wire the CLI backend's emitAgentEvent({stream:"assistant"}) deltas into the same sink the native path uses for signalTextDelta → channel draft stream.
Summary
When using
cliBackends.claude-cli(Anthropic Max plan via OAuth) as the agent backend, Telegram channel shows no live text-streaming preview during model response generation. The same agent on the native API path (anthropic/claude-*-4-6direct) streams correctly.Environment
claude-cli/claude-opus-4-6via~/.local/bin/claude -p --output-format stream-json --include-partial-messagesExpected
Token-by-token text preview appears in Telegram while the model generates a response (same UX as native API path).
Actual
No preview. Only the final assembled message is delivered. Tool-progress indicators and the typing-action cue still work — just no text deltas.
Root cause (suspected)
onPartialReply→signalTextDelta→ Telegram draft stream ✅emitAgentEvent({stream:"assistant"})→ not wired to the Telegram draft-stream sink ❌The CLI subprocess is producing partial deltas (visible via
--output-format stream-json --include-partial-messages), and the dialect parser handles them asassistantevents, but they never reach the channel preview pipeline.Config (relevant excerpt)
Reproduction
agents.defaults.model.primary = "claude-cli/claude-opus-4-6"in openclaw.jsonWhy it matters
Anthropic Max plan users are forced through the CLI backend (no API token access), so this affects all Max plan users on Telegram. Workaround would be to fall back to pay-per-use API, defeating the point of the Max subscription.
Suggested fix area
Wire the CLI backend's
emitAgentEvent({stream:"assistant"})deltas into the same sink the native path uses forsignalTextDelta→ channel draft stream.