Some critics have complained about the ending of Sebastian Barry's The Secret Scripture, which involves what has been thought a hard-to-take coincidence. There may be readers of this column who have yet to reach the novel's final chapters, so I must be evasive about the precise plot twist that has provoked the arguments. One of the pleasures of the Guardian book club event, however, is that it presumes prior knowledge of the book, so readers and author were allowed to be quite explicit about the novel's climactic revelation. Barry admitted that, from the first, there had been dispute about the ending, and that even some of those readers who loved the book could, at best, only "forgive the ending, in a Christian way".

The author entertained us with the other endings he could have provided, including a "posh, get-out-of-it-smoothly ending", but he robustly defended his "Dickensian" dénouement, citing Victorian fearlessness about the use of coincidence as a precedent. The Secret Scripture involves a mystery about the identity of one of its characters' parents. From Tom Jones to Bleak House, classic fiction is full of scenes in which characters discover their true parents. One close reader of the novel who spoke at the book club took a new angle on how a novelist might choose to solve such a mystery. He told us he worked in adoption and was used to managing these "discoveries" in real life. The author told us he could not imagine what it would be like in reality to be in such a scene. So he could not, in this instance, do the Dickensian thing and describe it.

Barry was notably ready to appeal to his own life for explication of his fiction. A reader who rightly observed that he wrote very well about grief asked why he had chosen to make Dr Grene a widower, the death of whose wife occurs a little way through the novel. The novelist confessed that he had not had such plans for his psychiatrist when he set out on the novel, but that the character had required an account of his flawed humanity. Some readers did not warm to the doctor, he agreed, "which makes me a little sad, as he is slightly autobiographical".

What about his infidelity? A reader who described his liaison with Martha as "inconsequential", yet "tragic in its consequences", wondered why this was necessary to the plot. To her surprise perhaps, the answer was not an account of the structure of the narrative but a paean to the "ambitious grace" of marital fidelity. This novelist was not embarrassed to say that a novel might concern itself with how one should live.

The novel's Irishness was discussed and debated. A reader who spoke of Barry's novels being narrated in "a singing voice" thought that this was difficult to imagine in a novel by an English writer. He and the author agreed that the gift also brought the danger that "the lyricism could go too far", as if it were a virtue in itself.

The author demonstrated how precisely Roseanne's narrative was written with an extraordinary rendition of one of her childhood recollections, its odd twists of syntax suddenly making perfect sense on the ear. An Irish reader admitted that he simply relished the novel for its poetic language, and had no great care for its plot. He tried to encourage the author to see his book as "a sustained poem" rather than a novel, though other readers clearly relished the plot and its carefully layered mysteries.

A reader asked about a scene that she said she had read "over and over again". Roseanne, abandoned by her husband and cast out by her community, is living in her shed by the sea. She is walking on the strand one day when the air is suddenly full of planes and their noise - "an operatic performance", said the reader. These are German planes, returning from their bombing of Belfast. The novelist agreed that the scene was designed to dramatise Roseanne's isolation from history. The reader is as surprised as the character, for there has been no acknowledgement of the war in Roseanne's narrative. "What was the origin of this account?" Had he heard contemporary descriptions of such a sight over western Ireland? He himself had found out about the bombing of Belfast belatedly, from reading history books. Schoolchildren in the Republic were not, in his day, told of such things.

The image of Roseanne alone next to the sea, overwhelmed by the roar of all those warplanes, just came to him. He had been taken to task by reviewers for having the raid take place in the wrong month and describing an impossible route for the Germans. With a sense of panic, he assumed he had indeed blundered for the sake of dramatic effect - only to discover some time later that there had been another raid, which had taken place in just the same month as his fictional raid, and that the planes might indeed have followed the route he had invented for them.

Perhaps, he suggested wryly, if you trust to "operatic images" you get led to an "innate factuality". Historical truth is something the novelist does not discover from research, but instead blunders upon.

• John Mullan is professor of English at University College London. Next week he will be looking at The Lighthouse by PD James.