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 server shutdown when vision/audio disabled (E2E fix)

Louis Beaumont8aaec81e5b3e
diff --git a/crates/screenpipe-server/src/bin/screenpipe-server.rs b/crates/screenpipe-server/src/bin/screenpipe-server.rs
index 811f427a0..b58b6701f 100644
--- a/crates/screenpipe-server/src/bin/screenpipe-server.rs
+++ b/crates/screenpipe-server/src/bin/screenpipe-server.rs
@@ -744,8 +744,9 @@ async fn main() -> anyhow::Result<()> {
});
(h, Some(trigger_tx))
} else {
- // Vision disabled — spawn a no-op task so `handle` always exists
- (tokio::spawn(async {}), None)
+ // Vision disabled — spawn a pending task so `handle` never completes
+ // (otherwise the no-op future wins the tokio::select! race and shuts down the server)
+ (tokio::spawn(std::future::pending::<()>()), None)
};
let local_data_dir_clone_2 = local_data_dir_clone.clone();