Skip to content

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

fix(cache): handle missing cache directory gracefully

Steven Enamakel60725c4aaeb2
diff --git a/crates/openhuman-session/src/cache.rs b/crates/openhuman-session/src/cache.rs
index 84b3589673..90c8fb7e5a 100644
--- a/crates/openhuman-session/src/cache.rs
+++ b/crates/openhuman-session/src/cache.rs
@@ -274,6 +274,16 @@ impl CurrentUserCache {
if let Some((user, _)) = self.cached(&key) {
return Ok(self.with_result(&key, Some(user)));
}
+ // The caller we waited behind may have failed rather than
+ // succeeded — its failure is recorded under the same lock this
+ // caller just acquired. Recheck suppression before starting a
+ // second sequential request: without this, every waiter behind a
+ // failed first refresh redoes the same doomed call instead of
+ // observing the backoff window that call just opened, turning
+ // one outage into N serialized timeouts (#6318).
+ if let Some(error) = self.suppressed_error(&key) {
+ return Err(error);
+ }
}
let timeout = fetch_timeout();
match tokio::time::timeout(