@Purple@woof.tech Sorry if I came across as a bit snippy before, condensing my thoughts into a single reply.
OS X, as I have no experience with macOS (yet), did try to keep histories per tab. I didn't seem to work right, but I'm guessing because it also never restored my tabs just a single so I always got the combined history.
Here, with Terminal, it can the order of tabs and their names within a window, so I'd think they could assign an internal ID allowing them to restore that, the CWD, and its own history.
If I have more than one window, well, I have no idea how that'd work.
Launching a new window would get the combined history since what else would it have?
At any rate, even if they don't do any of that because of the aforementioned issue, what I don't understand is why hitting up sometimes doesn't return the expected command (typically the last one I ran).
It sometimes does the equivalent of this:
-> up
npm run build
-> enter
-> up
./myscript blah
When the reality is that the invocation of myscript wasn't even the command before the build call, it was far back in history.
It's like Terminal lost its place in history and ended up somewhere arbitrary. Or, someone realized the commingling might be odd, and it snapped to the place in history this tab would've been. I don't know.
I should note this is just my experience with the PowerShell tabs. I don't know if it affects non-PS tabs.
Either way, it's annoying when it happens and I don't notice.