Improve rpc console history behavior