Prior to implementing the Trump administration’s Zero Tolerance immigration policy last year, Customs and Border Protection officials knew serious IT deficiencies would hamper the agency’s ability to reunite separated families but chose to move forward anyway, according to a report from the Homeland Security Department inspector general.

What’s more, agency leadership told agents to use workarounds that had already proven to be ineffectual, time-consuming and error-prone, as children sat in detention—some for more than seven months—waiting to return to their families.

The administration’s Zero Tolerance policy—in place from May to June 2018—resulted in thousands of children being separated from their parents and guardians. While CBP has IT systems for tracking individuals through the detention and prosecution process, the system lacked data fields to connect family members, making it nearly impossible to reliably track those separations, auditors said.

After a small-scale test in November 2017, U.S. Border Patrol officials on the ground told leadership the lack of a functional IT system would be a problem, however, the department actively declined to address those issues before rolling out the Zero Tolerance initiative, auditors found. Instead, leadership told agents on the ground to use workarounds like maintaining Excel spreadsheets, a method that was found to introduce more errors and clog the process during a 2017 test.

“U.S. Customs and Border Protection adopted various ad hoc methods to record and track family separations, but these methods led to widespread errors,” auditors wrote. “These conditions persisted because CBP did not address its known IT deficiencies adequately before implementing Zero Tolerance in May 2018. DHS also did not provide adequate guidance to personnel responsible for executing the Zero Tolerance Policy.”

Border Patrol and ICE agents use two IT systems to track detainees: ENFORCE 3, or e3, primarily used by Border Patrol, and the Enforce Alien Removal Module, or EARM, used by ICE. Both systems are maintained in ICE’s Enforcement Integrated Database, or EID.

The e3 system, specifically, required workarounds to adapt to the needs of separating and reuniting families. While Border Patrol agents could enter information about a family unit when they were originally apprehended, the system did not allow for that data to be split and tracked individually once families were separated. Instead, agents had to delete the entire family unit from the system and reenter the information as single adults and unaccompanied children. Once that data was deleted, it was unavailable to agents using the system on the frontend. The data was retained in the EID database on the backend, however, it was only accessible to CBP IT specialists.

Initially, the e3 system was not able to track separations once the family unit data was deleted. After the April 2018 order, CBP did work to establish new functionalities for the e3 system, including adding 11 “separation codes” that agents could use to categorize separations. The Zero Tolerance policy was not one of those codes.

“To compensate, Border Patrol agents used ad hoc workarounds to capture the reasons for family separations by simply selecting ‘Criminal History’ or ‘Other Reasons,’” the report states. Agents were told to rely on narrative-form “case notes” typed into the e3 system that, in the best of situations, “included summaries on the individuals apprehended, where and when they were apprehended, and with whom.”

The lack of machine-readable data on separations caused major issues once the court-ordered reunification.

“To locate and reunify family members, Border Patrol headquarters personnel had to review all separations coded as ‘Criminal History’ or ‘Other Reasons’ in the system, as well as all the accompanying case notes. This process was neither easy nor accurate,” the IG wrote. “Lacking critical IT tracking capability, Border Patrol immediately struggled to keep pace with the high volume of migrant apprehensions and separations resulting from Zero Tolerance. They also could not determine how many children in Border Patrol custody were separated from parent(s) at any given time.”

In other areas, like the high-traffic border in Texas, agents took the initiative to use Excel spreadsheets to track separation data. However, those spreadsheets were in no way interoperable with the e3 or EARM systems and “contained inaccuracies as they were not designed for large-scale processing,” the IG said.

Over the course of six weeks—ending with a June executive order and subsequent court order requiring full reunification of children with their guardians—at least 3,000 children were separated from their families.

CBP said it was able to reunite 2,155 children with their families after the court order was issued, though the process took seven months more than the tight timeline required by the order. The IG also found 136 cases in which familial relationships were not properly recorded, leading to difficulties with the reunification process.

“In a broader analysis of DHS data between the dates of October 1, 2017, to February 14, 2019, we identified an additional 1,233 children with potential family relationships that were not accurately recorded by CBP,” the IG added. “Without a reliable account of all family relationships, we could not validate the total number of separations, or reunifications.”

In some cases, without reliable data, CBP was unaware that children had been separated from their families at all. In those instances, the Health and Human Services Department or nonprofit organizations working on behalf of the children alerted the agency.

According to the report, CBP conducted a similar program in El Paso November 2017, during which some 280 families were separated while adult guardians went through the prosecution process.

El Paso Sector Border Patrol agents immediately flagged CBP headquarters about issues with not being able to properly record and track separations through e3. CBP headquarters officials told the IG those requests for additional IT capabilities were deemed a low priority at the time.

As would later be the case under Zero Tolerance, agents in El Paso began using workarounds to track separations—including spreadsheets—leading to similar problems.

“Of the nearly 280 families separated during the El Paso initiative, at least seven adults had incorrect alien case file numbers on the tracking spreadsheets and 33 others recorded no information at all on family separations,” according to the report. “The use of spreadsheets in the field, rather than recording information in departmentwide systems, prevented ICE and CBP personnel in other locations from seeing where El Paso Sector Border Patrol agents had separated family members.”

The El Paso Sector office compiled a report on technical issues with family separations after the November 2017 test, which was submitted directly to then-acting Border Patrol Chief Carla Provost.

“The following year, the same acting chief assisted in implementing Zero Tolerance and was aware of the need for improved coordination among CBP, ICE and HHS [Office of Refugee Resettlement] to address the known challenges encountered in separating migrant families,” the report states.

CBP declined to remediate these known issues ahead of the Zero Tolerance policy rollout. Instead, on the day then-Homeland Security Kirstjen Nielsen signed the policy memo, Border Patrol leadership told agents to use spreadsheets until the agency could make upgrades to the e3 system.

“Although intended to reduce the practice of ‘Catch-and-Release,’ the policy had the unexpected consequences of overburdening CBP and ICE resources, and over-taxing facilities for detaining migrants at the Southwest Border,” the IG concluded. “These conditions were exacerbated by thousands of children separated from their parents and DHS’ inability to reunify families as mandated due to poor data entry, data tracking, information sharing and IT systems capabilities.”

Ultimately, the IG made five recommendations to CBP, ICE and HHS to better coordinate and record separation data.