Expand description
Per-session workspace-mode state: which repo a roaming/detached Claude Code
session is currently bound to. Persisted outside any repo so it survives a
session that changes directories. Set by tracevault repo switch
(sub-plan B); read by stream/commands as a resolution fallback.
Structs§
- Repo
Binding - A resolved binding to a registered repo.
- Session
State - Session-level active binding plus per-worktree subagent overrides (keyed by the subagent’s git worktree toplevel path — design §7).
Functions§
- load
- Load a session’s state, returning the default (empty) state if the file is absent or malformed (workspace state is best-effort, never fatal).
- save
- Persist a session’s state, creating the state dir if needed.
- sessions_
dir $XDG_STATE_HOME/tracevault/sessionsor~/.local/state/tracevault/sessions.