call to integrate_1d is missing relative tolerance argument - this works:
target += log(integrate_1d(normal_density,
left_limit,
right_limit,
theta, x_r, x_i, 0.01));
I’m looking into the discrepancy between the documentation, which indicates rel_tol is optional, and above behavoir, which show that it isn’t.