Nicola Sturgeon has been warned by a Holyrood inquiry investigating the Scottish government’s handling of sexual harassment claims against Alex Salmond that she and her staff must not destroy any personal text messages.

The committee has written to the first minister and the Scottish government’s permanent secretary, Leslie Evans, to insist every item that could be relevant to its investigation is preserved, including emails, text messages and phone records held by anyone linked to the inquiry.

It is thought that includes private WhatsApp messages and emails sent by Sturgeon and her aides using personal mobile phones, as well as the names of any Scottish National party members or staff connected to the inquiry.

Linda Fabiani, the former Scottish government minister chairing the inquiry, told Sturgeon and Evans she wanted written guarantees that this had been done, as well as access to instructions to officials, and confirmation this covered older records that might ordinarily be deleted.

Sturgeon’s spokesman said on Thursday the first minister would comply with the committee’s requests but he said he was unable to comment further because there were several inquiries under way into the controversy.

The special inquiry was set up by Holyrood to investigate whether Sturgeon or her staff had broken the ministerial code after revelations she spoke to Salmond five times last year about an investigation set up by Evans to investigate allegations from two female civil servants of sexual misconduct against him.

Those contacts were arranged privately by Liz Lloyd, Sturgeon’s chief of staff, with Geoff Aberdein, Salmond’s former chief of staff when he was first minister, and a long-standing party colleague of Lloyd’s, soon after Salmond was formally notified by Evans he was under investigation.

The group who gathered at Sturgeon’s home in Glasgow for her first meeting with Salmond included Duncan Hamilton, a lawyer and close friend of Salmond’s who was previously an SNP MSP. Sturgeon has stated she first learned that Salmond was under investigation at that meeting.

In January, the Scottish government admitted it had unlawfully mishandled the inquiry, set up under its anti-harassment rules, after Salmond launched a civil action. Evans acknowledged her appointment of a civil servant who had already spoken to the complainers to head the investigation was “tainted by apparent bias”.

Salmond has repeatedly denied any inappropriate or criminal misconduct. In February he was charged and appeared in court on 14 charges including two of attempted rape, nine of sexual assault, two of indecent assault and one of breach of the peace. Salmond has denied all those charges.

Fabiani warned Sturgeon she could not rely on her belief that the meetings she arranged with Salmond were a party matter, and therefore did not come under the ministerial code or within the committee’s remit.

The committee, which includes three former SNP ministers, met last week to discuss the investigation, which will start after the criminal case against Salmond ends.

Fabiani told Sturgeon: “One of the questions it will consider is what actions did and did not constitute government business. This has an obvious bearing on information that you may hold.”