The full resolution: Sebastian and Viola are reunited, identities revealed, marriages announced. Malvolio's furious exit denies the play a completely happy ending.
Fabian tries to get Malvolio's letter from Feste; Feste refuses. Orsino arrives with Cesario, Curio, and lords. Officers bring in Antonio, whom Orsino recognises as an old enemy. Antonio defends himself and names his real grievance: he rescued the young man standing at Orsino's side, spent three months with him, and was then denied in his moment of need. Cesario, he says, refused to acknowledge him and would not return the purse. Orsino is confused: Cesario has been in his service for three months. The stories cannot both be true.
Olivia enters and greets Cesario as her husband. Orsino is shocked. He presses his love for Olivia one final time; she refuses one final time and refers to Cesario as her betrothed. Cesario refuses to be Olivia's husband. The priest confirms the betrothal. Orsino turns on Cesario with anger.
Sir Andrew enters bleeding, blaming Cesario. Sir Toby enters also bleeding, blaming the same. Cesario denies everything.
Sebastian enters, apologising to Olivia for hurting her kinsmen. He greets Antonio warmly. Then he sees Cesario.
The twins stand face to face. The recognition builds through careful exchange: one face, two people. Sebastian says he had a sister who drowned. Viola says she is that sister. Sebastian confirms it. The knot untangles.
Orsino turns to Viola. He recalls every time Cesario said she could never love a woman the way she loved him. He asks her to be his wife and asks to see her in women's clothes. He still calls her Cesario as he says it, and uses the name even at the play's final moments.
Olivia asks about Malvolio. Feste produces the letter. Malvolio is brought from the dark room, furious. He shows Olivia the forged letter; she recognises Maria's handwriting, not her own. She apologises. Fabian explains the scheme and distributes the blame partly to Malvolio's own arrogance. Feste reminds Malvolio of his dismissal in Act 1. Malvolio's final words are: "I'll be revenged on the whole pack of you." He leaves.
Orsino sends someone after him. Feste sings the final song.
Act 5 is the play's most demanding scene because it must simultaneously produce the comic resolution the genre promises and acknowledge what the resolution does not fully repair.
The recognition scene is built in stages. Sebastian's arrival creates bewilderment for everyone except the audience, who has been waiting for this moment since Act 1. Shakespeare delays the explicit recognition deliberately: first Olivia's confusion, then Sir Andrew's injury, then the twins actually seeing each other, then the slow, careful exchange of evidence. The moment of recognition, when both twins understand simultaneously, is the play's structural climax. It releases the pressure of five acts of dramatic irony in a single scene.
Orsino's proposal raises a question Shakespeare deliberately leaves unanswered. He calls Viola "Cesario" as he asks her to marry him. He continues to use the name after the truth is known. Whether this indicates genuine feeling for the person beneath the disguise, genuine confusion about what he has fallen for, or simply habit, is not resolved. The ambiguity is intentional. Throughout the play his emotional intimacy with Cesario was more genuine than anything he felt for Olivia. His quick transfer of affection from Olivia to Viola, once Viola's identity is known, confirms that his love for Olivia was always partly imagined.
Malvolio's exit is the play's most important formal decision. He does not accept Olivia's apology. He is not reintegrated into the celebration. His final line, "I'll be revenged on the whole pack of you," is not the sound of someone who has been taught a lesson; it is the sound of someone who has been broken further than correction can repair. The play does not pretend otherwise. Feste's closing song, with its repeated line "the rain it raineth every day," refuses comfort after the comic resolution. The world the song describes is not the world of the ending: it is the ordinary world, which is harder and less forgiving than any comedy can sustain.
Antonio is present but not given a place in the final pairing. He is welcomed back by Sebastian warmly, but nothing is resolved for him. His story is the play's most selflessly loving, and it ends without reward.
Antonio: Present but excluded from the pairing of couples. His devotion went unrewarded; Sebastian is glad to see him but their relationship is not formally concluded.
Malvolio: He leaves furious and unreconciled, threatening revenge. Olivia acknowledges the wrong but cannot repair it.
Orsino's "Cesario": He calls Viola by her disguise name even as he proposes. The question of whether he loves Viola or Cesario or both is left deliberately open.
These three unresolved threads are what prevent Twelfth Night from being a purely happy comedy.