[BUG] Terminal Title Overwrite Prevents Custom Title Setting
Resolved 💬 17 comments Opened Jul 30, 2025 by nigels-code Closed Apr 25, 2026
💡 Likely answer: A maintainer (claude[bot], contributor)
responded on this thread — see the highlighted reply below.
Environment
Claude Code running in terminal
- Claude CLI version: 1.0.62
- Operating System: MacOS 15.5
- Terminal: ghostty 1.1.3
Bug Description
In ~/.claude/settings.json I have the following:
{
"env": {
"CLAUDE_CODE_DISABLE_TERMINAL_TITLE": "1",
"CLAUDE_DISABLE_TITLE_UPDATES": "1"
}
}
In .zshrc I have the following:
# Show pwd as window title for ghostty
DISABLE_AUTO_TITLE="true"
precmd() { print -Pn "\e]0;%~\a" }
I would like to display the pwd in the title bar of my terminal (ghostty) when running Claude Code.
Steps to Reproduce
- Start terminal app (ghostty). The pwd appears in the title bar
- Start Claude at the terminal (using
claude) - The pwd in the title bar is replaced with
claude
Expected Behavior
The title bar keeps displaying the pwd
Actual Behavior
The title bar displays claude
Additional Context
I assumed the CLAUDE_CODE_DISABLE_TERMINAL_TITLE and CLAUDE_DISABLE_TITLE_UPDATES properties would prevent Claude Code from updating the title bar. Are these properties working properly?
17 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
The
CLAUDE_CODE_DISABLE_TERMINAL_TITLEproperty still doesn't work for me. My settings.json file looks like this:The title of my terminal is always changed to
cc, the alias I use to start Claude Code.Same for me. The property doesn't work for me. Claude Code says this is a bug.
this bug is still present in version 2.0.30
@nigels-code (may I suggest updating the issue title to be more descriptive it just says "[BUG]"
Maybe "[BUG] Terminal Title Overwrite Prevents Custom Title Setting"
Claude code sets the title to "claude" on launch even if this is set to disable it
"CLAUDE_CODE_DISABLE_TERMINAL_TITLE": "1",
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
Bug still present in v2.0.76
Environment:
Setting CLAUDE_CODE_DISABLE_TERMINAL_TITLE=1 in both ~/.claude/settings.json (env section) and shell profile (~/.zshrc) does not prevent terminal title changes. Claude Code still overwrites the terminal title on startup.
export CLAUDE_CODE_DISABLE_TERMINAL_TITLE=1Both methods confirmed the variable is set, but the behavior persists.
I managed to make this work (at least in Ghostty):
First tried on v2.1.6 but works through all versions including newest (currently v2.1.23)
Ghosty config:
Claude:
And in my .zshrc I have this:
+1 on this. The ability to disable terminal title updates is especially critical on Termux (Android), where title changes trigger a notification overlay that covers the input area at the bottom of the screen, making the terminal difficult to use.
Related issue with Termux-specific context: #21677
Adding my voice to this issue. I'm experiencing the same problem on Windows.
Environment:
"env": { "CLAUDE_CODE_DISABLE_TERMINAL_TITLE": "1" }Issue:
The environment variable is completely ignored. Claude Code continues to change my terminal window title to "claude" regardless of the setting.
Impact:
I need custom window titles to distinguish between multiple terminal sessions. Setting the title before launching Claude Code doesn't work either - Claude immediately overwrites it.
Please prioritize fixing this on Windows. The environment variable exists but has no effect.
Still not working in 2.1.59 on windows 11 command line
Still broken as of the latest version. I tried several workarounds:
export CLAUDE_CODE_DISABLE_TERMINAL_TITLE=1in~/.zshrc— no effect~/.claude/settings.jsonunder"env"— no effectSessionStarthook to reset the title viaprintf '\e]0;...\a'— the hook fires successfully but Claude Code overrides the title again afterwardsleep 2delay in the hook before setting the title — still overriddenClaude Code appears to set the terminal title on an ongoing basis, not just once at startup, so even delayed hooks can't win the race. My zsh
precmdhook (which sets the title to the current directory name) also gets overridden.Would love to see
CLAUDE_CODE_DISABLE_TERMINAL_TITLEactually respected. macOS, iTerm2.This is still reproducible in Claude Code version 2.1.76 (Windows).
Version Check:
claude --version
2.1.76 (Claude Code)
Command Attempted:
[Environment]::SetEnvironmentVariable('CLAUDE_CODE_DISABLE_TERMINAL_TITLE', '1', 'User')
Please fix this
I'd previously experienced this issue. This is now fixed/working for me using claude-code 2.1.88 on linux. In the changelog for 2.1.79 I can see a claimed fix:
## 2.1.79
...
CLAUDE_CODE_DISABLE_TERMINAL_TITLEnot preventing terminal title from being set on startupIn my ~/.claude/settings.json I have added:
"env": {
"CLAUDE_CODE_DISABLE_TERMINAL_TITLE": "1"
}
And it is successfully preventing auto setting of the terminal title by claude code, both on session startup and during the session.
With the above config in place, I am now able to set custom terminal titles via claude hooks, and my custom titles are no longer being overridden by claude's builtin terminal title functionality.
For iterm2, iTerm2 → Preferences -> Profiles -> General -> Title
Disable option "Applications in terminal may change the title", this works for me.
This issue was fixed as of version 2.1.79.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.