openclaw - 💡(How to fix) Fix Per-channel session scoping traps exec approvals when channel delivery fails (Telegram 4096 case) [1 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#63237Fetched 2026-04-09 07:56:29
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0
Participants

OpenClaw sessions are scoped per-channel (e.g., agent:main:telegram:<chat>, agent:main:discord:<channel>). Exec approvals generated from a given session are dispatched to that session's channel. When the channel fails to deliver the approval (e.g., Telegram rejects with 400: Bad Request: message is too long), the approval is effectively trapped in a channel where it cannot be surfaced, even if the same user has other channels (Discord, Mac Desktop) configured and working.

Root Cause

  • subagent announce messages got chunking in #25481 / #25110. That's for regular messages where chunking is trivial.
  • Exec approvals cannot be chunked because Telegram inline buttons must attach to a single message. So the chunking fix doesn't help here.
  • The result is that any agent building complex approval requests on Telegram eventually hits the 4096 wall and becomes unusable on that channel for Tier 2 work, even when other channels would work fine.
  • This creates a trap specific to users running multi-channel setups who rely on Telegram as primary conversation surface.

Fix Action

Fix / Workaround

OpenClaw sessions are scoped per-channel (e.g., agent:main:telegram:<chat>, agent:main:discord:<channel>). Exec approvals generated from a given session are dispatched to that session's channel. When the channel fails to deliver the approval (e.g., Telegram rejects with 400: Bad Request: message is too long), the approval is effectively trapped in a channel where it cannot be surfaced, even if the same user has other channels (Discord, Mac Desktop) configured and working.

Expected: When one approval delivery surface fails for a given session, either:

  • Fallback: the approval should be retried on other configured surfaces for the same owner (Discord, Mac Desktop)
  • Fanout: OR dispatch in parallel to all configured surfaces from the start, so per-surface failures are absorbed by the others
  • Explicit config: OR at minimum, expose a config flag like approvals.exec.forwarding.mode = \"all-configured-channels\" that fans out regardless of session origin

Is there a current config workaround to make exec approvals session-origin-independent — so that any owner-configured channel can act as an approval surface for any session?

RAW_BUFFERClick to expand / collapse

Summary

OpenClaw sessions are scoped per-channel (e.g., agent:main:telegram:<chat>, agent:main:discord:<channel>). Exec approvals generated from a given session are dispatched to that session's channel. When the channel fails to deliver the approval (e.g., Telegram rejects with 400: Bad Request: message is too long), the approval is effectively trapped in a channel where it cannot be surfaced, even if the same user has other channels (Discord, Mac Desktop) configured and working.

Reproduction

Setup:

  • OpenClaw 2026.4.8 on macOS
  • Agent main with independent sessions on Telegram, Discord, and Mac Desktop
  • Both channels.telegram.execApprovals and channels.discord.execApprovals configured with the same owner as approver
  • Owner actively uses Telegram as primary chat channel

Trigger:

  1. Send a message to the agent on Telegram that causes a Tier 2 action requiring approval
  2. The command has enough context that the generated approval body exceeds 4096 chars
  3. Telegram rejects: [telegram] approvals: failed to send request <id>: GrammyError: Bad Request: message is too long
  4. The approval times out after the default window

Observed:

  • The approval request is generated and has a valid ID
  • Telegram delivery fails (expected: 4096 limit)
  • Discord and Mac Desktop never receive the approval request even though they are configured surfaces with the same owner
  • The agent is stuck: it cannot proceed (no approval), but the owner cannot act (no button, no notification)

Expected: When one approval delivery surface fails for a given session, either:

  • Fallback: the approval should be retried on other configured surfaces for the same owner (Discord, Mac Desktop)
  • Fanout: OR dispatch in parallel to all configured surfaces from the start, so per-surface failures are absorbed by the others
  • Explicit config: OR at minimum, expose a config flag like approvals.exec.forwarding.mode = \"all-configured-channels\" that fans out regardless of session origin

Why this matters

  • subagent announce messages got chunking in #25481 / #25110. That's for regular messages where chunking is trivial.
  • Exec approvals cannot be chunked because Telegram inline buttons must attach to a single message. So the chunking fix doesn't help here.
  • The result is that any agent building complex approval requests on Telegram eventually hits the 4096 wall and becomes unusable on that channel for Tier 2 work, even when other channels would work fine.
  • This creates a trap specific to users running multi-channel setups who rely on Telegram as primary conversation surface.

Question to maintainers / community

Is there a current config workaround to make exec approvals session-origin-independent — so that any owner-configured channel can act as an approval surface for any session?

Specifically:

  • Does `approvals.exec.forwarding` with `mode: "both"` and explicit `targets` achieve this? The schema description says "session uses origin chat, targets uses configured targets, both sends to both paths" — is "both" enough to make a Telegram-origin approval also surface on Discord?
  • Is the Mac Desktop app supposed to be a session-agnostic approval surface by design?
  • Any known workaround for users hitting the 4096 limit on Telegram-session approvals?

Environment

  • OpenClaw 2026.4.8
  • macOS 26.3.1
  • Gateway running as LaunchAgent
  • Channels: Telegram, Discord, Slack, WhatsApp
  • `approvals.exec.mode: "targets"` currently set
  • No `approvals.exec.forwarding` block configured (using legacy/default field?)

Related

  • #25481 / #25110: subagent announce chunking (different code path, doesn't apply here)
  • #63067: memory-core exclusive slot gating (same user, different subsystem)

extent analysis

TL;DR

Configure approvals.exec.forwarding with mode: "both" and explicit targets to potentially make exec approvals session-origin-independent.

Guidance

  • Investigate setting approvals.exec.forwarding.mode to "all-configured-channels" or "both" to enable fallback or fanout behavior for approval deliveries.
  • Verify if the Mac Desktop app is designed to be a session-agnostic approval surface and if it can be used as a workaround for the 4096 limit on Telegram-session approvals.
  • Check the documentation for approvals.exec.forwarding to understand the implications of setting mode to "both" and configuring explicit targets.
  • Test the approvals.exec.mode set to "targets" with the approvals.exec.forwarding block configured to see if it achieves the desired behavior.

Example

No code snippet is provided as the issue does not contain explicit code references.

Notes

The effectiveness of the suggested configuration changes depends on the specific implementation of the approvals.exec.forwarding feature in OpenClaw. Further testing and verification are required to confirm the desired behavior.

Recommendation

Apply workaround: Configure approvals.exec.forwarding with mode: "both" and explicit targets to potentially make exec approvals session-origin-independent, as this may provide a viable solution for users hitting the 4096 limit on Telegram-session approvals.

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…

Still need to ship something?

×6

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

Back to top recommendations

TRENDING