Repository navigation
fix(sessions): no more Untitled sessions: summaries answer, cards fall back to the first message - #672
Merged
Conversation
… fall back to the first message
Every session summary ended empty_output: completeText asked the local
qwen3.6 model without turning thinking off, and it spent all 400 tokens
reasoning (usage rows: output 400 every time). So no session ever got its
generated title. completeText now sends chat_template_kwargs
{enable_thinking:false} to a provider on our own boxes (never to a cloud
endpoint, which may reject unknown fields).
Until a session has a name, its card now reads as its first operator
message, as session-cards.js always intended (nothing passed firstMessage):
readFirstUserMessage reads the transcript head (64 KB), skips the [Dates]
line and briefings, secret-masks, one line. Roost rows and the project
home's earlier sessions carry it, read only for an unnamed session.
Claude-Session: https://claude.ai/code/session_01N9fXzvNy8rCEArj1y5p6fp
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.
Session lists were filling up with "Untitled session". There were two causes.
1. Generated titles never arrived. Every session summary ended
empty_output.completeTextasked the local qwen3.6 model without turning thinking off, and the model spent the wholemax_tokens(400) reasoning: every background usage row shows exactly 400 output tokens. So the summary job, which also writes a title for an unnamed session, never wrote one.completeTextnow sendschat_template_kwargs: { enable_thinking: false }to a provider on our own boxes. It never sends it to ahost: "cloud"row, since a cloud endpoint may reject unknown fields. With the flag on, the same model answered a summary-plus-title prompt in 28 tokens.completeText's only caller is the session summary job.2. The first-message fallback was never wired.
session-cards.jstitles a card with its label, else its first message, but no caller passedfirstMessage.readFirstUserMessage(file)inperch/session-summary.jsreads the transcript head (64 KB). It returns the first operator message as one line (capped at 200; the card caps it at 80), skipping the[Dates]line and briefing blocks, with secrets masked./roostrows (the Chat tab) and the project home's earlier sessions carry it. It's read only for an unnamed session.Tests:
completeTextturns thinking off for a local host and not for cloud.readFirstUserMessage: briefings and[Dates]skipped, secret masked, missing file, no user message, the cap.https://claude.ai/code/session_01N9fXzvNy8rCEArj1y5p6fp