← Back to library

Webchat 多 Agent 会话路径报错:非默认 Agent 聊天面板无法渲染

场景:Control UI 中切到非默认 agent 后出现 `Session file path must be within sessions directory`。方案:按会话归属、路径解析、临时绕过三段法排障,避免业务中断。

GITHUBDiscovered 2026-02-14Author H2OmAI
Prerequisites
  • OpenClaw is configured with multi-agent setup (main + at least one non-default agent).
  • You can access both webchat TUI and CLI (`openclaw chat --agent ...`).
Steps
  1. Reproduce in webchat by switching to a non-default agent session, then send one message and capture the exact banner/inline error.
  2. Inspect session metadata and confirm sessionFile path resolves under the target agent's sessions directory, not main's directory.
  3. Validate business continuity via CLI/channel workaround (`openclaw chat --agent <id>` or Telegram/Discord binding) while webchat remains degraded.
  4. Track upstream fix issue and re-test webchat path resolution after upgrade before removing workaround.
Commands
openclaw gateway status
openclaw sessions list
openclaw chat --agent stellar
openclaw logs --local-time
Verify

Non-default agent messages render normally in webchat, and no path-safety error appears for repeated turns.

Caveats
  • Issue is still an upstream bug report; exact patch behavior/version should be confirmed before SOP固化(需验证).
  • Do not disable path safety checks as a workaround in production.
Source attribution

This tip is aggregated from community/public sources and preserved with attribution.

Open original source ↗
Visit original post