When an appeal is taken, the notice of appeal and all briefs, papers, and notices, either in the Supreme Court or trial court, shall be served on the attorney general as well as the prosecuting attorney, but after the appeal is perfected the attorney general shall otherwise control the case in behalf of the state, and thereafter no stipulation shall be valid unless made in writing with the attorney general and filed with the clerk of the Supreme Court within ten days after the date thereof.
SDCL 23A-32-17