Skip to content

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

fix(read_rpc): break early on empty matches

Steven Enamakel3d29bae22750
diff --git a/src/openhuman/memory/read_rpc/chunks.rs b/src/openhuman/memory/read_rpc/chunks.rs
index 83f2eac985..874f1739cc 100644
--- a/src/openhuman/memory/read_rpc/chunks.rs
+++ b/src/openhuman/memory/read_rpc/chunks.rs
@@ -209,6 +209,9 @@ async fn token_and_details(
);
let mut matches: Option<Vec<ChunkListRow>> = None;
for token in tokens {
+ if matches.as_ref().is_some_and(Vec::is_empty) {
+ break;
+ }
let mut token_query = query.clone();
token_query.content_contains = Some(token.clone());
token_query.limit = None;