When you press F2 and look back at the command history, you may notice that at some point it stops. The default number of lines is set to 400. On early versions of AutoCAD you could change it in the preferences dialog. Unfortunately 2000 and higher has regressed. You have to use a to lisp expression setting.
To check the current number of lines set:
Command: (getenv “CmdHistLines”)
To set a new maximum number of lines:
Command: (setenv “CmdHistLines” “1000”)
The number you use must be in a range from 25 to 2048!