[Bug] Cron job 在 isolated 模式下 --deliver-to <chatId> 不投递到 Telegram(手动 dm 正常)

Environment

  • Alma 0.0.773 (macOS)

  • Telegram bot: enabled, allowedUserIds 已配

  • 模型: claude-subscription:claude-opus-4-7

Expected

当我用 alma cron add 创建一个 cron 任务,配置:

  • --mode isolated

  • --deliver-to <my_telegram_chat_id>

  • --prompt "..."

每次 schedule 触发时,应该把生成的回复消息推送到指定 Telegram chatId(私聊 DM)。

Actual

  1. Cron 在指定时间触发,alma cron history <id> 显示 ✅ 成功(runs:2, 有摘要文本)

  2. 但 Telegram 那边没有收到任何消息

  3. 直接用 alma dm <chatId> "test" 是能正常送达的,证明 chatId 和 bot token 链路没问题

  4. alma cron run <id> 手动触发也没有走 deliver-to 投递(这条可能是 manual trigger 设计行为,但 schedule trigger 也没投递就是 bug)

Repro

```bash

1. 创建一个 isolated cron + deliver-to

alma cron add "test-deliver" cron "30 9 * * *"
--mode isolated
--prompt "Say hello in one sentence."
--deliver-to <YOUR_TG_CHAT_ID>
--model claude-subscription:claude-opus-4-7

2. 等到触发时间,或 alma cron run <id>

3. 检查 alma cron history <id> → 显示成功,输出有内容

4. 检查 Telegram → 没有任何消息收到

```

Workaround

目前只能在 cron prompt 里让 LLM 自己调用 alma dm 来发,绕过自带的 deliver-to。

Adjacent issue / 建议

顺便发现 alma dm <userId> <msg> 发出的消息没有写进 ~/.config/alma/chats/<chatId>_*.log,导致:

  • bot 后续接收用户回复时缺少上下文

  • LLM 看到一条"凭空回复"会判 NO_REPLY 静默

  • 用户回了消息但 Alma 不会自动响应

如果 alma dm 能像普通 bot 出站消息一样写入 chat log + 进入 thread state,会让 cron 投递的内容形成完整对话闭环。

Please authenticate to join the conversation.

Upvoters
Status

In Review

Board
💡

Feature Request

Date

About 3 hours ago

Author

Xia Hua (Bryan)

Subscribe to post

Get notified by email when there are changes.