SSM and xterm issues with zsh
- Dominant language
- Go
- Stars
- 1.2k
- Forks
- 357
- PR merge metrics
- No merged PRs in 30d
Description
I have spent quite some time today trying to figure out why my tmux sessions look perfectly fine via SSH compared to when I'm connected to a server via SSM.
For example:

This happens with _any_ command that has a pretty extensive output.
As you can see, the tmux panes bleed over. I figured out that it was due to the `TERM` environment variable. From the SSH session, it was set to `xterm-256color` and it worked just fine. From the prompt (after connecting via SSM), it was also the same but the tmux session was different.
When I changed this value to `ansi` it fixed my problem.
However, I'm now having the same issue in docker and I can't set the TERM to `ansi` because of some other issues. Not sure if there's anything I can "configure" per se, but just wanted to check to see if there's another way I could resolve this issue.
Contributor guide
Research direction
Start by reproducing the tmux pane rendering difference between SSH and SSM with TERM=xterm-256color, then compare the SSM and Docker terminal environments. Done means identifying a supported configuration or confirmed agent limitation that prevents pane bleed without changing TERM to ansi.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, docker, zsh
- Domain
- cli, devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100