You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use this page during Telegram PR review. These are intentional maintainer decisions, not incidental implementation details.
4
+
5
+
Verified against Telegram Bot API 10.0, May 8 2026.
6
+
7
+
## Streaming
8
+
9
+
- Do not reintroduce `sendMessageDraft` for answer streaming. Telegram drafts are ephemeral 30-second previews in private chats; final delivery still requires a separate `sendMessage`. OpenClaw uses `sendMessage` plus `editMessageText`, then finalizes in place so the user sees one persistent answer.
10
+
- Streaming owns one visible preview message. Edit it forward. Do not send an extra final bubble unless the final edit genuinely failed.
11
+
- Keep the first-preview debounce. If a provider sends token-sized deltas, coalesce them into cumulative preview text instead of removing the debounce.
12
+
- Respect Telegram limits in the Telegram layer. Text over 4096 chars chains into continuation messages. Polls keep the current Bot API 12-option cap.
13
+
14
+
## Telegram API Ownership
15
+
16
+
- Prefer grammY primitives and Telegram-native helpers when they model the behavior directly. Avoid custom Bot API wrappers for behavior grammY already owns.
17
+
- Throttling is bot-token scoped. All Telegram API clients for the same token share one grammY `apiThrottler()` instance.
18
+
- Do not silently retry failed topic sends without topic metadata. A wrong-surface success is worse than a loud Telegram error.
19
+
- DM topics and forum topics are distinct. `direct_messages_topic_id` and `message_thread_id` are not interchangeable.
20
+
21
+
## Context And Authorization
22
+
23
+
- Reply context comes from OpenClaw-observed messages. Bot API updates expose `reply_to_message`, but there is no arbitrary `getMessage(chat, id)` hydration path later.
24
+
- Current local chat context must outrank stale reply ancestry in the prompt. Old replied-to messages should not look like the active conversation.
25
+
- Pairing is DM-only. Group and topic authorization need explicit config allowlists.
26
+
- Telegram allowlists use numeric sender IDs. Usernames are optional, mutable, and not a reliable arbitrary-user lookup key in the Bot API.
27
+
- Group and channel visible replies are policy-controlled. Normal room replies stay private unless `messages.groupChat.visibleReplies: "automatic"` is set or the agent explicitly calls `message.send`.
28
+
29
+
## Interactive Surfaces
30
+
31
+
- Native callbacks stay structured. Approval, native command, plugin, select, and multiselect callbacks must not fall through as raw callback text.
32
+
- Preserve callback values exactly, including delimiters such as `env|prod`.
33
+
- Native slash commands should remain fast-pathable before full workspace and agent-turn setup.
34
+
35
+
## Review Standard
36
+
37
+
Telegram behavior PRs need real Telegram proof when they touch transport, streaming, topics, callbacks, authorization, or reply context. Prefer the bot-to-bot QA lane or an equivalent live Telegram probe over synthetic-only validation.
description: Debug OpenClaw model, provider, tool-surface, code-mode, streaming, and live/Crabbox behavior by choosing the right logs, probes, and proof path before changing code.
4
+
---
5
+
6
+
# OpenClaw Debugging
7
+
8
+
Use this skill when OpenClaw behavior differs between local tests, live models,
9
+
providers, code mode, Tool Search, Crabbox, or CI, and the next move should be a
10
+
debug signal rather than a guess.
11
+
12
+
## Read First
13
+
14
+
-`docs/logging.md` for log files, `openclaw logs`, and targeted debug flags.
15
+
-`docs/reference/test.md` for local test commands.
16
+
-`docs/reference/code-mode.md` for code-mode exec/wait and tool catalog rules.
17
+
- Use `$openclaw-testing` for choosing test lanes.
18
+
- Use `$crabbox` for broad, Docker, package, Linux, live-key, or CI-parity proof.
19
+
20
+
## Default Loop
21
+
22
+
1. State the suspected boundary: config, tool construction, provider payload,
23
+
fetch, stream/SSE, transcript replay, worker/runtime, package/dist, or CI.
24
+
2. Add or enable the narrowest signal that proves that boundary.
25
+
3. Reproduce with the same provider/model/config. Do not randomly switch models
26
+
unless the model itself is the variable being tested.
27
+
4. Compare configured state with actual run activation.
28
+
5. Patch the root cause.
29
+
6. Rerun the exact failing probe, then broaden only if the contract requires it.
30
+
31
+
## Model Transport Logs
32
+
33
+
Use targeted env flags instead of global debug when the model request shape or
short_description: "Debug model, tool, stream, and live behavior"
4
+
default_prompt: "Use $openclaw-debugging to identify the right OpenClaw debug boundary, turn on targeted logs, and choose the narrowest local or Crabbox proof."
0 commit comments