Hmmm! I've been using TCC (and it's predecessors) for over 20 years. I've never used a command history file and I've never seen one. I just looked very hard for one and I couldn't find one. Lets start over.
Clear the "history file" box. The only line in TCEXIT.BTM that refers to history should be something like (notice the change to use SORT's "/o" instead of redirection, because redirection can fail if you have NOCLOBBER set).
Code:
history |! sort /o (path\)history.txt
The only line in TCSTART.BTM that refers to history should be something like
Code:
history /r (path\)history.txt
I just tried this and it worked. When I exited and restarted TCC, I had a perfectly sorted history.
Note that if you ever get this working, you might hate it. My history is about 164,000 bytes and when I performed the experiment above, it took 1 second to save it in TCEXIT.BTM and 10 seconds (!) to load it in TCSTART.BTM.