Show project/directory name as prefix in terminal tab title
Problem
When working with multiple Claude Code sessions across different projects, all terminal tabs look the same. Claude Code already sets the terminal title dynamically (with AI-generated context summaries), but there's no indication of which project a terminal belongs to.
For example, I might have Claude Code running in ~/code/support, ~/code/webapp, and ~/code/api simultaneously. All tabs show context like "Searching for emails" or "Editing CLAUDE.md" but I can't tell which project each tab is for without clicking into it.
Proposed Solution
Include the project/directory name as a prefix in the terminal title that Claude Code sets via OSC escape sequences.
Instead of:
Searching for emails
Show:
support - Searching for emails
The prefix could be derived from:
- The current working directory basename (simplest)
- A configurable
terminalTitlePrefixin.claude/settings.json(most flexible)
Configuration Example
// .claude/settings.json
{
"terminalTitlePrefix": "Parfinity Support"
}
If not configured, fall back to the directory basename.
Use Case
Anyone running Claude Code across multiple projects in parallel (common for developers managing several repos) would benefit from being able to visually distinguish terminals at a glance.
Related Issues
- #25789 (update title on
/rename) - complementary, focuses on session name - #25550 (conversation context in VS Code tab title) - related, VS Code specific
- #25307 (configurable state indicators) - related, focuses on state display
This issue has 8 comments on GitHub. Read the full discussion on GitHub ↗