openclaw - 💡(How to fix) Fix cron isolated session: 6项热修复改进建议(路径解析/缓存/时序/投递/幂等) [1 comments, 2 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#83994Fetched 2026-05-20 03:45:31
View on GitHub
Comments
1
Participants
2
Timeline
11
Reactions
1
Author
Timeline (top)
labeled ×10commented ×1
RAW_BUFFERClick to expand / collapse

背景

cron isolated session 中频繁出现 ~ 波浪号路径解析失败、prompt 缓存导致的旧版本执行、以及 delivery 标记与实际消费不一致等问题。经过多轮排查,提出以下6项改进建议。

改进项

1. 全局禁用静态~波浪路径解析

现状:isolated session 中 ~ 不解析为 home 目录,导致 write 工具失败(Path escapes sandbox root)。 建议:运行时自动将 ~ 转为项目绝对路径(如 /Users/xxx/),内存实时覆写,不中断进程。

2. 取消prompt常驻内存缓存

现状:cron prompt 修改后,正在运行的 cron 仍使用旧版本 prompt。 建议:新增文件修改时间戳校验,新任务强制实时读取最新 prompt,旧运行任务平稳续跑不会被打断。

3. 配置修改内置3秒防抖缓冲

现状:快速连续修改 prompt + 手动触发 cron,agent 可能拿到改到一半的版本,存在时序竞态。 建议:配置修改内置防抖缓冲(如3秒),规避时序竞态,修改后即刻触发也优先取新版本。

4. 拆分飞书投递状态与本地消费状态

现状lastDeliveryStatus: "delivered" 仅表示飞书 API 返回成功,不代表用户实际收到或在飞书 UI 中可见。当前"delivered"被当作成功,实际可能丢消息。 建议:仅标记本地业务处理完成(文件保存+飞书发送+飞书确认三方全过)才算闭环。

5. 启用内存级msg_id幂等去重

现状:retry 或手动触发可能导致同一消息发送多次,用户收到重复内容。 建议:内存级 msg_id 幂等去重,5分钟内重复消息直接拦截丢弃。

6. 全程无重启、无停机

原则:以上所有改进均为热注入,不终止任何在线任务,不影响正在运行的会话。

环境

  • OpenClaw 2026.5.12 (f066dd2)
  • macOS 25.5.0 (arm64)
  • node v24.14.0

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 - 💡(How to fix) Fix cron isolated session: 6项热修复改进建议(路径解析/缓存/时序/投递/幂等) [1 comments, 2 participants]