A plea of guilty can be put in by the defendant himself only in open court, unless upon indictment against a corporation, in which case it may be put in by counsel. The court may at any time before judgment, upon a plea of guilty, permit it to be withdrawn and a plea of not guilty substituted: provided, that upon the application of the defendant, a plea of guilty may be received, and sentence may be passed, at chambers as provided in section 1-901.
Idaho Code § 19-1714