sudStepIndex was reset to null in updateSudForecast whenever isNewSchedule=true (i.e. on every fresh page load). If the Step message arrived before Json in the global-state replay, or in a separate message, the schedule would be rebuilt but the index would be null, leaving grain mass as 0 with no subsequent Step to restore it. Step messages are the authoritative source for the current index, so the reset is removed. The Step handler always overwrites it. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JLR2133M2PyjiYq584i2G7