Conversation
A summary compaction was always introduced to the model as `[Summary of previous conversation]`. That is only true when the summary opens the conversation. After `jp c compact --turn=18..38 --summary "..."`, the model read the marker as "everything above this was replaced", treated turns 1..17 as trimmed, and refused to quote text it demonstrably had in its context. A wire capture confirmed the earlier turns reached the API; adding "turns before and after this are still in your context" to the summary text alone made the model quote them verbatim. The synthetic request now says which part of the conversation the summary stands for: the earlier part, a middle part, the latest part, or the whole conversation so far, and states that the surrounding messages are still in the model's context. Conversations that already carry a summary see a new marker, costing one prompt-cache miss. With `JP_DEBUG=1`, the Anthropic subscription (ACP) route keeps the Claude Code transcript it writes for each request instead of deleting it, and logs its path. That file is the only record of what JP handed Claude Code, which the trace log cannot show on this route. Without `JP_DEBUG`, the path is logged at debug level and the file is removed as before. Kept transcripts are not cleaned up automatically. Signed-off-by: Jean Mertz <git@jeanmertz.com>
This branch has not been deployed
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.
A summary compaction was always introduced to the model as
[Summary of previous conversation]. That is only true when the summary opens the conversation. Afterjp c compact --turn=18..38 --summary "...", the model read the marker as "everything above this was replaced", treated turns 1..17 as trimmed, and refused to quote text it demonstrably had in its context. A wire capture confirmed the earlier turns reached the API; adding "turns before and after this are still in your context" to the summary text alone made the model quote them verbatim.The synthetic request now says which part of the conversation the summary stands for: the earlier part, a middle part, the latest part, or the whole conversation so far, and states that the surrounding messages are still in the model's context. Conversations that already carry a summary see a new marker, costing one prompt-cache miss.
With
JP_DEBUG=1, the Anthropic subscription (ACP) route keeps the Claude Code transcript it writes for each request instead of deleting it, and logs its path. That file is the only record of what JP handed Claude Code, which the trace log cannot show on this route. WithoutJP_DEBUG, the path is logged at debug level and the file is removed as before. Kept transcripts are not cleaned up automatically.