Skip to content

[BUG] CLAUDE_CODE_DISABLE_TERMINAL_TITLE environment variable not working on Windows (v2.0.76) #16572

@mhafeezhq-dot

Description

@mhafeezhq-dot

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

  1. 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" }
  2. Restart terminal and launch Claude Code

  3. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:tuibugSomething isn't workinghas reproHas detailed reproduction stepsplatform:windowsIssue specifically occurs on Windows

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions