When attemptedTurnStart is true but the thread.turn.start dispatch fails
(e.g. network error), the optimistic user message was never removed from
optimisticUserMessages. The catch block only cleaned up when
!attemptedTurnStart, leaving a permanently visible ghost message.
Move setOptimisticUserMessages filter outside the !attemptedTurnStart guard
so it always runs on error. The prompt/image restoration remains gated
behind !attemptedTurnStart since that only applies to pre-send failures.