When an agent is most confident, it can be most wrong
Confidence is a property of the story an agent tells itself. Correctness is a property of the world. Nothing guarantees the two agree, and in the expensive cases they often do not.
There is a habit of mind that autonomous AI quietly exploits. When something states its answer plainly, without hedging, we read the certainty as a signal that the answer is sound. A person who hesitates has probably found the hard part. A person who answers fast and clean has probably seen it before. For humans, most of the time, that heuristic holds. For an agent it can fail exactly when it costs the most, and understanding why is worth more than any single fix.
Start with what an agent's confidence actually measures. It is a statement about how well the answer fits the agent's internal account of the situation. A confident agent has produced a story where the pieces line up: the request looked like a known kind, the steps followed cleanly, nothing contradicted anything else. That is a real property, and it is worth something. It is just not the property you care about. The property you care about is whether the answer matches reality, and reality is not in the room when the agent decides. Confidence is measured against the agent's own model of the case. Correctness is measured against the case. Two different rulers.
Why the two can run backward
If confidence and correctness were merely unrelated, you could shrug and move on. The sharper claim is that in a certain band of cases they run in opposite directions, and that band is where the expensive errors live.
Consider how confidence gets built. An agent is most sure on inputs that look canonical: the clean, familiar, textbook-shaped case it has effectively seen a thousand times. Familiarity produces fluency, and fluency reads as certainty. Novelty does the reverse. When an input looks strange, the agent hedges, asks for more, or flags the case, and a hedge is a gift because it tells you to look. So the agent's confidence is, in effect, a detector for looks routine.
Now picture the dangerous input: a case that looks routine but is not. An address change that reads like every other address change but crosses a jurisdiction with a different rule. A refund request shaped like a hundred approved ones but attached to an account under a hold nobody surfaced. These wear the costume of the canonical case, so they trigger the agent's highest confidence, and they are exactly the cases where the confident answer is wrong. The very features that make the agent sure are the features that hid the twist. High confidence is not just failing to protect you here. It is selecting for the failure.
This is why the intuition is treacherous. On the easy middle of the distribution, confidence and correctness rise together and the heuristic works. Out in the tail, where a familiar surface hides an unfamiliar case, they come apart, and they can invert. The agent is never more assured than on the case it has most thoroughly misread.
What this means for how you operate
The lesson is not that confidence is useless. It is that confidence is a claim, not a result, and a claim has to be checked against something it cannot see. An agent's certainty is an input to your judgment, never a substitute for it. Treating a confident answer as a verified one is the same mistake as treating a clean trace as a good outcome: you are accepting the system's account of itself in place of the thing the account was supposed to be about.
Which means the confident cases deserve at least as much scrutiny as the hesitant ones, not less. The instinct to fast-track the sure answers and reserve review for the flagged ones is precisely backward for the failures that matter, because the failures that matter arrive flagged as certain. The only durable check is the same one the rest of this discipline keeps returning to. Confidence is settled by comparing the decision to what actually happened, not by how sure the agent sounded when it made it.
This essay describes a phenomenon: that an agent's stated confidence and its correctness are measured against different things and can move apart. It does not describe how to detect the gap, score it, or correct for it. Those are questions of method, and method is where this library draws its line. The point here is only to stop reading confidence as proof, so you know to check.