Welcome to the Stan forum. Unfortunately this is a known issue that hasn’t been fully resolved and may not be fixed. However, there are a few things you can try.
There’s some code that @andrjohns shared that can be used to create the same type of structure for the posterior draws that RStan would give you, which may let you use your post-processing code:
There’s also a guide from @brock that may be helpful:
Keeping the CmdStan CSV files fully compatible with RStan is probably not going to be a priority going forward, so I would recommend eventually writing post-processing code compatible with CmdStanR (if you want to use CmdStanR). But maybe all you need is that code from @andrjohns above? That would be the simplest thing to try. If that’s not sufficient and you end up needing to rewrite a lot your code feel free to ask for help here.
Using brms:::read_csv_as_stanfit() works and creates a stanfit object. Hopefully this function can be kept in future versions (@paul.buerkner). Thanks @jsocolar for the suggestion!
I didn’t check @brock’s guide since brms already offered a simpler solution. @andrjohns’ code is also helpful for extracting posterior samples (compatible with rstan), which can simplify converting post-processing code. Thanks @jonah!