Allow setting VS Code terminal name to session name
Feature Request
Is your feature request related to a problem?
When running multiple Claude Code sessions in VS Code, all terminal tabs are named identically (e.g., "claude" or "Task - zsh"), making it difficult to distinguish between them. There's no way to tell which session is which without clicking into each terminal.
Describe the solution you'd like
Expose the Claude Code session identity as the VS Code terminal title. Specifically:
- Allow users to assign a human-readable session name (e.g., via a flag like
claude --name "refactor-auth"or an interactive prompt at session start). - Automatically set the VS Code integrated terminal title to that session name.
- As a fallback, use a short identifier (truncated session ID or auto-generated label) when no name is provided.
Alternatives considered
- SessionStart hook with ANSI escape sequences (
\033]0;title\007): VS Code's integrated terminal largely ignores these for its tab title. - Custom VS Code extension: Could poll for session metadata, but fragile and requires maintaining a separate extension.
- Manual terminal renaming: Works but is tedious and doesn't survive terminal restarts.
Additional context
The SessionStart hook already receives session_id in its JSON input, so the infrastructure for session identity partially exists. The gap is:
- Session IDs are UUIDs, not human-readable
- No mechanism to propagate a name to the VS Code terminal title
This would be especially useful for developers who run parallel Claude Code sessions for different tasks (e.g., one for frontend work, one for backend debugging).
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗