GitHub PR:跨 agent 会话路径修复 + cron 快照瘦身实践
修复 v2026.2.12 引入的跨 agent 会话路径误判,并避免 cron `:run:` 条目重复存储 `skillsSnapshot` 导致 sessions.json 膨胀。
GITHUBDiscovered 2026-02-13Author openperf
Prerequisites
- Environment has multi-agent sessions and cron jobs generating `:run:` records.
- You can inspect session path resolution and monitor `sessions.json` file growth.
Steps
- Reproduce regression: load cross-agent session using absolute path and confirm rejection behavior on old build.
- Upgrade/apply patch where resolver accepts absolute candidates inside OpenClaw state root.
- Run cron jobs repeatedly and compare `sessions.json` growth before/after snapshot-pruning fix.
- Add guard tests: reject true traversal attempts while permitting valid cross-agent paths.
Commands
openclaw gateway statusopenclaw logs --local-timenpm run buildVerify
Valid cross-agent session paths resolve correctly and `sessions.json` no longer inflates from redundant cron snapshots.
Caveats
- Path-safety checks must stay strict; broadened acceptance should remain limited to state-root containment.
- Historical oversized `sessions.json` may still require one-time cleanup procedure(需验证).
Source attribution
This tip is aggregated from community/public sources and preserved with attribution.
Open original source ↗