Skip to content

fix(workspace): store workspace-state.json in workspace root, not .openclaw/ subdir#1298

Open
BingqingLyu wants to merge 1 commit into
mainfrom
fork-pr-53326-fix-workspace-state-no-dot-dir
Open

fix(workspace): store workspace-state.json in workspace root, not .openclaw/ subdir#1298
BingqingLyu wants to merge 1 commit into
mainfrom
fork-pr-53326-fix-workspace-state-no-dot-dir

Conversation

@BingqingLyu

@BingqingLyu BingqingLyu commented Apr 27, 2026

Copy link
Copy Markdown
Owner

Summary

  • Moves workspace-state.json from <workspace>/.openclaw/workspace-state.json to <workspace>/workspace-state.json
  • Removes the requirement to create a dot-prefixed subdirectory inside the workspace
  • Read falls back to the legacy .openclaw/ path for existing workspaces
  • Write always uses the new root path, no mkdir for .openclaw/ subdir

Why

Dot-prefixed directories fail on filesystems that reserve them — specifically TigerFS FUSE mounts, where . prefixes are reserved for built-in operations (.build/, .history/, .filter/, etc.). This blocks using TigerFS-mounted PostgreSQL as a workspace backend.

Also addresses the nested .openclaw/.openclaw/workspace/.openclaw/ path issue reported in openclaw#44783.

Changes

1 file, 11 insertions, 3 deletions:

  • resolveWorkspaceStatePath() → returns dir/workspace-state.json (was dir/.openclaw/workspace-state.json)
  • New resolveLegacyWorkspaceStatePath() for backward-compatible reads
  • readWorkspaceSetupStateForDir() tries new path first, falls back to legacy
  • writeWorkspaceSetupState() removes mkdir for .openclaw/ subdir (workspace root already exists)

Testing

Existing workspace tests should pass. Legacy workspaces with .openclaw/workspace-state.json are read correctly via fallback.

Closes openclaw#44783
Related: openclaw#39446 (cloud storage sync issues with .openclaw directory)

…enclaw/ subdir

Moves workspace-state.json from <workspace>/.openclaw/workspace-state.json
to <workspace>/workspace-state.json. This removes the requirement to create
a dot-prefixed subdirectory inside the workspace, which fails on filesystems
that reserve dot-prefixed paths (e.g., TigerFS FUSE mounts).

Read falls back to the legacy .openclaw/ path for existing workspaces.
Write always uses the new root path.

Closes openclaw#44783
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Workspace directory has unnecessarily nested path structure

2 participants