Add a last_cmd_type field

Change-Id: I7ba1903bc1d63bf74f74648e868e5e1fe1f768c7