Customizable terminal title with AI-generated activity summary
Feature Request
Problem
Claude Code sets the terminal title to a static * Claude Code string, which overwrites any shell-set title (e.g., hostname + cwd from a precmd hook). The only option is CLAUDE_CODE_DISABLE_TERMINAL_TITLE=1, which disables it entirely.
When running multiple Claude Code sessions across machines (e.g., local Mac + remote EC2 via tmux), there's no way to tell which session is which or what each is working on from the title bar alone.
Proposed Solution
A terminalTitleTemplate setting in settings.json that supports variables like:
{hostname}— machine hostname{cwd}— current working directory (basename or abbreviated){summary}— AI-generated 2-6 word summary of current activity (e.g., "fixing auth tests", "exploring codebase", "writing migration")
Example config:
{
"terminalTitleTemplate": "{hostname}:{cwd} — {summary}"
}
Would produce titles like:
Banshee:~/code/mldev — fixing OIDC authml-analytics:~/code/ccost — running pipeline tests
Why This Matters
- Users with multiple sessions across machines can instantly identify each tab/window
- The AI-generated summary adds real value over static labels — Claude already knows what it's doing
- Works naturally with iTerm2 tabs, tmux
set-titles, and other terminal multiplexers
Current Workaround
Disable Claude Code's title entirely via CLAUDE_CODE_DISABLE_TERMINAL_TITLE=1 and rely on shell precmd hooks for hostname + path. This loses any Claude-specific context in the title.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗