Include conversation history in generation inputs - #29
Open
DavidTraina wants to merge 1 commit into
Open
Conversation
DavidTraina
force-pushed
the
fix/generation-input-history
branch
from
August 18, 2026 19:19
3bcaca6 to
edb169b
Compare
DavidTraina
marked this pull request as ready for review
August 19, 2026 17:41
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Each generation's input previously contained only the messages since the previous generation, so opening a generation in Langfuse never showed the conversation the model actually received.
This change keeps a running per-session message history and records it as every generation's input:
session.idleflush, so generations in later turns include earlier turns.Scope notes:
Tested with
pnpm run test:integration: added a test asserting that a later turn's generation input contains the prior turn's user and assistant messages across an idle flush, and updated the existing multi-generation expectations to include the accumulated history.Addresses the conversation-history part of #24
Opening this as a draft since you mentioned wanting to compare behavior with the Claude and Codex plugins first — happy to adjust the approach to whatever direction you land on.