The samplers use both a random seed and the chain id when creating the RNG.
To get consistent results, you need to use the same seed and same number of chains.
Using the new gq facility sounds like a good solution. Here’s the spec: https://github.com/stan-dev/stan/wiki/Standalone-Generated-Quantities:-Functional-Specification
I started working on a cmdstan implementation - stalled because of I/O issues (discussion here: Adding standalone generated quantities option to cmdstan (and rstan and pystan))
cheers,
Mitzi