Claude Terminal Name Sync
A VS Code extension that keeps your terminal tab name in sync with the Claude Code session running inside it.
How It Works
When you run claude in a VS Code terminal and then use /rename <name> inside the session, this extension detects the name change and retitles the terminal tab to match. No configuration needed.
Under the hood it watches ~/.claude/sessions/<pid>.json — the per-process state file Claude Code writes on startup and updates on every rename — and resolves each VS Code terminal to its Claude child process via the OS process tree.
Installation
Install the .vsix file directly in VS Code:
code --install-extension claude-terminal-name-sync-0.1.0.vsix
Or install from the Extensions view by choosing Install from VSIX....
Usage
- Open a terminal in VS Code.
- Run
claude.
- Inside the session, run
/rename my-task.
- The terminal tab updates to
my-task within milliseconds.
If you close the session and start a new one, the tab keeps its last name until renamed again (VS Code has no "unset custom name" API).
Configuration
| Setting |
Default |
Description |
claudeTerminalNameSync.fallbackToCwd |
false |
If a session has no name yet, use basename(cwd) instead of leaving the VS Code auto-name. |
Commands
- Claude Terminal Name Sync: Sync Now — manually trigger a reconciliation pass. Useful if a terminal rename appears to have been missed.
Development
npm install
npm run compile
Press F5 in VS Code to launch the Extension Development Host for testing.
To package:
npx vsce package
Requirements
- macOS or Linux (uses
ps for process-tree lookup; Windows untested)
- Claude Code CLI installed
License
MIT