-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Description
Preflight Checklist
- I have searched existing issues and this hasn't been reported yet
- This is a single bug report (please file separate reports for different bugs)
- I am using the latest version of Claude Code
What's Wrong?
Description
The CLAUDE_CODE_DISABLE_TERMINAL_TITLE environment variable does not prevent Claude Code from changing the terminal/tab title on Windows.
Environment
- Claude Code version: 2.0.76
- OS: Windows 11
- Terminal: Windows Terminal
- Shell: PowerShell 7.5.4
What Should Happen?
Expected Behaviour
Claude Code should not modify the terminal title when CLAUDE_CODE_DISABLE_TERMINAL_TITLE=1 is set.
Actual Behaviour
Claude Code ignores the environment variable and continues to set the terminal title.
Use Case
I want to set custom tab titles (e.g., project codes like "401", "003") to distinguish between multiple Claude Code sessions. The env var would allow PowerShell launcher functions to control the tab title instead of Claude overwriting it.
Workaround Attempted
Setting $Host.UI.RawUI.WindowTitle before launching Claude works momentarily, but Claude immediately overwrites it.
Error Messages/Logs
Steps to Reproduce
Steps to Reproduce
-
Set environment variable via any of these methods:
- User environment variable:
[Environment]::SetEnvironmentVariable('CLAUDE_CODE_DISABLE_TERMINAL_TITLE', '1', 'User') - PowerShell profile:
$env:CLAUDE_CODE_DISABLE_TERMINAL_TITLE = "1" - Claude Code settings.json:
"env": { "CLAUDE_CODE_DISABLE_TERMINAL_TITLE": "1" }
- User environment variable:
-
Restart terminal and launch Claude Code
-
Observe tab title changes to "claude" then "C:\WINDOWS\system32\cmd.exe"
Claude Model
Opus
Is this a regression?
No, this never worked
Last Working Version
No response
Claude Code Version
2.0.76 (Claude Code)
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
PowerShell
Additional Information
No response