openclaw - ✅(Solved) Fix [Bug]: Cron --announce fails with numeric Telegram chatId: Unsupported channel [1 pull requests, 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#70758Fetched 2026-04-24 05:53:56
View on GitHub
Comments
0
Participants
1
Timeline
1
Reactions
0
Author
Participants
Timeline (top)
cross-referenced ×1

Fix Action

Workaround

None identified.

PR fix notes

PR #70814: fix(cron): accept numeric telegram announce chat ids (Fixes #70758)

Description (problem / solution / changelog)

Summary

  • Problem: cron announce delivery can treat a numeric Telegram chat ID as delivery.channel, which later fails with Unsupported channel: <chatId>.
  • Why it matters: Telegram cron jobs that should deliver to a direct chat or group chat ID can finish the run but drop the announce step.
  • What changed: when delivery.channel is not actually a channel and there is no separate delivery.to, cron delivery now reuses the sole configured announce channel and treats that value as the explicit target; I also added regressions for both the plain --to 834732674 path and the misplaced delivery.channel=834732674 path.
  • What did NOT change (scope boundary): this does not add broad multi-channel guessing. If channel selection is ambiguous, the resolver still leaves that case alone instead of guessing.

Change Type (select all)

  • Bug fix
  • Feature
  • Refactor required for the fix
  • Docs
  • Security hardening
  • Chore/infra

Scope (select all touched areas)

  • Gateway / orchestration
  • Skills / tool execution
  • Auth / tokens
  • Memory / storage
  • Integrations
  • API / contracts
  • UI / DX
  • CI/CD / infra

Linked Issue/PR

  • Closes #70758
  • Related #70574
  • This PR fixes a bug or regression

Root Cause (if applicable)

  • Root cause: the cron delivery resolver accepted any lowercased string in delivery.channel long enough for a raw Telegram chat ID to survive as the channel value instead of being treated as the destination.
  • Missing detection / guardrail: there was no regression coverage for a numeric Telegram target reaching cron delivery either through delivery.to or through a misfiled delivery.channel value when only one announce channel is configured.
  • Contributing context (if known): gateway validation intentionally allows raw channel values when there is only one configured announce channel, so the runtime resolver needs to recover cleanly from that shape.

Regression Test Plan (if applicable)

  • Coverage level that should have caught this:
    • Unit test
    • Seam / integration test
    • End-to-end test
    • Existing coverage already sufficient
  • Target test or file: src/cron/isolated-agent/delivery-target.test.ts
  • Scenario the test should lock in: numeric Telegram-style IDs resolve through the sole configured announce channel both when passed in delivery.to and when the same value lands in delivery.channel.
  • Why this is the smallest reliable guardrail: the bug is in the delivery target resolver, so the resolver test exercises the exact normalization and fallback path without pulling in unrelated cron execution behavior.
  • Existing test that already covers this (if any): none that covered the numeric-target path.
  • If no new test is added, why not: N/A

User-visible / Behavior Changes

  • Isolated cron jobs with Telegram announce delivery can now keep numeric chat IDs as valid targets instead of failing with Unsupported channel.
  • Stored cron jobs that accidentally carry the numeric Telegram chat ID in delivery.channel now recover when there is exactly one configured announce channel.

Diagram (if applicable)

Before:
[cron delivery config with numeric Telegram target]
  -> [resolver keeps numeric value as channel]
  -> [outbound target resolution]
  -> [Unsupported channel: 834732674]

After:
[cron delivery config with numeric Telegram target]
  -> [resolver recognizes "not a real channel" when only one announce channel exists]
  -> [reuse that channel + move numeric value to explicit target]
  -> [announce delivery proceeds]

Security Impact (required)

  • New permissions/capabilities? (Yes/No) No
  • Secrets/tokens handling changed? (Yes/No) No
  • New/changed network calls? (Yes/No) No
  • Command/tool execution surface changed? (Yes/No) No
  • Data access scope changed? (Yes/No) No
  • If any Yes, explain risk + mitigation:

Repro + Verification

Environment

  • OS: macOS
  • Runtime/container: local worktree at /tmp/openclaw-70758-worktree
  • Model/provider: N/A
  • Integration/channel (if any): Telegram-style cron delivery target resolution
  • Relevant config (redacted): one configured announce channel in the validation harness

Steps

  1. Resolve cron delivery with channel: "last" and to: "834732674" while exactly one announce channel is configured.
  2. Resolve cron delivery again with channel: "834732674" and no to while the same single announce channel is configured.
  3. Confirm both cases resolve to that announce channel with to: "834732674".

Expected

  • Numeric Telegram chat IDs stay usable as announce targets.

Actual

  • Before the fix, the misplaced-channel path could surface Unsupported channel: 834732674.
  • After the fix, both resolver cases return the configured channel plus to: "834732674".

Evidence

  • Failing test/log before + passing after
  • Trace/log snippets
  • Screenshot/recording
  • Perf numbers (if relevant)

Direct runtime harness output after the fix:

{"name":"explicit-to","ok":true,"channel":"alpha","to":"834732674"}
{"name":"misplaced-channel","ok":true,"channel":"alpha","to":"834732674"}

I also tried pnpm test -- src/cron/isolated-agent/delivery-target.test.ts, but the local Vitest lane aborts before test execution on this machine because the repo wants Node >=22.14.0 and the worktree is currently running Node 22.12.0.

Human Verification (required)

  • Verified scenarios: both numeric-target resolver paths above using a direct tsx harness against the real delivery resolver.
  • Edge cases checked: the recovery only kicks in when there is no separate delivery.to and channel selection collapses to one configured announce channel.
  • What you did not verify: a full Vitest run in this worktree, because the local Node version is below the repo's declared minimum and the runner crashes before loading the file.

Review Conversations

  • I replied to or resolved every bot review conversation I addressed in this PR.
  • I left unresolved only the conversations that still need reviewer or maintainer judgment.

Compatibility / Migration

  • Backward compatible? (Yes/No) Yes
  • Config/env changes? (Yes/No) No
  • Migration needed? (Yes/No) No
  • If yes, exact upgrade steps:

Risks and Mitigations

  • Risk: a non-channel delivery.channel value could be interpreted too aggressively.
    • Mitigation: the recovery only applies when there is no separate delivery.to and channel selection resolves to exactly one configured announce channel, so multi-channel setups are not guessed.

Changed files

  • src/cron/isolated-agent/delivery-target.test.ts (modified, +33/-0)
  • src/cron/isolated-agent/delivery-target.ts (modified, +29/-2)

Code Example

Unsupported channel: 834732672
RAW_BUFFERClick to expand / collapse

Bug Description

When a cron job with --announce is configured with a numeric Telegram chatId as the delivery destination, the announce fails with:

Unsupported channel: 834732672

The same happens when the chatId is stored in the delivery.channel field without the telegram: prefix.

Environment

  • OpenClaw 2026.4.15
  • Channel: Telegram
  • Chat ID: 834732674 (valid Telegram chat ID)

Steps to Reproduce

  1. Create a cron job with --announce and --to 834732674
  2. Run the job
  3. Observe: job completes but announce delivery fails with "Unsupported channel"

Expected Behavior

Numeric Telegram chatIds should be accepted as valid announce destinations.

Workaround

None identified.

Related

  • #70574 (subagent routing on Telegram)

extent analysis

TL;DR

Prefixing the numeric Telegram chatId with "telegram:" may resolve the announce delivery failure.

Guidance

  • Verify that the --to parameter is correctly formatted by prefixing the chatId with "telegram:", e.g., --to telegram:834732674.
  • Check the documentation for any specific requirements or restrictions on using numeric chatIds as announce destinations.
  • Test the cron job with the modified --to parameter to confirm whether the issue is resolved.
  • Review related issue #70574 for potential insights into subagent routing on Telegram, which may be relevant to this problem.

Example

--to telegram:834732674

Notes

The provided information suggests that the issue is specific to numeric Telegram chatIds without the "telegram:" prefix. However, the root cause of the problem is not explicitly stated, and further investigation may be necessary to determine the underlying reason for the "Unsupported channel" error.

Recommendation

Apply workaround by prefixing the numeric Telegram chatId with "telegram:", as this is a simple and non-intrusive change that may resolve the issue.

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

openclaw - ✅(Solved) Fix [Bug]: Cron --announce fails with numeric Telegram chatId: Unsupported channel [1 pull requests, 1 participants]