Skip to content

last-prompt-title: session titles that follow your latest prompt - #62

Closed
zhangbububu wants to merge 1 commit into
hamzafer:mainfrom
zhangbububu:add-last-prompt-title
Closed

zhangbububu wants to merge 1 commit into
hamzafer:mainfrom
zhangbububu:add-last-prompt-title

Conversation

@zhangbububu

Copy link
Copy Markdown

What changed

New mod: last-prompt-title. It retitles the session on every prompt, so the title says what the session is doing now, not what it started as.

last-prompt-title demo

  • The CLI title becomes the prompt on one line, cut to 60 characters, at once
  • On the desktop app, the sidebar title then becomes a short title Haiku writes from that prompt ($.model.complete, effort: low, 64 tokens max, 15 s timeout), set through ccd_session_mgmt without holding up the turn. No answer: the sidebar gets the cut prompt
  • Only typed prompts count: slash commands, empty prompts and injected turns leave the title alone
  • Prompts sent quickly in a row: only the latest one's title lands
  • session-saver names only untitled sessions, so with both on it leaves the title to this one

Also adds images/last-prompt-title.svg (a CSS-animated demo, about 7 KB) and uses it in docs/mods.md.

Developed and used daily on Claude Code 2.1.289. It also lives in its own marketplace at zhangbububu/session-titles.

Checklist

  • claude plugin validate mods/<name> passes
  • claude plugin test mods/<name> passes
  • Changed a mod: version bumped in its plugin.json and in .claude-plugin/marketplace.json (n/a, new mod)
  • New mod: entry in .claude-plugin/marketplace.json
  • New mod: README table row and docs/mods.md notes

@zhangbububu

Copy link
Copy Markdown
Author

Hi @hamzafer, would you have a moment to review this? It's a new mod. The CI checks haven't run yet, since this is my first PR here. Happy to change anything. Thanks!

@hamzafer
hamzafer requested review from hamzafer and a balanced review from Copilot October 9, 2026 08:56

This comment was marked as low quality.

@hamzafer

Copy link
Copy Markdown
Owner

Thanks a lot for this, and sorry for the wait. It's a neat idea, and the code is clean: tests pass and nothing in it worried us on review.

We're keeping this repo to mods we maintain ourselves, and last-prompt-title overlaps with session-saver here. Since it already lives in your own marketplace, we linked it instead: it's the first entry in the new Community mods section of the README (#73), with your install command and credit.

A few notes from the review, in case they help in your repo:

  • Each prompt fires its own Haiku call right away, and only the latest reply lands. That's fine on cost, but it's "latest wins" rather than a debounce, so the wording could say that.
  • The prompt itself becomes the title, so text pasted at the start of a prompt (a token, say) shows in the sidebar and /resume. Worth a line in the README.
  • ccd_session_mgmt isn't documented and could change in a desktop update. The fallback to the cut title already handles that well.

If you'd like the row's wording changed, a PR is welcome. Thanks again!

@hamzafer hamzafer closed this Oct 11, 2026
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.

3 participants