Re-inject turn completion instructions after LLM context reset

When filter_incomplete_user_turns is enabled and an LLMMessagesUpdateFrame
replaces the context via set_messages(), the turn completion instructions
system message was lost. This caused the LLM to stop emitting turn
completion markers. Re-inject the instructions after set_messages() to
fix this.
This commit is contained in:
Mark Backman
2026-03-01 16:30:49 -05:00
parent 024c62946f
commit 91c46ffbf4
3 changed files with 27 additions and 0 deletions

1
changelog/3888.fixed.md Normal file
View File

@@ -0,0 +1 @@
- Fixed turn completion instructions being lost when `LLMMessagesUpdateFrame` replaces the LLM context. When `filter_incomplete_user_turns` is enabled, the turn completion system message is now re-injected after context replacement.