Any question about Hamlet's flaw is a loaded question.
Some of the possibilities that have been suggested are:
- He's really mad, not just pretending; he sets out to act mad while he is already suffering from melancholy, and he truly becomes mad
- His inability to make a decision: indecision, as you suggest
- He is too rational; too intent on studying every possible angle of such a major decision
- He is a coward
- He is too much of a thinker, rather than a doer
- He is just too brilliant and beautiful a person to do something like kill a king when he has time to think about it first; he is an ideal human in a despicable and corrupt world.
The list could be much longer.
The problem with the above answers is that they don't really fit a Shakespearean tragedy, and that none really offer a full explanation. I'll suggest one that does fit and detail it for you.
I suggest it is, for the most part, a mistake to see Hamlet as procrastinating or unnecessarily delaying or failing in any way. Notice that even in Hamlet's soliloquies when he accuses himself, he always follows his questioning with a resolution. He rejects his self-accusations and promises solutions, and he delivers (after he berates himself as a coward, etc., in Act 2.2, for instance, he plots to determine with certainty the king's guilt or innocence with the play-within-the-play, and he does it).
Hamlet simply follows rational steps to determine whether or not the Ghost is really what it says it is, and, therefore, whether or not Claudius is really guilty. This takes the reader to Act 3. Hamlet has not yet killed Claudius simply because he needs corroboration for the Ghost's statements. There is nothing wrong with that. Who wouldn't want to be sure before killing a king?
Once Hamlet knows with certainty that Claudius is guilty, only one instance of Hamlet not acting when he has an opportunity to do so must be accounted for--and one act of failing to get revenge does not a mad prince or a procrastinating prince or a delaying prince or an indecisive prince or a cowardly prince make. And if waiting until he has corroboration is the rational thing to do, then something besides all of those suggestions listed above must be at work.
And that something is hubris. What is Hamlet's tragic flaw? It is hubris. The only time Hamlet does not kill Claudius when he has the opportunity to do it, is when Claudius is praying. Why doesn't he? Because he thinks Claudius is confessing, and he thinks by killing Claudius at that moment he will send Claudius to heaven, and he doesn't want to do that.
What is hubris? An excessive pride that leads to the downfall of a tragic hero. One way a character can be guilty of hubris is by attempting to reach above his station. When Hamlet chooses not to kill Claudius he is attempting to determine another human being's eternal salvation. That's God's business, not Hamlet's. His station in life and in existence has nothing to do with determining salvation. He oversteps his position, and thereby causes the blood bath at the conclusion of the play.
Hubris causes Hamlet's downfall, and that's why his decision to not kill Claudius while Claudius is praying, is the climax of the drama. That's when Hamlet's fate is determined, as are the fates of so many innocent people.
There can be many approaches to identifying Hamlet's tragic flaw. I would say that indecision is a critical one. Hamlet is a thinking man's hero, one whose immersion in thought proves to be the representation of hamartia, or tragic flaw. Hamlet's propensity to let function be smothered by surmise causes internal agony and complete pain, which is something that is externalized to others. One can see that his relationship with Ophelia is the result of this agony, as he treats her as the byproduct of torment and internal suffering. His lack of ability to commit to a course of action, constantly engaging in intellectual analysis and thought as opposed to pragmatic action, ends up creating doom for both he and those who happen to be cursed enough to be around him.