[BUG] CLAUDE_CODE_DISABLE_TERMINAL_TITLE=1 still clears the title when exiting
Resolved 💬 7 comments Opened Mar 6, 2026 by nedbat 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_
This issue has 7 comments on GitHub. Read the full discussion on GitHub ↗