Streamlit app has a different behavior when we launch it in foreground using CMD or in the background using batch mode

Could you share the exact command that you’re running that does work, and the contents of the batch script that is failing?

Also, anything that you can share about the environment you’re running on could be helpful.

If you are able, could you also try minimizing your app down to a the smallest bit of code that still reproduces the error, then sharing that? See this post for more about what to share.