You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Saving a session fails when the state root is a junction on Windows #7098
Saving a session fails outright on Windows when the Codewhale state root is
relocated to another volume — the supported way to keep ~/.codewhale off the
system drive. Nothing is written, no conversation is kept, and the only signal
is a red "cannot save session" notice.
Same behaviour with any volume the state root is relocated to.
Steps to reproduce
Relocate the state root with a directory junction as above.
Run any session that persists: codewhale exec --auto "Run: echo hello", or
an interactive session's autosave / /save.
Observe the red "cannot save session" notice, and the log.
Expected
The session document is written under the junction target
(sessions/<id>.json), as it is on a non-relocated install.
Actual
No session document is written. logs/tui-*.log records one line per attempt:
WARN persistence: persistence write failed what=session:<id>
error_kind=InvalidInput
error=Fleet artifact path must stay within the workspace
The failure is not in the write itself. SessionManager::save_session_inner
hydrates approval receipts before it serializes the document, and ApprovalReceiptStore::log_file opens <sessions>/<id>/approval_receipts.jsonl through the strictly confined WorkspaceFile::open. On Windows that opener walks the path component by
component and refuses any reparse point — including the junction that is the
state root — so the save dies before reaching the write_atomic call that would
have written the document.
open_resolved_root exists for exactly this case (added in #6947; #6949 made
the same distinction for sub-agent state): it resolves the root once, then runs
the same link-refusing walk below it. The session-side state opens were never
converted to it.
Evidence
With the reported layout, the built binary from the fixing branch:
codewhale exec --auto "Run the shell command: echo CWJUNCTION_OK" → exit 0,
wrote sessions/cf02b940-8436-4289-b16b-756d7a516228.json (58,986 bytes)
through the junction.
The same layout on the 0.10.2 release binary produced the warning above and no
document.
Same class of failure as #6947 (session artifacts) and #6949 (sub-agent state):
a user-owned relocated root treated as if it were an untrusted workspace root.
Activity