CLAUDE_CODE_RELAUNCH_TERMINAL_SIZE
Updated by Alex Sorokoletov
CLAUDE_CODE_RELAUNCH_TERMINAL_SIZE is a Claude Code environment variable: Restores the terminal size after a relaunch: when set to a value like 120x40 and output is a TTY, sets the terminal column and row counts if they are not already known. Added between v2.1.143 and v2.1.212 and still present in v2.1.318. It is not in the official reference.
| Status | Present in v2.1.318 |
|---|---|
| Added | Added between v2.1.143 and v2.1.212 |
| Category | Terminal and UI |
| Official docs | Not listed |
How to set it
For one session, export it in the shell that starts Claude Code:
export CLAUDE_CODE_RELAUNCH_TERMINAL_SIZE=<value>
claudeTo apply it to every session, add it to the env object of a settings file:
// ~/.claude/settings.json
{
"env": {
"CLAUDE_CODE_RELAUNCH_TERMINAL_SIZE": "<value>"
}
}Related variables
CLAUDE_CODE_DISABLE_TERMINAL_TITLE: Stop Claude Code from setting the terminal title.CLAUDE_CODE_FORCE_TERMINAL_IMAGESCLAUDE_CODE_RELAUNCH_PROACTIVITY_DECIDEDCLAUDE_CODE_TERMINAL_RECORDINGCLAUDE_AX_ANNOUNCEMENT_HOLD_MS: Milliseconds to hold a screen reader announcement when a hold is requested; defaults to 1000 and is capped at 10000.CLAUDE_AX_PREPARK_MSCLAUDE_AX_SCREEN_READERCLAUDE_AX_STARTUP_QUIET_MS: Startup quiet window (milliseconds) for screen-reader mode.
Frequently asked questions
What does CLAUDE_CODE_RELAUNCH_TERMINAL_SIZE do?
Restores the terminal size after a relaunch: when set to a value like 120x40 and output is a TTY, sets the terminal column and row counts if they are not already known.
Which Claude Code version has CLAUDE_CODE_RELAUNCH_TERMINAL_SIZE?
Added between v2.1.143 and v2.1.212 and still present in v2.1.318.
How do I set CLAUDE_CODE_RELAUNCH_TERMINAL_SIZE?
Export it before starting Claude Code (export CLAUDE_CODE_RELAUNCH_TERMINAL_SIZE=value), or add it to the "env" object in ~/.claude/settings.json to apply it to every session.
All variables, searchable: Claude Code environment variables.