[GH-ISSUE #4728] [Issue]: Conversation mode edits are ignored by the model when the reply contained a character command #2596

Closed
opened 2026-10-21 05:50:59 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @NeoKazuya on GitHub (Aug 7, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/4728

Originally assigned to: @SpicyMarinara on GitHub.

Summary

In Conversation mode, editing a character's message has no effect on future prompts if that initial message's generation emitted a character command such as [schedule_update] or [selfie]. The UI, the database, and chat exports all show the edit, but every later model request still contains the original wording, permanently.

Expected behavior

After editing an assistant message, prompt history should send the edited text to the model. This already works in Roleplay mode and for Conversation messages that carried no command.

Actual behavior

Prompt history keeps sending the pre-edit text for the affected message. The stale text survives regeneration, swipes, and app restarts. Deleting a line through an edit only removes it from the visible chat. The deleted text still reaches the model in every later prompt.

Affected messages look identical to clean ones because commands are stripped before display, so some edits stick and others are silently ignored with no visible pattern.

Steps to reproduce

  1. Create a Conversation-mode chat with commands.
  2. Get a reply that emits a command.
  3. Edit any line of that reply and save.
  4. Keep chatting.

Expected: the character follows the edited text.

Actual: the character keeps referencing the original text. With a reasoning model, the thinking trace quotes the original wording directly, and Peek Prompt on the new reply shows the original text in its history. The same steps on a reply without a command work correctly.

Environment

  • Marinara Engine version: found on a 2.4.2 Docker install; root cause reproduced from source on current staging at 83595dc6a
  • Install type: Docker
  • OS + version: any
  • Browser or app shell: Not browser-specific; reproduced through the server storage layer and prompt formatting

Logs, screenshots, or video

original reply: "On my way. [selfie]"
edited to:      "Running late."

messages.content                 = "Running late."
extra.conversationCommandContent = "On my way. [selfie]"
prompt history sends             = "On my way. [selfie]"

Scanning every table of an affected install's data store for a phrase the character kept repeating found two rows, both in extra.conversationCommandContent (the message and its active swipe), with zero hits in any content column.

Additional context

Likely cause: when a reply contains commands, the raw pre-strip text is kept on the message in extra.conversationCommandContent so the command markers stay in the model-visible transcript. Conversation-mode prompt history prefers that field over the edited content unconditionally, and the edit path updates content and the active swipe but never touches the field. Nothing else clears it, so once it is set, edits to that message cannot reach the model.

The same path also affects prose-guardian rewrites: the rewrite runs after the field is persisted, so the model keeps seeing pre-rewrite prose on Conversation replies that contained a command.

Template check

Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • I DID NOT read this template and provide the requested details.
Originally created by @NeoKazuya on GitHub (Aug 7, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/4728 Originally assigned to: @SpicyMarinara on GitHub. ## Summary In Conversation mode, editing a character's message has no effect on future prompts if that initial message's generation emitted a character command such as `[schedule_update]` or `[selfie]`. The UI, the database, and chat exports all show the edit, but every later model request still contains the original wording, permanently. ## Expected behavior After editing an assistant message, prompt history should send the edited text to the model. This already works in Roleplay mode and for Conversation messages that carried no command. ## Actual behavior Prompt history keeps sending the pre-edit text for the affected message. The stale text survives regeneration, swipes, and app restarts. Deleting a line through an edit only removes it from the visible chat. The deleted text still reaches the model in every later prompt. Affected messages look identical to clean ones because commands are stripped before display, so some edits stick and others are silently ignored with no visible pattern. ## Steps to reproduce 1. Create a Conversation-mode chat with commands. 2. Get a reply that emits a command. 3. Edit any line of that reply and save. 4. Keep chatting. Expected: the character follows the edited text. Actual: the character keeps referencing the original text. With a reasoning model, the thinking trace quotes the original wording directly, and Peek Prompt on the new reply shows the original text in its history. The same steps on a reply without a command work correctly. ## Environment - Marinara Engine version: found on a `2.4.2` Docker install; root cause reproduced from source on current `staging` at `83595dc6a` - Install type: Docker - OS + version: any - Browser or app shell: Not browser-specific; reproduced through the server storage layer and prompt formatting ## Logs, screenshots, or video ```text original reply: "On my way. [selfie]" edited to: "Running late." messages.content = "Running late." extra.conversationCommandContent = "On my way. [selfie]" prompt history sends = "On my way. [selfie]" ``` Scanning every table of an affected install's data store for a phrase the character kept repeating found two rows, both in `extra.conversationCommandContent` (the message and its active swipe), with zero hits in any `content` column. ## Additional context Likely cause: when a reply contains commands, the raw pre-strip text is kept on the message in `extra.conversationCommandContent` so the command markers stay in the model-visible transcript. Conversation-mode prompt history prefers that field over the edited `content` unconditionally, and the edit path updates `content` and the active swipe but never touches the field. Nothing else clears it, so once it is set, edits to that message cannot reach the model. The same path also affects prose-guardian rewrites: the rewrite runs after the field is persisted, so the model keeps seeing pre-rewrite prose on Conversation replies that contained a command. ## Template check Please **uncheck (untick)** the box below before submitting so we know you read the template. It is intentionally pre-checked: - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-21 05:50:59 +07:00
Author
Owner

@SpicyMarinara commented on GitHub (Aug 7, 2026):

Good catch. Thank you so much for the PR, too!

<!-- gh-comment-id:5220899344 --> @SpicyMarinara commented on GitHub (Aug 7, 2026): Good catch. Thank you so much for the PR, too!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#2596
No description provided.