Skip to content

fix(terminal): title Claude Code and Cursor CLI cards after their conversation - #900

Merged
omartelo merged 1 commit into
mainfrom
fix/provider-session-titles
Oct 21, 2026
Merged

omartelo merged 1 commit into
mainfrom
fix/provider-session-titles

Conversation

@omartelo

Copy link
Copy Markdown
Collaborator

Summary

A survey of the session title across all eight providers found Claude Code and Codex cards no longer titled, Cursor CLI titleable, and Crush not reliably so. This PR fixes the lich side; the Codex and oh-my-pi fixes are in lichdotdev/lich-plugin.

  • Claude Code: a new session is spawned without --name. The flag marks the name as the user's (nameSource: "user"), and a session named that way never writes ai-title (measured on 2.1.306; no transcript on disk from 2.1.245 on holds both). Unnamed, Claude Code names itself <dir>-<2 chars>, distinct within one checkout (measured with three sessions in one directory), but writes that name only to ~/.claude/sessions/<pid>.json. So relay.RosterNameOf returns no second name for a Claude session with nothing on record, instead of a derived one its own roster never shows. A fork is still named, and a /rename is still honoured.
  • terminal.Start drops its name argument, which no caller used any more; native/lichclient moves with it.
  • open_session says "It answers to X." when there is no second name (new OpenedSessionLabelOnly, all seven locales).
  • Cursor CLI: the TUI files a generated title in the meta.json beside the chat's store.db; lich reads it on the stop report, alongside Kiro (title_kiro.go becomes title_filed.go).
  • Crush: the gap is written down in docs/ceilings.md and docs/hooks/session-title.md; the README provider table gains a "card names itself after the conversation" row in every language.

Tests changed because the contract did: Start no longer takes a caller's name, a new Claude session is unnamed, and a Claude peer with nothing recorded has no roster name.

Test plan

  • gofmt -l ., go vet ./..., go test ./... (backend)
  • native/: gofmt -l ., go vet ./..., go test ./...
  • cross-compile loop for linux, darwin, windows
  • Claude Code 2.1.306 measured with and without --name: ai-title only without, roster names distinct without
  • Cursor CLI 2026.10.16 measured: meta.json title within 4 s of the first prompt in the TUI

…versation

A new Claude Code session is spawned without --name: the flag marks the name
as the user's, and Claude Code then never writes the ai-title the card is
titled from (measured on 2.1.306). Left alone it names itself after its
directory and a random suffix, distinct within a checkout, but writes that
name nowhere lich reads, so lich publishes no second name for it until a
/rename or a fork puts one on record. terminal.Start loses its unused name
argument, and native/lichclient moves with it.

Cursor CLI files a generated title in the meta.json beside a chat's store.db;
lich reads it on the stop report, as it already did for Kiro (title_filed.go).
Crush's gap is written down.

Tests changed because the contract did: Start no longer takes a caller's name,
a new Claude session is unnamed, and a Claude peer with nothing recorded has
no roster name.
@omartelo
omartelo merged commit 45504dd into main Oct 21, 2026
7 checks passed
@omartelo
omartelo deleted the fix/provider-session-titles branch October 21, 2026 20:02
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