fix: resolve workspace path from openclaw.json for cross-machine compatibility (v2.5.0)

This commit is contained in:
2026-03-19 09:28:20 +10:00
parent 772c964740
commit fe13ea19be
3 changed files with 31 additions and 7 deletions
+1 -5
View File
@@ -124,11 +124,7 @@ for agent in agents:
seen.add(agent_id)
name = agent.get('name', agent_id)
workspace = agent.get('workspace', default_ws if agent_id == 'main' else None)
# Skip agents without a resolvable workspace
if not workspace:
workspace = os.path.join(openclaw_dir, 'workspaces', agent_id)
workspace = agent.get('workspace', default_ws)
# Expand ~ in path
workspace = os.path.expanduser(workspace)