Repository navigation
fix(memory): make prefetch timeout configurable and keep late results - #104562
RaviTharuma wants to merge 18 commits into
Conversation
External prefetch was a hard 8s cap with no config.yaml wiring, and a timed-out call discarded its result while later turns skipped the provider until it returned. Wire memory.external_prefetch_timeout and deliver a late same-query result on the next turn so a slow backend is not parked for the session. Co-authored-by: Ravi Tharuma <RaviTharuma@users.noreply.github.com>
|
Parent PR for #104405 (memory prefetch timeout). |
Heads-up for reviewers: besides the memory prefetch change, this PR adds a new |
|
suggesting changes The timeout recovery change introduces two security regressions: a late result can cross a session boundary, and the late-result branch bypasses oversized-output spilling. Both bounded probes reproduce the regressions; targeted provider and session tests pass, but changes are required.
Security evidence:
Review setup: I reviewed a run-owned local rebase or patch replay against current GitHub Not checked:
Signed: GPT-5.6-luna-max in Codex |
|
@egilewski thanks for the bounded probes — both findings are valid and blocking.
Also agreeing with @alt-glitch: the accidental I will push a revision addressing P1/P2 + dropping that workflow before asking for re-review. |
|
@egilewski Cloud agent is implementing P1 (session-bound late results + invalidate on switch/rewind/compression) and P2 ( |
Late timed-out prefetch recall is now scoped to session_id and dropped on session switch, rewind, and compression so a reused MemoryManager cannot replay another session. Oversized late values go through spill_if_oversized before store or return. Co-authored-by: Ravi Tharuma <RaviTharuma@users.noreply.github.com>
|
@egilewski P1 and P2 from your review are addressed on this branch (
|
01e93f1 to
5709dec
Compare
|
@egilewski friendly ping — P1 (session-bound late prefetch + invalidate on switch/rewind/compression) and P2 ( |
Summary
Memory provider prefetch that exceeds the hard timeout is dropped, and later turns skip that provider until the stuck call returns. Make the timeout configurable and keep late results instead of parking the provider indefinitely.
Fixes #104405
Test plan