The thinking field is read at line 103 without holding a.mu, but it is written under the lock in SetReasoningEffort. This is a data race when a user changes the reasoning effort while a new session is starting. Move the read inside the existing critical section alongside mode, model, and sessionEnv.