I confirm the problem. Looking at the source code of the bytecode MEX, it appears clearly that there is a single codepath (no distinction is made between surprise and perfect_foresight shocks).
My impression is that only surprise shocks are implemented: the generated time series seem consistent with surprise shocks, and the comments in the code suggest that it uses an extended path method. So my proposal would be to simply error out when a perfect_foresight shock is requested using the bytecode option.
The situation without bytecode seems different. The code seems to handle the difference between the two kind of shocks, but there is a convergence problem (at least on your example).
@JohannesPfeifer Do you agree with this analysis and with the proposal?