mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-11 05:24:32 +00:00
feat(agents): flush reply pipeline before compaction wait (#35489)
Merged via squash.
Prepared head SHA: 7dbbcc510b
Co-authored-by: Sid-Qin <201593046+Sid-Qin@users.noreply.github.com>
Co-authored-by: jalehman <550978+jalehman@users.noreply.github.com>
Reviewed-by: @jalehman
This commit is contained in:
@@ -73,6 +73,11 @@ export function handleAgentEnd(ctx: EmbeddedPiSubscribeContext) {
|
||||
}
|
||||
|
||||
ctx.flushBlockReplyBuffer();
|
||||
// Flush the reply pipeline so the response reaches the channel before
|
||||
// compaction wait blocks the run. This mirrors the pattern used by
|
||||
// handleToolExecutionStart and ensures delivery is not held hostage to
|
||||
// long-running compaction (#35074).
|
||||
void ctx.params.onBlockReplyFlush?.();
|
||||
|
||||
ctx.state.blockState.thinking = false;
|
||||
ctx.state.blockState.final = false;
|
||||
|
||||
Reference in New Issue
Block a user