RT Daniel Imms
The upcoming version of @code will include opt-in shell integration for the terminal. One of the things this provides is super fast current working directory detection which shows up in the terminal tab. This even works on Windows which wasn't possible previously.
https://twitter.com/Tyriar/status/1485948888246669318