Why can't i get my undo history back? This has got to be my most frustrating moment while using blender! Whenever i use blender for a long time (without saving too!), i happen to change the current mode i am in when i try to undo an action blender undoes the action that took place while i was in that specific mode (object, edit, sculpt).

And heres the super annoying part, i try to undo to the changes that where done in that mode and a huge change in my mesh occurs, then i switch to the mode that i had previously been doing my legit modeling, and still i can't manage to restore my previous session(Come on now!). 

So(sigh) i look througth the history in the tools menu for every mode i was In, and NOPE, i just can restore my previous session.

Now i realise that blender store only a certain amount of actions in its history, so my previous action was deleted while i searched for last my session. 

Is there any way to avoid this problem? It would be very appreciated :)
No, there is no way around this currently.
This is a limitation in Blender's undo stack. Each mode has its own undo history.

See: https://www.blender.org/manual/interface/undo_and_redo.html