Make 'snapshot_shell' store non-exported environment
Resolved 💬 5 comments Opened Feb 20, 2026 by CarloWood Closed Mar 29, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor)
responded on this thread — see the highlighted reply below.
And is therefore not usable.
thread ID 019c7cf8-95bb-78e3-9668-1272b5434750
5 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
This feature is working as designed. If it's not meeting your needs, let's explore why. Can you explain your use case in more detail?
Well, then I'll just turn the 'shell_snapshot' off. Weird design though, to change the environment that one works in depending on if this feature is on or off.
My use case is that I have a whole system around the bash environment: automatic history and environment switching, my build system (basically my "IDE" is implement in the environment) and recently everything codex. It is just huge.
And I rely on environment variables to be set as I set them in, among others, ~/.bash_profile.
Without the snapshot feature: they are always set. With the snapshot feature: all the non-exported environment variables and functions are no longer defined - completely breaking everything.
I don't want to export them, they are local to the current bash. There should be no reason to export them just so they get saved by the shell snapshot feature.
Just a few environment variable (not showing any bash functions, those are too long):
This is inside the Codex environment (that I start by running
codex shell, wherecodexis a bash function):This environment is inside the bwrap container that Codex runs in. I can use it to see what Codex sees.
If then I type
exitto return to the host environment:Now multiply that with 100 and you get an idea ;)
This feature request hasn't received enough upvotes, so I'm closing it.