Skip to content

Make Codex and Claude Code subscriptions go further: a local model router that gives routine agent work to economical models and keeps your strongest model for the hard parts.

fix(observation): skip directory fsync for managed text on Windows (#73)

Jason Cat4d91675b94ba
diff --git a/crates/observation/src/managed_text/storage.rs b/crates/observation/src/managed_text/storage.rs
index 7bb0e93d..02e91a1e 100644
--- a/crates/observation/src/managed_text/storage.rs
+++ b/crates/observation/src/managed_text/storage.rs
@@ -158,6 +158,10 @@ impl LocalObservationStore {
file.write_all(bytes)
.and_then(|()| file.sync_all())
.map_err(|_| ManagedTextError::Storage)?;
+ // Windows refuses to open a directory handle for fsync (access denied),
+ // while NTFS journals directory metadata itself. The chunk file above is
+ // still fsynced, so only the directory barrier is Unix-specific.
+ #[cfg(unix)]
fs::File::open(&self.blob_root)
.and_then(|dir| dir.sync_all())
.map_err(|_| ManagedTextError::Storage)?;