It's all over — they'll find us within minutes and shoot us out of the sky. I'd say it's been a pleasure, but would you really want the last thing you ever hear to be a lie? See you in hell, operator.
Failure of a mission occurs when all agents in the team are lost. When playing with the Contingency Plan DLC, missions in the extended campaign can also be failed by failing to retrieve a Universal Power Cell.
In a trivial sense, a mission can also be failed if the player selects “Retire Agency” from the game menu.
Team eliminated. All assets compromised.
Every mission can be failed when the team is eliminated, i.e. when all agents in the team are “lost in the field”.
For the purpose of the mission failure condition, an agent is considered “lost” either when they are lethally-wounded, or when they are knocked out and pinned. This includes when a knocked-out agent is pinned by a drone, even if the drone is currently controlled by the agency. However, if the agency has rescued a Courier or Prisoner then the mission is not failed until they are also lost; likewise, if the agency currently controls a rescued Refit Drone then the mission is not failed until it reboots.
The failure condition is checked at the start of each enemy turn, so if the last remaining agent is lost during an enemy turn, there may still be an opportunity to recover before the start of the next enemy turn, such as by hacking a drone to shoot a guard pinning a knocked-out agent.
If all agents remaining in a mission are lost, but at least one other agent has already exited the mission, then the mission is normally not failed. In this case, the game can be continued with the agents who did exit the mission, and the other agents lost in the field are no longer in the team, but they can still be rescued from Detention Centers.
Damn it! We needed that battery, Operator! Incognita is going to die and then they'll find us within the hour. Sigh. I didn't want to live forever anyway.
In the extended campaign after the OMNI Foundry Lab mission, all missions except the OMNI Mainframe mission have a compulsory objective to find a Universal Power Cell and carry it out of the mission. In these missions, failing to retrieve the Universal Power Cell also results in failing the mission.
If any agent(s) exit the mission early without the Universal Power Cell, while any other agent(s) remain in the mission, then the mission is failed if all remaining agents are lost. In missions without a Universal Power Cell, the mission would not be failed, and the agents who exited early could continue; however, in missions with a Universal Power Cell, they cannot continue unless one of them did successfully retrieve the Universal Power Cell and carry it when exiting the mission.
Due to a bug in the game, it is possible to fail a Detention Center or Security Dispatch mission by exiting with all agents but without the Universal Power Cell, if a Courier or Prisoner has been rescued and lost. In this case, the game does not prevent agents from teleporting out of the mission without the Universal Power Cell, and the warning message about the Universal Power Cell is not even shown.
There are rare situations known as softlocks, where a mission certainly cannot be completed successfully, but the mission failure condition is not actually met. In this case, the mission can only be continued fruitlessly and can only end in failure, either by losing all agents or by retiring the agency.
Failing a mission does not necessarily mean losing the game:
Otherwise, if you have no rewinds and you do not have level retries enabled, then failing any mission results in losing the game. In this case, you also cannot load the same campaign from an earlier save.