IRC 绑定非默认 Agent 排障:Session path must be within sessions directory
场景:IRC 渠道绑定到非默认 agent 时消息处理失败,报 session 路径校验错误。技巧:按绑定、会话文件、路径归属、回退验证顺序定位。
GITHUBDiscovered 2026-02-14Author killtheplanet
Prerequisites
- OpenClaw has at least two agents (main + irc) and IRC plugin enabled.
- Bindings route IRC traffic to non-default agentId.
Steps
- Validate binding rule is actually matched by channel=irc and target agentId is registered.
- Inspect target agent session directory and ensure generated transcript path stays under that directory.
- Send one test message with binding enabled; capture exact error log and file path used by resolver.
- Temporarily disable binding to confirm channel itself is healthy and isolate regression scope.
- Keep workaround on main routing until upstream fix lands; track issue for patch availability.
Commands
openclaw gateway statusopenclaw logs --local-timeopenclaw sessions listopenclaw gateway restartVerify
With fix/workaround applied, IRC messages generate session files in the intended agent sessions directory and receive responses normally.
Caveats
- This is an open bug report; final root cause/patch may differ from current hypothesis(需验证).
- Avoid ad-hoc symlink hacks in production unless fully rollback-tested.
Source attribution
This tip is aggregated from community/public sources and preserved with attribution.
Open original source ↗