Skip to content

fix(sessions): no more Untitled sessions: summaries answer, cards fall back to the first message - #672

Merged
kh0pper merged 1 commit into
mainfrom
fix/session-titles
Oct 30, 2026
Merged

kh0pper merged 1 commit into
mainfrom
fix/session-titles

Conversation

@kh0pper

@kh0pper kh0pper commented Oct 30, 2026

Copy link
Copy Markdown
Owner

Session lists were filling up with "Untitled session". There were two causes.

1. Generated titles never arrived. Every session summary ended empty_output. completeText asked the local qwen3.6 model without turning thinking off, and the model spent the whole max_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. completeText now sends chat_template_kwargs: { enable_thinking: false } to a provider on our own boxes. It never sends it to a host: "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.js titles a card with its label, else its first message, but no caller passed firstMessage.

  • The reader: readFirstUserMessage(file) in perch/session-summary.js reads 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.
  • Where it's used: /roost rows (the Chat tab) and the project home's earlier sessions carry it. It's read only for an unnamed session.
  • Who sees it: both pages are behind the dashboard login and link to the session itself, which that viewer can already read in full.

Tests:

  • completeText turns thinking off for a local host and not for cloud.
  • readFirstUserMessage: briefings and [Dates] skipped, secret masked, missing file, no user message, the cap.
  • The project home shows the first message for an unnamed session and keeps the name of a named one.
  • Related files: 62/0. The perch, roost and router set (44 files): 1390/0. Hygiene OK.

https://claude.ai/code/session_01N9fXzvNy8rCEArj1y5p6fp

… 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
@kh0pper
kh0pper merged commit c23bbda into main Oct 30, 2026
4 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