mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #1392] Web app: an assistant reply with no content is dropped from the conversation history (reasoning models repeat themselves) #564
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#564
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @demetree on GitHub (Oct 7, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/1392
What happens
An assistant reply with no
contentis silently removed from the conversation history the next request sends, sothe model is asked the new question with no record of the turn that is still visible in the chat. On a reasoning
model the effect is the model re-opening the same reasoning, which reads as the answer repeating itself
(
Hi Hi hi Fib Fib…) instead of continuing.Where
serve/web/app.js,assistantMessages():m.textis built only fromdelta.content(line 831);delta.reasoning_contentgoes tom.reasoning(line 825).So whenever a turn ends before its first content token,
m.textis""and the[]branch drops the whole turn.apiMessages()(line 721) then emits two consecutive user messages - or a user message with no assistant turn aboveit at all.
Steps to see it
Thinkingon.only the reasoning.
The follow-up is sent without that turn. Compare with the same conversation where you let the reply finish: the
history keeps the assistant turn and the follow-up continues from it.
The same happens without pressing Stop whenever a turn ends with no content - for example a request that hits the
context or
max_tokenslimit during thinking. Through the API the same state is visible directly: the responsecomes back as
{"content": null, "reasoning_content": "..."}withfinish_reason: "length", and the web app storesexactly that turn as empty.
Expected
A turn the user can see in the chat is not silently dropped from the history. Either keep the assistant turn (with
its reasoning, or with an explicit marker that it was empty), or say why it cannot be sent back.
Notes
m.reasoningis never sent back either, which is fine on its own for a model that puts everything incontent,but it means a reasoning-only turn has nothing at all to contribute to the next request.
ran.lengthbranch) already handles empty text, so this is specific to the no-tools case.@Niko1221 commented on GitHub (Oct 7, 2026):
Thanks demetree, good catch. The web app left out an assistant turn with no answer text (reasoning only, or one that ended before its first content token), so the history it sent lost that turn. Fixed in 0.1.40.3: such a turn is now sent back as an assistant message with empty content (and its reasoning_content), and the history keeps alternating user and assistant. Note that the server itself leaves completed empty assistant turns out of the rendered prompt (#843), so a prompt from an API client is unchanged by this.