Been dealing with this issue as of late with my MacOS terminal (running MacOS Monterey version 12.4). Have no idea when it started, or why.
Looks something like this:
$ 00~stupidcopy01~
The easiest fix I have seen, that seems to do the trick is to use the “reset” command:
$ reset
It doesn’t hurt to kill your terminal instances.
Have no idea why it started, but I’m glad it’s gone. Was causing issues with passwords.
Thanks, hope it helps.