Skip to content

Read session titles from sessions-index.json#4

Merged
sestinj merged 2 commits intomainfrom
fix/session-titles-from-sessions-index
Feb 8, 2026
Merged

Read session titles from sessions-index.json#4
sestinj merged 2 commits intomainfrom
fix/session-titles-from-sessions-index

Conversation

@sestinj
Copy link
Owner

@sestinj sestinj commented Feb 8, 2026

Summary

  • Claude Code ≥2.1.30 stopped writing type: "summary" lines to JSONL transcripts, causing session titles in the dashboard to fall back to the first user message
  • The daemon now reads summaries from sessions-index.json (where Claude Code still stores them) and sends a title field in append/finalize requests
  • Companion backend changes in threader-internal accept the title field and use it as a fallback between JSONL summary lines (highest priority) and the first-user-message heuristic (lowest priority)

Test plan

  • cargo build passes
  • Companion PR in threader-internal adds backend support + tests
  • Manual test: start a Claude Code session, let it sync, verify dashboard shows the sessions-index.json summary instead of raw first user message
  • Backward compat: sessions with JSONL type: "summary" lines still use those (they take priority)

🤖 Generated with Claude Code


Continue Tasks: ✅ 7 no changes — View all

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>
@sestinj
Copy link
Owner Author

sestinj commented Feb 8, 2026

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>
@sestinj sestinj merged commit 8fa3af4 into main Feb 8, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant