fix: add prompt caching to session compaction - Issue #10342#10380
fix: add prompt caching to session compaction - Issue #10342#10380Luckybalabala wants to merge 1 commit intoanomalyco:devfrom
Conversation
|
The following comment was made by an LLM, it may be inaccurate: Based on my search, I found related PRs that touch on session compaction, but none appear to be direct duplicates of PR #10380: Related but not duplicates:
Conclusion: |
9859412 to
7ff669a
Compare
7ff669a to
73f68a1
Compare
00637c0 to
71e0ba2
Compare
f1ae801 to
08fa7f7
Compare
|
Closing this pull request because it has had no updates for more than 60 days. If you plan to continue working on it, feel free to reopen or open a new PR. |
Problem
Session compaction sent an empty
system: []array, missing the ~90% cost savings from prompt caching.Solution
Added system prompts to compaction processor:
Impact
Technical Details
The
SystemPrompt.environment()andSystemPrompt.custom()methods return prompts that support Claude's prompt caching feature:Testing
Fixes #10342 - Major cost optimization for long sessions