You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
MemoryFlushMiddleware flush blocks the conversation completion signal #2774
concatWith chains the flush strictly after the main response stream. Although subscribeOn(Schedulers.boundedElastic()) moves the flush work off the event-loop thread, it does not change the timing: the downstream onComplete signal is only emitted after flushMemories finishes, i.e. after:
reading MEMORY.md + today's daily ledger,
one additional LLM extraction call via model.stream(...),
writing the daily *.md file.
So every call's completion is delayed by an extra synchronous LLM round-trip, adding visible tail latency to every user turn (default FlushMode.ALWAYS).
Expected behaviour
The memory flush should be fully asynchronous/fire-and-forget w.r.t. the conversation stream — e.g. dispatched on a separate scheduler without being composed into the reply Flux (possibly bounded/rate-limited to avoid unbounded pending flushes), so the response completes independently of the flush.
Activity
chcodex commentedon Aug 19, 2026
@jujn @chickenlj
fix(harness): serialise memory flushes per isolation key and defer al…
fix(harness): make memory flush fire-and-forget to unblock conversati…