Expect begin, end, and error to have a command ID. Support %output having truncated UTF-8