Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

fix: prevent pipe enabled state from syncing across devices

Louis Beaumont4599cc4f103f
diff --git a/crates/screenpipe-core/src/pipes/sync.rs b/crates/screenpipe-core/src/pipes/sync.rs
index 8c48a7c93..313b54c16 100644
--- a/crates/screenpipe-core/src/pipes/sync.rs
+++ b/crates/screenpipe-core/src/pipes/sync.rs
@@ -309,13 +309,23 @@ pub fn apply_manifest_to_disk(
// Force enabled: false for newly imported pipes
force_disabled(&synced.raw_content)
} else {
- // For updates, preserve device-local enabled override
+ // For updates, ALWAYS preserve the local enabled state.
+ // The enabled flag is device-local — syncing it across
+ // machines causes one device's toggle to flip others.
let local_overrides = load_local_overrides(pipes_dir);
- if let Some(&local_enabled) = local_overrides.get(name) {
- override_enabled(&synced.raw_content, local_enabled)
+ let local_enabled = if let Some(&ov) = local_overrides.get(name) {
+ ov
+ } else if pipe_md.exists() {
+ // No explicit override — read current enabled from disk
+ std::fs::read_to_string(&pipe_md)
+ .ok()
+ .and_then(|c| parse_frontmatter(&c).ok())
+ .map(|(cfg, _)| cfg.enabled)
+ .unwrap_or(false)
} else {
- synced.raw_content.clone()
- }
+ false
+ };
+ override_enabled(&synced.raw_content, local_enabled)
};
if let Err(e) = std::fs::write(&pipe_md, &content) {