While the White House announced the president agreed to a deal Thursday to avoid a second federal government shutdown this year, the impact of the first, the longest in U.S. history, and the anxiety of potentially a second, have had deep and lasting impacts on the State Department and American foreign policy.

In particular, several officials and outside experts told ABC News, concerns remain over department morale, the finances of diplomats and their families deployed overseas, and the recruitment and retention of top talent.

While certain things have improved under Secretary of State Mike Pompeo, they said, there still are deep challenges at State that were exacerbated by the shutdown.

"What it said to many people is, our work is not valued, our contributions are not wanted, why should I work in a place that doesn't care about what I do -- whether I come to work or not?" said retired Amb. Nancy McEldowney, who directed the department's training center, the Foreign Service Institute.

The Harry S. Truman Building, headquarters for the State Department, March 9, 2009.(J. Scott Applewhite/AP) The Harry S. Truman Building, headquarters for the State Department, March 9, 2009.

During the shutdown, approximately one-quarter of American employees overseas and 40 percent in the U.S. were furloughed, according to a State Department spokesperson.

Those working on "the protection of the United States' critical national security interests and the safety of U.S. citizens abroad," per the department, were excepted and required to work without pay.

Even then, these individuals faced restrictions on travel, public outreach like meetings or events, or signing new contracts. That meant the work of real diplomacy, in many ways, had to be put on hold, which McEldowney called "phenomenally disruptive on every level and expensive."

"We got turned into a laughing stock," said a veteran ambassador, who requested anonymity to speak candidly.

That included open jabs at diplomats overseas, including "care packages" from Russian officials and a fake GoFundMe page to donate to U.S. diplomats in an African country, the veteran ambassador said.

The record-long shutdown also poses a long-term threat to the department's ability to find and retain top talent, retired and current officials told ABC News, because of how it affected morale.

One official in Washington dismissed that, saying it wasn't the department's first shutdown, and at this point department employees should know how to handle them. But others expressed concerns about how long the administration allowed the shutdown to continue, compounding financial troubles for diplomats and their families and sending a message of disregard for their work.

President Donald Trump is greeted by Secretary of State Mike Pompeo before speaking to the Ministers of the Global Coalition to Defeat ISIS at the Department of State, Feb. 6, 2019, in Washington, D.C.(Brendan Smialowski/AFP/Getty Images) President Donald Trump is greeted by Secretary of State Mike Pompeo before speaking to the Ministers of the Global Coalition to Defeat ISIS at the Department of State, Feb. 6, 2019, in Washington, D.C.

"There was such a heartless and staggeringly unaware approach from a number of senior administration officials," said McEldowney, including President Donald Trump's remark that the shutdown could last for months or years.

"The mission itself was just gutted and eroded," said the veteran ambassador, who added that's what drives diplomats to do their work. "A big part of what makes us tick is the enormous pride and joy in the mission."

But the State Department pushed back, with deputy spokesperson Robert Palladino telling ABC News in a statement: "The entire State Department team showed remarkable resilience and commitment during the lapse in appropriation. Secretary Pompeo has expressed his sincerest gratitude to our employees for their dedication and sacrifices."

"He is proud of the work we did -- and do every day -- to deliver on our mission and advance the interests of the American people both here at home and around the world," Palladino said.

Still, damage was evident in some data. There was a near 60 percent increase in federal employees at agencies affected by the shutdown indicating they were open to a new job, according to LinkedIn. And a month into the shutdown, the number of applications to jobs at affected agencies dropped by 46 percent compared to last year, according to Glassdoor.

Secretary of State Mike Pompeo speaks to employees at the State Department in Washington, D.C., May 1, 2018.(Yuri Gripas/Bloomberg via Getty Images) Secretary of State Mike Pompeo speaks to employees at the State Department in Washington, D.C., May 1, 2018.

"There's no question the shutdown had devastating consequences for talent in our government... It's a morale cutter. There's nothing worse you can do to a mission-based work force than say you can't do your job," said Max Stier, president and CEO of the Partnership for Public Service, a nonpartisan group advocating for improving the federal workforce.

A White House memo to federal agencies even included the issue among a checklist for managers to review when reopening offices: "Consider employee morale impacts."

Another indicator of trouble critics point to is the decline in Americans taking the Foreign Service Officer Test. In fiscal year 2018, 8,685 people took the exam, about one-third lower than the final fiscal year fully under the Obama administration when 12,666 people did. That's also down from a high of 22,281 in fiscal year 2010, according to State Department data.

"The number of people taking the test is one of key metrics of the health of the organization. To see a number this low is an indicator flashing red on your dashboard," said the veteran ambassador, who added it "took my breath away."

Outgoing U.S. Secretary of State Rex Tillerson delivers his parting remarks to employees at the State Department in Washington, March 22, 2018.(Kevin Lamarque/Reuters) Outgoing U.S. Secretary of State Rex Tillerson delivers his parting remarks to employees at the State Department in Washington, March 22, 2018.

Critics attribute that drop in large part to former Secretary of State Rex Tillerson, who's accused of gutting the department in an effort meet the severe budget cuts demanded by the Trump administration.

"We are seeing an outflow of talent from the State Department -- new talent not coming in," Stier said. "You need a vibrant and capable State Department, and that's under threat."

But a State Department official pointed to the steady increases since Pompeo took the helm. The exam is administered three times a year, and there were 2,845 test-takers in February 2018 under Tillerson, with 3,134 four months later under Pompeo. In October, there was a minimal increase to 3,189, but last Saturday, 3,396 people took the test.

The official also blamed the highs and lows on fluctuations in the job market: When the economy is good, fewer people take the test than when the economy is doing poorly.

Critics agreed, but said the severity of the drop is most concerning.

"For the numbers to be cut in half in such a short period of time, that's dramatic and alarming," said McEldowney, now director of the Master of Science in Foreign Service program at Georgetown University.

Beyond any damage to U.S. standing or the department itself, diplomats said there were individual hardships, too -- struggling to pay medical bills or buy food.

"We suffered just like every other federal worker did, either being furloughed or working without pay," said a veteran ambassador. Some department employees turned to food banks.

While federal workers in the U.S. could work temp jobs, restrictions prevent Foreign Service officers deployed overseas from doing so. Although trained in local languages by the U.S. government, officers' spouses are not, creating a language barrier to overcome to find work, in addition to prohibitive permits and other paperwork.

Aja Harris, a mother of three young children whose husband is in the Foreign Service, told ABC News the various challenges have quickly added up. Originally posted to Moscow, they were among the U.S. diplomats expelled in April 2018 by Russia in a diplomatic tit-for-tat after spending little over a year there. They were then reassigned to Sweden, forced to move again after being relocated temporarily to Washington.

"We ended up getting in quite a bit of debt through all of that," Harris said in an interview last month.

While a second shutdown crisis has been averted, the possibility of another always looms, officials said.

"The fact that federal employees have to continue to have that sword over their head is debilitating," Stier said.

For Harris, it's part of the new normal of her family's life, what she affectionately calls "The Wandering Chaos" on her blog.

"We're pretty used to our lives being up in the air after living in Moscow for a year, but it's a new kind of fear because at least there, we were just going to be sent [back to the U.S.]," she said. "Here, you may not have enough money to feed your kids and family. That uncertainty is really hard."