[Feature Request] Option to use git branch name as the session title (desktop app has no way to automate this)
Summary
Add a way — ideally a setting — to have a session's title/name in the session list default to the current git branch name, particularly in the desktop app where there is no launch-time equivalent of claude -n.
Problem
When working in one repo across many sessions, the auto-generated titles converge on near-identical summaries (e.g. ten sessions all titled some variant of "PR review"). The branch name is usually the most meaningful identifier for what a session was about, but today getting it into the title requires manually typing /rename <branch> in every session.
The CLI can be worked around with a shell wrapper (claude -n "$(git branch --show-current)"), but the desktop app has no equivalent hook point: sessions are started from the UI, so there's nowhere to inject a name at launch.
Current state
/renameandclaude -nset a display name interactively/at launch — manual only.- The session picker shows the git branch as row metadata and supports Ctrl+B filtering, which helps but doesn't make titles scannable at a glance.
- The desktop session-management tooling (
set_session_title) explicitly cannot rename the current session, so the assistant can't be asked to do it either. - No settings.json option, hook output field, or env var influences title generation.
Suggested options (any one would solve it)
- A setting such as
sessionTitle: "branch"or a template, e.g.sessionTitleTemplate: "{branch}: {summary}", applied when a session starts inside a git repo. - Let
SessionStarthooks set the session name via an output field (generalizes beyond git; overlaps with #72404). - A desktop-app preference: "Use git branch as session name for new sessions."
Related
- #81338 (configurable auto-title style — style/length, not source)
- #72404 (programmatic rename via hook/tool — would enable this as a workaround)
---
_Filed on behalf of the user with Claude Code assistance._
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗