[FEATURE] Customizable Terminal Title
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
Summary
Allow users to customize the terminal title format and expose conversation summary to hooks, enabling differentiation of multiple Claude Code instances.
Problem
When running multiple Claude Code sessions in the same directory, there's no reliable way to distinguish between them in terminal tabs/windows.
Current limitations:
- Auto-title is all-or-nothing -
CLAUDE_CODE_DISABLE_TERMINAL_TITLE=1disables it entirely, but there's no way to augment or customize it - Summaries not exposed to hooks - Claude generates intelligent conversation summaries internally (visible in
--resumemenu), but this data isn't available to hooks - Summaries only on resume - Summaries are written to transcript only when resuming/clearing, not during active conversation
- No cwd in title - The auto-title doesn't include working directory, making tabs indistinguishable when working on the same project
Current Workaround
Disable auto-title and use a custom hook that parses the transcript file:
# SessionStart/Stop hook
context=$(tail -200 "$transcript_path" | grep '"type":"summary"' | tail -1 | jq -r '.summary')
printf '\x1b]0;🤖 %s: %s\x1b\\' "$(basename "$cwd")" "$context"
Problems with this approach:
- Summary entries are rare (~1% of responses have them)
- Falls back to user message which may be tool results, not actual prompts
- Misses Claude's internal summarization logic
Environment
- Claude Code version: 1.0.31+
- Terminal: Ghostty, iTerm2, tmux, etc.
- OS: macOS, Linux
Proposed Solution
Option A: Customizable Title Template
Add a terminalTitleFormat setting with variable interpolation:
{
"terminalTitleFormat": "🤖 {dirname}: {summary|truncate:50}"
}
Available variables:
{dirname}- basename of cwd{cwd}- full working directory{summary}- conversation summary (current auto-title content){session_id}- session identifier (first 6-8 chars){mode}- permission mode (plan, default, etc.)
Option B: Expose Title to Hooks
Add title-related data to hook input JSON:
{
"session_id": "abc123",
"transcript_path": "...",
"cwd": "/path/to/project",
"title": {
"summary": "Implementing terminal title customization",
"auto_title": "🤖 Implementing terminal title customization"
}
}
This lets users build custom titles while leveraging Claude's summarization.
Option C: Title-Specific Hook
Add a PreTitleUpdate hook that runs before title is set:
{
"hooks": {
"PreTitleUpdate": [
{
"hooks": [
{
"type": "command",
"command": "~/.claude/hooks/title.sh"
}
]
}
]
}
}
Hook can modify the title by returning JSON:
{
"title": "🤖 myproject: {summary}"
}
Alternative Solutions
_No response_
Priority
Medium - Would be very helpful
Feature Category
Configuration and settings
Use Case Example
Use Cases
- Multiple sessions in same project - Differentiate by conversation topic
- Quick project identification - See cwd at a glance in tab bar
- Status indication - Show mode (plan/default) or activity state
- Integration with tools - Terminal multiplexers, window managers, tab organizers
Additional Context
I manage multiple Claude Code instances need visual differentiation. The --resume menu already shows summaries, indicating this data exists internally - just needs to be exposed.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗