I think knowing when to quit is like predicting the stock market. Many extremely successful companies were in positions where they should've quit but didn't, and then ended up successful because they managed to pivot correctly (either by pure luck or good observations).
Means you shouldn't worry if you messed up if you didn't 'quit at the right time', but you should be more concerned if you acted rationally and took an objective view on everything, and most importantly took the time to judge how your company/startup is doing and how you can improve it.
Means you shouldn't worry if you messed up if you didn't 'quit at the right time', but you should be more concerned if you acted rationally and took an objective view on everything, and most importantly took the time to judge how your company/startup is doing and how you can improve it.