AI_Agent: refresh window if tree changed