Skip to content

Commit 20f3a59

Browse files
committed
fix(cli): wire sessions_dir() through SessionStore::from_cwd() (#41)
The CLI was using a flat cwd/.claw/sessions/ path without workspace fingerprinting, while SessionStore::from_cwd() adds a hash subdirectory. This mismatch meant the isolation machinery existed but wasn't actually used by the main session management codepath. Now sessions_dir() delegates to SessionStore::from_cwd(), ensuring all session operations use workspace-fingerprinted directories.
1 parent 28e6cc0 commit 20f3a59

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

  • rust/crates/rusty-claude-cli/src

rust/crates/rusty-claude-cli/src/main.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4305,9 +4305,9 @@ impl LiveCli {
43054305

43064306
fn sessions_dir() -> Result<PathBuf, Box<dyn std::error::Error>> {
43074307
let cwd = env::current_dir()?;
4308-
let path = cwd.join(".claw").join("sessions");
4309-
fs::create_dir_all(&path)?;
4310-
Ok(path)
4308+
let store = runtime::SessionStore::from_cwd(&cwd)
4309+
.map_err(|e| Box::new(e) as Box<dyn std::error::Error>)?;
4310+
Ok(store.sessions_dir().to_path_buf())
43114311
}
43124312

43134313
fn create_managed_session_handle(

0 commit comments

Comments
 (0)