No programmatic way to rename a conversation mid-session
Problem
There is no programmatic way to rename a Claude Code conversation during a session. The only options are:
/rename— manual, requires the user to type itclaude -n "name"— CLI startup onlySessionStarthook →sessionTitle— fires once at session start, before any work happens
Once a session is running, there is no mechanism — hook output, tool call, API, or otherwise — that can rename the conversation.
Why this matters
Conversation names are most useful when they reflect what actually happened in the session, not what was planned at startup. Many sessions only get a meaningful name after work is done — e.g., after creating a merge request, a PR, a Jira ticket, or completing a specific task.
Today, users have to manually run /rename every time. If there were a programmatic rename capability, users could set up their own automation however they like — via hooks, CLAUDE.md instructions, skills, or plugins — to rename conversations based on what matters to them.
Suggested approach
Expose a way for hooks (or other extensibility points) to trigger a conversation rename mid-session. One natural option: allow PostToolUse hooks to return sessionTitle in their output (the same mechanism SessionStart hooks already support). But the specific implementation is up to the team — the key ask is that some programmatic path exists.
Example use case
A user creates GitHub PRs or GitLab MRs via an MCP tool (e.g. mcp__my_git_host__create_pull_request). They want the conversation automatically renamed to match the PR/MR title. Today they must manually /rename every time. With a programmatic rename, they could wire up a PostToolUse hook that extracts the title and sets it as the session name — no manual step needed.