I just had a case where I urgently needed the chain id in the transformed data block in order to select a subset of my input data.
This could be useful for a bigger audience, i.e. this could be used to conveniently prepare a single data set and then do a cross-validation with Stan. If the chain id would be available in Stan as a variable, then the user can select the subset to leave out based on the chain id.
Does that make sense?
If yes, I am happy to file an issue for that on the stan repo.
Best,
Sebastian
PS: I solved my problem by copying my data-set around and pasting into it the respective chain id. Not a nice solution as I find.