[BUG] CLAUDE_CODE_DISABLE_TERMINAL_TITLE=1 still clears the title when exiting
Status Closed — not planned
Reported on v2.1.70
Maintainer reply None cached
Activity 7 comments · opened Mar 6, 2026 · closed Apr 3, 2026
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
I have CLAUDE_CODE_DISABLE_TERMINAL_TITLE=1 set in my environment. I correctly stops Claude from changing the terminal title while it is working. The title remains as I originally set it. But when exiting claude, the terminal title is cleared (empty string).
What Should Happen?
The terminal title should remain,.
Error Messages/Logs
Steps to Reproduce
% export CLAUDE_CODE_DISABLE_TERMINAL_TITLE=1
% echo -ne "\033]0;My New Window Title\007"
# The window title is now "My New Window Title"
% claude
⠸ Downloading Claude Code: 187.8MB/188.0MB
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Accessing workspace:
/Users/nbatchelder
Quick safety check: Is this a project you created or one you trust? (Like your own code, a well-known open source project, or work from your team). If not, take
a moment to review what's in this folder first.
Claude Code'll be able to read, edit, and execute files here.
Security guide
1. Yes, I trust this folder
❯ 2. No, exit ✔
Enter to confirm · Esc to cancel
%
# The terminal title is now empty.
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.70
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
iTerm2
Additional Information
_No response_
7 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
Those are not duplicates, they are about the variable not stopping the title changes.
BTW, the terminal title is reset for real Clause sessions where real work is done also. I showed exiting immediately above, but any session will do it.
Closing for now — inactive for too long. Please open a new issue if this is still relevant.
It is really obnoxious to close issues simply because YOU have not done anything with them. This is still a bug.
See #43349
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.