Read session titles from sessions-index.json#4
Merged
Conversation
Claude Code ≥2.1.30 stopped writing type:"summary" lines to JSONL transcripts but still stores summaries in sessions-index.json. Read the summary from there and send it as a title field in append/finalize requests so the backend can use it instead of falling back to the first user message. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Owner
Author
1. Cache session summaries to avoid repeated disk I/O The read_session_summary function was being called on every append and finalize upload, reading and parsing sessions-index.json each time. Since the daemon polls active sessions every 5 seconds and uploads every 10 seconds, this could result in many redundant disk reads. Add a static cache that stores summaries per session_id. Since session summaries don't change once set, the cache never needs invalidation. Generated with [Continue](https://continue.dev) Co-Authored-By: Continue <noreply@continue.dev> Co-authored-by: nate <nate+staging@continue.dev> 2. Add max size limit to session summary cache Clear the cache when it reaches 500 entries to prevent unbounded memory growth in long-running daemon instances. Generated with [Continue](https://continue.dev) Co-Authored-By: Continue <noreply@continue.dev> Co-authored-by: nate <nate+staging@continue.dev>
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.
Summary
type: "summary"lines to JSONL transcripts, causing session titles in the dashboard to fall back to the first user messagesessions-index.json(where Claude Code still stores them) and sends atitlefield in append/finalize requeststitlefield and use it as a fallback between JSONL summary lines (highest priority) and the first-user-message heuristic (lowest priority)Test plan
cargo buildpassestype: "summary"lines still use those (they take priority)🤖 Generated with Claude Code
Continue Tasks: ✅ 7 no changes — View all