Automatic console state management