mirror of
https://github.com/asciinema/asciinema.git
synced 2026-04-26 00:15:56 +03:00
[GH-ISSUE #688] asciinema stream + ZSH with OMZ within tmux session shows additional characters #965
Labels
No labels
bug
compatibility
feature request
fit for beginners
help wanted
hosting
idea
improvement
packaging
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/asciinema#965
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @moritzdietz on GitHub (Jul 2, 2025).
Original GitHub issue: https://github.com/asciinema/asciinema/issues/688
Pre-submission checks
Bug Description
If you have ZSH as your shell and install OMZ (no additional plugins needed to reproduce) and then run
asciinema streamthe player shows additional strings in the browser which are not rended inside of the terminal.In the background is the player and the foreground the terminal where I started asciinema.
This was already discussed in the Matrix chat room: https://matrix.to/#/!fTVjfZsxcITbVFJxLq:matrix.org/$TRVG3a70wYEu-ptNIU_aSvgGI9XYITl5EJjI3-2IfEw?via=matrix.org&via=moritzdietz.com&via=jauriarts.org
Steps to Reproduce
asciinema stream -linside the tmux session and open the browserpwdand check the output in the playerExpected Behavior
No additional characters or strings should be present in the player
Operating System
macOS 15.5
asciinema CLI Version
3.0.0-rc.5
Installation Method
Built from source
Terminal Information
Ghostty d0e14529 build 10613
zsh 5.9 (arm64-apple-darwin24.0)
tmux next-3.6
Additional Context
No response
@fspv commented on GitHub (Jul 19, 2025):
running into a similar issue
I'm also seeing these errors in the log when rendering, not sure if it is related
@fspv commented on GitHub (Jul 19, 2025):
This seemed to help in my case:
Found it by looking at
@moritzdietz commented on GitHub (Jul 20, 2025):
Huh that is interesting! I tried to reproduce my issue and setting
DISABLE_AUTO_TITLE=truelike you suggested actually works.Although I did test it with my initial command again:
This seems to stem from: https://github.com/ohmyzsh/ohmyzsh/blob/master/lib/termsupport.zsh
@moritzdietz commented on GitHub (Jul 20, 2025):
… which you can "patch" so that OMZ won't run this in case you are recording with asciinema:
Which works but I'm unsure if this is the right approach. You can find other skips defined in this file as well for other environments, so it seemed right to just add another one. Although it can be discussed about the correct way.
I'll gladly open up an issue with the OMZ project to discuss it there if we agree that this is the right approach to fix this issue – as this will affect all OMZ users.
@fspv commented on GitHub (Jul 20, 2025):
Not a huge fan of adding such implicit dependencies between unrelated projects. I have solved the issue for myself by just adding
DISABLE_AUTO_TITLEto my zshrc. I realized I don't use this functionality anyway.So up to you, but at the very least we can make debugging this problem easier. So might be worth adding info about
which -a $preexec_functionsto the FAQ somewhere@ku1ik commented on GitHub (Jul 21, 2025):
Good sleuthing guys 👏
So, we know
DISABLE_AUTO_TITLEhelps, but what's the actual core of the problem here?Do you see similar problem when replacing asciinema with the
scriptcommand?@moritzdietz commented on GitHub (Jul 23, 2025):
No

(This is in the same setup as described in the issue text)
To me it seems that the "problem" is that these two lines/logic are being used:
The one being OSC 7 and the other is a xterm escape sequence to set the terminal title which seems to trip up asciinema's terminal emulation?!
Example:
@moritzdietz commented on GitHub (Jan 9, 2026):
@fspv Can you retest please? For me this issue no longer exists. Since the opening of this issue I have updated Ghostty, tmux and obviously other bits. But I really can't reproduce this anymore.
Are you still seeing your problem?
@fspv commented on GitHub (Jan 11, 2026):
Yeah, seems to be fine for me now. Problem doesn't reproduce with 3.0.0-rc.4 from the NixOS repos
@moritzdietz commented on GitHub (Jan 11, 2026):
Oh, that's even more interesting and confirms what we talked about on Matrix as well – there was no changes in asciinema itself which would have tried to solve our reported problem.
The version I just re-tested this with was based 9a3c702. I did however also test with asciinema 3.1.0 with the same positive results.
So it must've been something else – OMZ, zsh, Ghostty or tmux which has since received updates.
With this, I'm going ahead and close this issue 🙂