Repl: create CommandRecord when appropriate for actions