Skip to content

feat: display user-renamed session titles#24

Merged
graydawnc merged 1 commit intomainfrom
feat/custom-title
Mar 31, 2026
Merged

feat: display user-renamed session titles#24
graydawnc merged 1 commit intomainfrom
feat/custom-title

Conversation

@graydawnc
Copy link
Copy Markdown
Collaborator

Summary

Show custom session titles set by users via /rename (Claude Code) or /title (Codex) in search results, recent sessions, and session detail views.

How it works

  • Claude Code: Sessions contain {"type":"custom-title","customTitle":"..."} records inline in the JSONL file. The parser now reads these and uses the last one as the session title.
  • Codex: Custom titles are stored externally in ~/.codex/session_index.jsonl as thread_name keyed by session UUID. The syncer loads this index once per sync and applies titles both during parsing (for new/updated sessions) and as a post-sync pass (for already-synced sessions whose JSONL mtime hasn't changed).
  • Fallback: Sessions without a custom title continue to use the first user message (truncated to 120 chars).

Files changed

  • packages/core/src/parsers/claude.ts — Parse custom-title records
  • packages/core/src/sync/syncer.ts — Load Codex session_index.jsonl and apply thread_name as title
  • packages/core/src/parsers/claude.test.ts — Tests for custom title parsing

Test plan

  • Existing core tests pass
  • New tests: default title, custom-title override, multiple renames (last wins)
  • Local verification: Claude Code renamed sessions show custom title
  • Local verification: Codex renamed sessions show custom title

🤖 Generated with Claude Code

Claude Code stores custom titles as `custom-title` records inline in
session JSONL files (via `/rename`). Codex stores them as `thread_name`
in `~/.codex/session_index.jsonl`.

Parse both sources and use the custom title when present, falling back
to the existing first-message excerpt.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@graydawnc graydawnc merged commit f3ded9a into main Mar 31, 2026
3 checks passed
@doodlewind doodlewind deleted the feat/custom-title branch April 7, 2026 09:47
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