[GH-ISSUE #429] [Feature]: Lorebook Keeper 'Update' should update previous content instead of destruction #185

Closed
opened 2026-10-20 17:26:00 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @kevin-ho on GitHub (May 5, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/429

Originally assigned to: @SpicyMarinara on GitHub.

What problem does this solve?

Users can spend a lot of time making detailed lorebook entries only for the Lorebook Keeper come in and obliterate the entry to replace it with its own text upon an "Update".

The agent prompt specifies to 'merge' old content with the new, but the LLM can't follow the instruction.

Cause

When the Update happens, the LLM receives receives:

  • Entry name
  • Entry Keys
  • Locked Status

But not the actual content of the lorebook entry. It can't merge without knowing the old content, and any update is destructive.

Proposed solution

  1. Inject full entry content into <existing_entries> — change loadLorebookKeeperExistingEntries() to include content and have the executor render it. This is the cheaper fix but still relies on the LLM to faithfully reproduce content (which is unreliable for long entries).
  2. Restructure the output format — instead of content: "full merged text", use something like newFacts: ["fact 1", "fact 2"] and have persistLorebookKeeperUpdates() append them to the existing entry rather than replacing. This is the "structured extraction, deterministic merge" pattern.

Alternative solution

Character Evolution Editor agent has a nice workflow to get user approval before making changes to character cards. The same could work for lorebook agent entries.

Template check

  • [] I DID NOT read this template and provide the requested details.
Originally created by @kevin-ho on GitHub (May 5, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/429 Originally assigned to: @SpicyMarinara on GitHub. ## What problem does this solve? Users can spend a lot of time making detailed lorebook entries only for the Lorebook Keeper come in and obliterate the entry to replace it with its own text upon an "Update". The agent prompt specifies to 'merge' old content with the new, but the LLM can't follow the instruction. ## Cause When the Update happens, the LLM receives receives: - Entry name - Entry Keys - Locked Status But not the actual content of the lorebook entry. It can't merge without knowing the old content, and any update is destructive. ## Proposed solution 1. Inject full entry content into <existing_entries> — change loadLorebookKeeperExistingEntries() to include content and have the executor render it. This is the cheaper fix but still relies on the LLM to faithfully reproduce content (which is unreliable for long entries). 2. Restructure the output format — instead of content: "full merged text", use something like newFacts: ["fact 1", "fact 2"] and have persistLorebookKeeperUpdates() append them to the existing entry rather than replacing. This is the "structured extraction, deterministic merge" pattern. ## Alternative solution Character Evolution Editor agent has a nice workflow to get user approval before making changes to character cards. The same could work for lorebook agent entries. ## Template check - [] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-20 17:26:00 +07:00
Author
Owner

@SpicyMarinara commented on GitHub (May 5, 2026):

Added.

<!-- gh-comment-id:4378285157 --> @SpicyMarinara commented on GitHub (May 5, 2026): Added.
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#185
No description provided.