Can we take any advantage of podman-remote?
I've just found that there's a relative new flatpak at https://github.com/flathub/com.visualstudio.code.tool.podman which adds a podman-remote binary to com.visualstudio.code's PATH. I don't know exactly how it works, but maybe it could be an alternative to flatpak-spawn --host podman.
I've found the following (old) documentation for podman-remote: https://github.com/containers/podman/blob/056f492f59c333d521ebbbe186abde0278e815db/docs/tutorials/remote_client.md
See also: https://github.com/flathub/com.visualstudio.code/issues/55#issuecomment-913864265
Hmm - the environment variable handling in podman-host.sh would be hard to replicate with podman-remote. Not sure if there are other problems that we'd hit in addition.
Just an aditional information: this article explanis how to use podman-remote with VSCode Flatpak.