[BUG] JetBrains "Claude Code" icon launches terminal with wrong PTY size (stuck at default 80x24)
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?
Launching Claude Code via the "Claude Code" icon in the IntelliJ terminal tool window opens a terminal and starts claude automatically, but the resulting TUI only renders into the upper-left corner of the pane — as if the terminal is much smaller than it actually is. I am using the "Claude Code [Beta]" Intellij plugin (version 0.1.14-beta). Note that I am using JetBrains Toolbox (in MacOS) to remotely access a project via ssh on a linux system.
What Should Happen?
I would expect Claude Code to occupy the entire Intellij terminal.
Error Messages/Logs
N/A
Steps to Reproduce
- In my case, I am running JetBrains Toolbox. It uses ssh to connect to a linux system to edit a project there. I don't know if remote editing is a factor in this problem.
- Ensure Claude Code Intellij plugin is install (I'm using version 0.1.14-beta, the latest at time of filing).
- Click on "Claude Code" icon in Intellij.
- A terminal opens, and Claude Code starts.
- Observe that Claude Code is only occupying 80 columns and 24 rows of the terminal (which is much larger).
If start Claude Code manually (by typing "claude") in an Intellj terminal, this problem does not happen.
If I exit Claude Code and return to the shell. "stty size" tells me I have 80 columns and 24 rows. If I set the number of rows and columns to different values and start claude, it occupies the number of rows and columns I have specified.
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.210
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
IntelliJ IDEA terminal
Additional Information
<img width="934" height="788" alt="Image" src="https://github.com/user-attachments/assets/54339845-0ec3-4280-afcf-c6008706133e" />
Diagnosis
- Opening a terminal tab manually and running
claudeby hand works correctly —
sizing and resizing both behave properly.
- In the broken (icon-launched) session,
stty sizereports24 80(the OS/PTY
default), regardless of the real terminal pane size, and does not update on resize.
- Exiting to the shell in that same broken session and manually running
stty rows <N> cols <M> (matching the real pane size), then relaunching claude,
fixes the rendering completely.
This shows Claude Code's TUI correctly reads and reacts to the PTY winsize — the bug
is that the icon's launch path creates/attaches the terminal without ever setting the
correct initial winsize (and without delivering a resize event afterward), unlike a
manually-opened terminal tab.
Environment
- IntelliJ IDEA (version: IntelliJ IDEA 2026.1.4)
- Claude Code plugin version: 0.1.14-beta
- OS: Linux
Workaround
Open a terminal tab manually and run claude instead of using the icon.