-
-
Notifications
You must be signed in to change notification settings - Fork 69k
[Bug]: sessions_list tool returns incorrect transcriptPath #28379
Description
Summary
The sessions_list tool returns a transcriptPath field that points to the wrong directory. The path uses the agent workspace root instead of the actual state directory where session transcripts are stored.
Steps to reproduce
1、Start a conversation via any channel (e.g. Feishu, Discord)
2、Call sessions_list tool (or equivalent Gateway RPC)
3、Inspect the transcriptPath field in the response
Expected behavior
~/.openclaw/agents/main/sessions/<session-id>.jsonl
The file at the returned path does not exist.
Actual behavior
~/.openclaw/workspace/<session-id>.jsonl
OpenClaw version
2026.2.26
Operating system
macOS Darwin 21.6.0
Install method
No response
Logs, screenshots, and evidence
Impact and severity
No response
Additional information
Root Cause
In register.status-health-sessions-B5LtB2me.js, the transcriptPath is resolved via:
const transcriptPath = resolveSessionFilePath(entry.sessionId, entry, sessionPathOpts);The sessionPathOpts passed here uses the workspace directory as sessionsDir, bypassing the correct resolution logic in resolveAgentSessionsDir() (in paths-BwXONNJC.js), which correctly resolves to <stateDir>/agents/<agentId>/sessions/.
Suggested Fix
sessionPathOpts should derive sessionsDir from resolveAgentSessionsDir(agentId) rather than the workspace path.