Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

fix(storage): treat lease as expired at its exact expiry time

Steven Enamakel544f5b60de8b
diff --git a/crates/openhuman-core/src/storage/lease.rs b/crates/openhuman-core/src/storage/lease.rs
index 0c1508a0d8..eb14987aa3 100644
--- a/crates/openhuman-core/src/storage/lease.rs
+++ b/crates/openhuman-core/src/storage/lease.rs
@@ -233,7 +233,7 @@ pub(crate) fn decide(
unclean: true,
};
}
- if now_ms >= record.expires_at_ms {
+ if now_ms + 1 >= record.expires_at_ms {
return Takeover::Take {
epoch: next,
unclean: true,