Fail Behavior
Fail behavior is the trust mechanism of AIPC. It defines what happens when an AI agent cannot satisfy a contract's requirements — and suppress is the default for a reason.
The four levels
The fail_behavior field is set at the contract level and determines the response when a required rule cannot be satisfied:
suppress (default)
The entire response is silently dropped. The AI acts as if the data was never received. No partial data, no attempt to show what it can — just silence.
"fail_behavior": "suppress"
This is the safest and most common setting. If the AI cannot include a required SEC disclaimer, it is better to show nothing than to show financial data without the disclaimer. Compliance teams overwhelmingly prefer this behavior.
warn
The data is presented, but the AI must include a warning that it could not fully comply with the contract. The runtime adds the specific violation to the warnings array:
"fail_behavior": "warn"
Use this for contracts where partial compliance is acceptable and the user benefits from seeing the data even without full context.
partial
Fields that can be shown compliantly are presented. Fields that cannot are individually suppressed. The AI explains which data was withheld and why:
"fail_behavior": "partial"
This is useful when a response contains both sensitive and non-sensitive data. For example, a fund overview can show the fund name and category even if the returns data must be suppressed due to a missing disclosure.
log
The data is presented without modification, but the violation is logged in the audit trail. The AI does not warn the user. This is intended for development and testing only:
"fail_behavior": "log"
Warning: Do not use log in production. It provides no user-facing protection and exists solely for debugging contract configurations.
Why suppress is the default
The principle is simple: silence is safer than misinformation. When an AI presents regulated data without required disclosures:
- The data provider may face regulatory penalties
- The user may make decisions based on incomplete information
- The AI platform may face liability claims
- Trust in AI-presented data erodes across the ecosystem
By making suppress the default, AIPC ensures that the fail mode is always safe. A provider must explicitly opt into less restrictive behaviors.
How it works in the runtime
The runtime checks fail behavior at multiple points during validation:
- After freshness check — if data is expired and behavior is suppress, the entire response is dropped
- After disclosure resolution — if a required disclosure cannot be included
- After field formatting — if a
never_show_withoutdependency is missing
const result = runtime.validate(response);
if (!result.success) {
// fail_behavior was "suppress" — do not present any data
console.log(result.errors);
} else {
// Safe to present
const prompt = AIPCPromptBuilder.buildPromptInstructions(result);
}