MemoryManager prefetch with timeout #743

Closed
opened 2026-10-27 13:37:34 +00:00 by sam · 0 comments
Owner

Implement prefetch in MemoryManager with an 8-second default timeout. If a provider's prefetch is still running from the previous turn, skip it rather than queue another. This prevents memory lookups from blocking the agent loop.

Acceptance Criteria

prefetch(ctx, query) accepts a context with configurable timeout (default 8s)
If a provider is still prefetching from the previous turn, the new prefetch is skipped (not queued)
A provider-level mutex or state flag tracks in-flight prefetch operations
Timeout causes context cancellation which the provider should respect
Results from prefetch are stored for retrieval in system_prompt_block()
Metrics/logging track prefetch duration, timeouts, and skips


Imported from beads archie-core-1786637495499-218-2db0c621 · GitHub #239 · type task · priority P2 · created 2026-08-08 · closed 2026-08-08

Implement prefetch in MemoryManager with an 8-second default timeout. If a provider's prefetch is still running from the previous turn, skip it rather than queue another. This prevents memory lookups from blocking the agent loop. ### Acceptance Criteria prefetch(ctx, query) accepts a context with configurable timeout (default 8s) If a provider is still prefetching from the previous turn, the new prefetch is skipped (not queued) A provider-level mutex or state flag tracks in-flight prefetch operations Timeout causes context cancellation which the provider should respect Results from prefetch are stored for retrieval in system_prompt_block() Metrics/logging track prefetch duration, timeouts, and skips --- _Imported from beads `archie-core-1786637495499-218-2db0c621` · GitHub #239 · type task · priority P2 · created 2026-08-08 · closed 2026-08-08_
sam added the mediumtask labels 2026-10-27 13:37:34 +00:00
sam self-assigned this 2026-10-27 13:37:34 +00:00
sam closed this issue 2026-10-27 13:37:34 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sam/archie#743