A civil servant deleted a text from her boss saying they had not lost "the war" following Alex Salmond's legal victory over the Scottish government.
Barbara Allison received a message from Permanent Secretary Leslie Evans after the government conceded it had acted unlawfully while investigating claims against the former first minister.
The message said that the "battle may be lost but not the war".
Ms Allison initially told MSPs she had no recollection of getting the text.
But on Tuesday, she told the inquiry into the government's handling of the complaints against Mr Salmond that she "must have deleted" the message.
She said there was no record of the message on her phone, but she had managed to recover it from the Crown Office, who had held it in evidence.
Ms Allison, who was the Scottish government's director of people at the time, said she believed the "war" Ms Evans was referring to was about equality and "making sure women can come forward" with concerns about senior politicians.
Ms Evans has previously echoed this defence when asked about the text message, saying it has been "misinterpreted as having some kind of conspiratorial element to it".
She has denied being "at war" with Mr Salmond, and insisted the government was not out to "get" him while drawing up its complaints procedure.
The former first minister took the government to court over its handling of two harassment complaints against him in 2018.
Ahead of the judicial review hearing the two sides agreed there had been a "failure" in following the recently-devised complaints process, and that the report resulting from the probe - which according to court documents was set to uphold the complaints - "could not be allowed to stand".
Ms Allison was facing the committee for a second time, having previously given evidence in September.
At that point, she was asked if she had received the controversial text message - and answered "no".
However she later wrote to the committee seeking to correct an "unintended inaccuracy", and admitted that she had indeed received the message.
Ms Allison said a search of her records "did not produce any results", but that the Crown Office had provided her with "a copy of material which they retried from my mobile phone" ahead of Mr Salmond's criminal trial - which saw him acquitted of 13 charges of sexual assault.
She said the message had been sent on 8 January, 2019 - the day it was confirmed that the government had conceded defeat to Mr Salmond in a judicial review action.
The government had to pay out £500,000 in legal expenses to the former first minister after admitting its internal investigation of harassment complaints had been flawed.
Ms Allison said she assumed the "battle" referred to in the message was the judicial review, and said her interpretation of the "war" was that it was "about making sure women can come forward".
Pressed about whether she had deleted the message from her phone, Ms Allison replied: "I don't routinely keep all my texts. I will clear out texts, so I must have deleted some."
Meanwhile, the civil servant at the heart of the botched investigation told the committee she was "shocked" that the government had conceded defeat in the judicial review.
Judith McKinnon, who was allowed to give audio evidence to the committee rather than appearing in person or via video link, insisted that she acted "objectively and fairly" when investigating two claims against the former first minister.
The government conceded that the probe was unlawful on grounds of "apparent bias" because Ms McKinnon had previously had contact with both of the complainers, in contravention of its own rules for the procedure.
The HR boss said that she had acted "appropriately" and in line with the "intention" of the policy, but that one passage of the final draft of it was open to "interpretation" about the role of the investigating officer.
She said: "The role of the investigating officer was very clear from early doors, about what was expected from the investigating officer. The initial drafting was very clear about what prior contact could take place, and that is how I operated."
She also confirmed that the procedure - which the government stands behind and is still in operation - had not been altered despite the defeat in the judicial review.
Ms McKinnon said it was "under review", and that "we haven't used the policy again since".
The committee has resumed hearings with witnesses after previously complaining it could not proceed due to "obstruction" and a lack of written evidence.
The Scottish government insists it is cooperating with the inquiry and has committed to handing over further papers - including 2,000 pages of evidence about the judicial review, which they said would be provided to Mr Salmond's lawyers to review.
Mr Salmond's team have also prepared "a substantial range of documents" for the committee, but claim the government is "withholding relevant materials" and is seeking to "tarnish" Mr Salmond's reputation by publishing the investigation reports which were struck down by the judicial review.