Get return value first in update_prompt