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.
This commit is contained in:
YeonGyu-Kim
2026-04-07 16:03:44 +09:00
parent 28e6cc0965
commit 20f3a5932a

View File

@@ -4305,9 +4305,9 @@ impl LiveCli {
fn sessions_dir() -> Result<PathBuf, Box<dyn std::error::Error>> { fn sessions_dir() -> Result<PathBuf, Box<dyn std::error::Error>> {
let cwd = env::current_dir()?; let cwd = env::current_dir()?;
let path = cwd.join(".claw").join("sessions"); let store = runtime::SessionStore::from_cwd(&cwd)
fs::create_dir_all(&path)?; .map_err(|e| Box::new(e) as Box<dyn std::error::Error>)?;
Ok(path) Ok(store.sessions_dir().to_path_buf())
} }
fn create_managed_session_handle( fn create_managed_session_handle(