Oceananigans' time_step! function (for methods without reactant models) contains a conditional statement that calls update_state! on the first timestep. This conditional statement breaks when used with Reactant, even with @trace present, so currently Oceananigans Reactant models have their own method calls:
https://github.com/CliMA/Oceananigans.jl/blob/5fff325a53e033e39fa93bc3510336a313cdb6c5/ext/OceananigansReactantExt/TimeSteppers.jl#L53C1-L113C4
It would be better if @trace can be made to work with update_state!, so we can maybe avoid this. I've started an example to minimize it here. To run it, pull that branch of Oceananigans #jlk9/error-trace-reactant-if and run julia -O0 --project test/reactant_test_utils.jl. I'll reduce further as needed.
@wsmoses