John McDonnell, the shadow chancellor, has said the disciplinary inquiry into Margaret Hodge for accusing Jeremy Corbyn of antisemitism was due to her “complete misinterpretation” of the party’s new code of conduct.

McDonnell said on Wednesday that Hodge’s outburst was “out of character” and she was “extremely angry and lost her cool” when she confronted the Labour leader.

McDonnell called for a swift and amicable resolution to the matter. He said on BBC Radio 4’s Today programme he had listened to Hodge being interviewed on Monday, adding: “I realised there was a complete misinterpretation of the code, so I can understand why she was so angry if that’s what she believed this code had done.”

Hodge, who is Jewish and lost relatives in the Holocaust, has said she stands by her comments, though she denies swearing at Corbyn in an angry confrontation in a Commons corridor last week after Labour’s national executive committee refused to abandon its new code of conduct on antisemitism.

The code includes the internationally accepted International Holocaust Remembrance Alliance definition of antisemitism, but does not replicate in full a list of examples of antisemitism published by the IHRA alongside its definition.

McDonnell said that both Hodge and Corbyn had been upset by the incident.

“Jeremy was deeply upset because, when you have someone haranguing you in that way, of course it’s upsetting,” he added. “Those sorts of accusations, when he has worked so hard on the issues of antisemitism and anti-racism, of course he’s upset.”

Labour’s general secretary, Jennie Formby, has written to Hodge telling her she faces investigation for “abusive conduct” and that “any further behaviour of a similar nature” could result in disciplinary action.

McDonnell said Corbyn agreed that the case should be settled swiftly rather than subjected to the full disciplinary process.

“At the weekend I spoke to Jeremy and said we’ve got to resolve this matter quickly,” said McDonnell. “He said, yes, we’ve got to do that, and he’s asked the chief whip and general secretary to try to sort this out. We want it resolved amicably and I think that can be done.”

Labour averted a showdown with MPs over its code of conduct on Monday, with a vote on whether the party should adopt the international antisemitism definition deferred until parliament returns in September.

At the PLP meeting, sources said a number of Labour MPs spoke strongly in favour of adopting the IHRA definition, with an objection raised by the former deputy prime minister John Prescott.