A quick thought: have you considered using a serial BREAK condition as another way to ask to leave UART bridge mode? From an automated script it's awkward to require that the user physically unplug the USB port. Most controlling software should have a way to request a BREAK. Can the onboard PIC detect this?