Change:
} add-zsh-hook precmd __vsc_precmd add-zsh-hook preexec __vsc_preexec <ins> if [[ $options[login] = off ]]; then ZDOTDIR=$USER_ZDOTDIR fi </ins>

Discussion:
Does this issue occur when all extensions are disabled?: No VS Code Version: 1.70.0 OS Version: Debian 10.8 Steps to Reproduce: a zsh shell with a framework like zim installed shell integration zsh Observe: This breaks all my integrations and I lose history, etc... Usually because default settings do things like
In WSL: Ubuntu-22.04, z4h (zsh for humans) is telling me my ZDOTDIR has been set to /tmp/vscode-zsh . I updated to VSCode 1.70.0 and noticed this. It's a shame because the shell integration worked so well in 1.69.x.
I'll check this out tomorrow but it seems like a candidate for the recovery release. In the meantime you can disable shell integration in your settings and install it manually with these instructions:
This appears to be the only change around ZDOTDIR since 1.69:
I will echo this has also broken my shell configuration to load an SDK for a certain VSCode workspace because it hijacks the early on and doesn't provide any hooks to work around that.
I can reproduce this when using a non-login shell. That's because we reset the in the login rc file which only runs for login shells. Unrelated to the history change
Thanks.
we're planning on releasing the fix in the next couple of days
it's already available in the
to verify, set your to something in your . remove the login args from the profile. and verify that it's whatever you set.
As of 1.70.1, macOS 12.5, this is still broken for me:
looks like we should try to detect if this is used and disable shell integration
FYI, I've tested on macOS, WSL/Win 11, and ChromeOS. On WSL and ChromeOS, ZDOTDIR is set to /tmp/vscode-zsh, but otherwise it's the same as on macOS. When I turn off Shell Integration in the settings and open a new Terminal instance, shell integration appears to work. So maybe has the right idea. And as I said earlier in the thread, this worked without issue on 1.69.x.
setting to worked for now
I think zsh4humans uses powerlevel10k which disables shell integration (or will disable it in the next version?).

I think to fix this we actually need to add or something similar similar inside this if statement: Alternatively, should this line be moved above the check? To test this without plugins, unsetting inside your rc should repro.
I don't think that line can be moved above or will override the temporary we have set for vscode but think as you said, we need to also add it before returning when it's been disabled
Or can we remove this: Either there or at the end of whatever injected zsh script that runs last.
we could remove it there for non-login shells. for login shells, it gets reset here and probably can remove line 6
<!-- AUTHORVERIFICATIONREQUEST --This bug has been fixed in the latest release of ! you can help us out by commenting if things are now working as expected. If things still don't seem right, please ensure you're on version of Insiders (today's or later - you can use in the command palette to check), and leave a comment letting us know what isn't working as expected. Happy Coding!
I'm trying to set in my .zshrc, but it always ends up reset to my home directory, same behavior in stable/insiders. But I'm not sure whether there is something in my zsh config that does that.
the gets set in not your
Tried that, and it seems like ZDOTDIR ends up set to a tmp folder <img width="636" alt="image" src="https://user-"
not sure then - it works for me - it's the only thing in my file though
I encountered the same problem as I used the following version of Insider, which seems to be fixed in commit , but the problem is not fixed. `
hey all, I've also run into this, not 100% sure though if it's exactly the same or "just" related. I use remote container extension with a Debian based container and ZDOTDIR env isn't respected as long as shellIntegration is enabled. Actually I was using regular code but tried insiders after reading the comments here, without any success. let me know if I should provide more details - I tried so many combinations I can't really exactly remember right now, but of course I'm happy to try something specific if it helps.
Is this fix supposed to be live to the stable release now?

If so, I am still having this issue when using zsh4humans.
It's not yet in stable. it should be fixed in insider's now though by
Is this fix scheduled for the next stable version? and when would that be?
yes, it will be next week