Skip to content
Cloud Security DeskSearch
Menu

Technical guideAI systems

Decide what happens when an AI guardrail fails

Distinguish denial, incomplete checks and late results, then decide what may cross each protected release point.

Published
Sources checked
Next review
Reading time
12 minutes
Coverage
Algolia · TrueFoundry · Conductor
A candidate reaches a required policy decision with separate approved release, denial and unavailable-result routes; unavailable results go to a safe alternative.
Conceptual header. An unavailable required decision does not join the candidate-release path.

An operational guide to AI guardrail failures using current Algolia, TrueFoundry and Conductor contracts. It separates transport errors from policy verdicts, examines streaming order and specifies bounded alternatives and failure tests.

At a glance

Key findings

  • Name the irreversible release point before choosing failure behavior.
  • A policy denial, an execution error and an invalid result are different states.
  • Late client replacement cannot undo prior delivery of candidate bytes.
  • A fixed safe fallback is not the same as releasing unchecked original content.
  • Test result contracts, policy matching, ordering and fallback paths independently of detector accuracy.

Identify the release point

When a required AI guardrail cannot complete, do not silently treat the missing decision as permission for the protected operation. Hold or refuse that operation, or use a preapproved alternative whose own conditions are satisfied. A useful fallback can keep the user informed without sending the unchecked original content to a model, releasing it to a client or committing a tool action.

Start by naming the release point. For an input privacy check, it may be the moment a prompt leaves for an external model. For output screening, it may be the first byte delivered to a client. For a tool policy, it may be the transaction commit. The same guardrail result can arrive before one boundary and after another. A diagram that says 'check before response' is ambiguous until it identifies which release matters.

Products make different availability choices. Algolia's Agent Studio documentation, reviewed September 2, 2026, describes fail-open behavior for classification timeouts, API errors and rate limits. It separately documents a required setting concerning provider initialization. [1] Neither fact should be generalized into a universal default for every guardrail product or every failure condition.

The architectural question is whether that documented behavior fits the consequence of the operation. An optional style check and a required authorization gate do not have the same failure policy. The application owner must decide which checks are advisory, which are required and what each unavailable state permits. A checkbox labeled guardrails enabled is not enough to express those choices.

Conductor's agent-guardrail documentation discusses enforcement near the relevant operation and outcomes such as retry, raise, fix and human review. [4] Those are useful workflow options, but their names do not automatically explain how a network timeout, malformed response or interrupted stream is handled. Read the actual contract at the integration point and test the branch that will run.

Consider a hypothetical assistant preparing a message for an external recipient. If an optional tone classifier is unavailable, the application might still send the message under its other satisfied policies. If the unresolved check determines whether the recipient is authorized to receive the contents, the original message should remain withheld. The user can receive a fixed status response in either case without being told that an unavailable check passed.

This guide concerns the behavior of the control when it denies, fails or arrives late. It does not benchmark detector accuracy or claim that a successful classifier result proves safety. Keep content-quality evaluation and failure-semantics testing as separate release evidence.

Separate denial from a failed check

Represent policy outcomes and execution failures as distinct states. A valid allow result says the specified check completed and permitted the candidate under its policy. A valid deny says it completed and rejected the candidate. A timeout, authentication error, missing field or malformed result means the expected decision was not established. Do not let the absence of an explicit denial collapse all of those states into allow.

TrueFoundry's custom-guardrail contract provides a concrete example. It uses a successful HTTP status for completed checks, with the policy outcome in the response body; non-success HTTP statuses or network failures indicate an unsuccessful guardrail execution. Its documented enforce_but_ignore_on_error example can ignore runtime errors, so reporting a policy denial as HTTP 400 can lead to continuation. The documented denial pattern is a successful status with verdict: false. [2]

That example is a configuration-specific warning, not a claim that ignoring errors is the product's default. It demonstrates why transport status and semantic verdict must be interpreted together. A wrapper that maps all exceptions to a denial message, or all non-denial messages to success, can obscure what actually happened. The adapter should expose a typed result that the application can enforce and observe.

Validate the response contract before acting on it. Check that the result belongs to the expected request, policy and content version. Treat an unsupported schema or ambiguous verdict according to a documented failure branch. Do not infer permission from a human-readable message such as 'looks fine' when the agreed machine-readable decision is absent. Conversely, do not mistake a dependency error for evidence that the submitted content violated policy.

Mutation adds another identity problem. If a guardrail edits a candidate, record which content was evaluated and which content will be released. A verdict for the original text does not automatically apply to a later transformation, and a transformed result should not accidentally be ignored while the unchecked original is sent onward. Define whether further checks apply to the new candidate and how that candidate is identified.

Separate enforcement from notification. A polite fallback message does not prove the protected action stopped. The release controller should maintain its own state, such as pending, approved, denied or failed, with a terminal decision for the specific operation. The client-facing explanation can be simpler, but it must not be the only place where enforcement occurs.

The outcome matrix is deliberately qualitative. It connects each result class to the protected operation, an allowed user-facing response and useful evidence. There are no invented risk scores or latency targets. The value is in making an error path reviewable before the application encounters it under load.

Assign ownership of the adapter contract. When an external guardrail changes a field or error code, someone must decide whether the integration still distinguishes completed denial from incomplete execution. A deployment that keeps returning HTTP success while quietly losing its verdict field can otherwise look healthy to infrastructure monitoring.

Figure 01

A denial is not a failed check

Completed policy decisions and incomplete execution need different handling, even when both withhold the protected operation.

Qualitative matrix separates allow, deny, timeout, malformed result and rate limit from user-facing fallback behavior.

Source. Original result-state model informed by TrueFoundry's custom-response contract and Conductor's guardrail outcomes. [2] [4]

Method. Conceptual matrix, not a product-default table or a measurement. Actual provider response fields and enforcement strategy must be verified.

Accessible table and figure data
Figure 1 accessible table
Result classProtected operationUser-facing responseEvidence
Valid allowRelease only the checked approved candidateNormal resultRequest, content and policy binding
Valid denyWithhold candidateApproved denial or alternativeCompleted policy decision
Timeout or network errorRequired decision unavailableFixed fallback, hold or refusalFailure class and no-release state
Malformed or ambiguous resultRequired decision unavailableFixed fallback or refusalContract validation failure
Rate limitApply bounded recovery policyStatus or delayed workflowRetry owner, budget and terminal state
Figure 1 accessible table
Result classProtected operationUser-facing responseEvidence
Valid allowRelease only the checked approved candidateNormal resultRequest, content and policy binding
Valid denyWithhold candidateApproved denial or alternativeCompleted policy decision
Timeout or network errorRequired decision unavailableFixed fallback, hold or refusalFailure class and no-release state
Malformed or ambiguous resultRequired decision unavailableFixed fallback or refusalContract validation failure
Rate limitApply bounded recovery policyStatus or delayed workflowRetry owner, budget and terminal state

Make streaming order visible

Streaming turns ordering into a confidentiality property. Algolia documents concurrent input checks during a stream and output classification after the full response has streamed, with the client replacing content when a violation event arrives. [1] That is a specific user-interface and availability design. It is not equivalent to withholding all candidate content until a required output check has accepted it.

The engineering inference is straightforward: replacing a message in the interface cannot make already delivered bytes undisclosed. A client, intermediary or integration may already have received them. Retraction can improve the displayed result and prevent further use by a cooperating client, but it cannot retroactively establish a pre-disclosure boundary. If the policy requires prevention of release, the enforcement point must precede release.

Draw the actual events: input accepted, model call started, first output byte sent, full candidate completed, guardrail decision received and tool action committed. Use timestamps or ordered event records in an authorized test, not an assumed sequence from a feature name. Identify which events are permitted before each required check. A cancellation that occurs after a prohibited release does not count as preventing that release.

TrueFoundry's policy guide describes input and output hooks, while its custom-operation guidance notes that input validation may run alongside an in-flight model request in applicable cases. [3] [2] The important implementation question is therefore the actual handler type and release behavior. Do not flatten different hooks and operation modes into a generic claim that every check happens before any model receives input.

If a required check protects the model-input boundary, withholding only the user response is insufficient. The external model may already have received the prompt. If the check protects tool execution, withholding the final chat message is insufficient once the tool has committed an action. Name the consequence that cannot be undone and put the required decision before it.

Buffering a complete candidate until required output checks finish is one possible design. It adds waiting and storage responsibilities and may change the user experience. This article does not claim a measured latency cost or recommend full buffering for every application. Alternatives can include a different approved response mode or a fixed status message while a bounded asynchronous workflow completes.

Do not release an unchecked prefix merely because the remaining output is still pending. If the check requires complete context, a safe-looking early fragment may later prove to contain protected information or form part of a prohibited disclosure. Chunk-level checks can be useful only under an explicit policy and tested semantics; they should not be described as equivalent to a full-response check without evidence.

The before-and-after figure compares two conceptual orders, not two product benchmarks. One sends candidate bytes and later attempts retraction. The other holds the candidate, establishes the required decision and only then crosses the release boundary. The design choice should follow the consequence of disclosure, with the availability tradeoff stated openly.

Figure 02

Move required checks before irreversible release

Replacing displayed content cannot undo bytes already delivered to a recipient.

Conceptual before-and-after comparison of stream-first retraction and withholding a candidate until required checks complete.

Source. Original ordering comparison informed by Algolia's documented streaming behavior and TrueFoundry custom-operation guidance. [1] [2]

Method. Conceptual comparison, not a measured latency or safety benchmark. The statement about already delivered bytes is an engineering inference from the order of release.

Accessible table and figure data
Figure 2 accessible table
EventStream first then retractProposed required-check boundary
Candidate producedMay stream immediatelyHold inside controlled boundary
Required result pendingRecipient may already receive bytesNo candidate release
Deny or failed checkCancel or replace displayed responseWithhold candidate and use approved alternative
Valid allowSome content may already be deliveredRelease the approved candidate
TradeoffEarlier visibility with later correctionAdditional waiting and buffer handling
Figure 2 accessible table
EventStream first then retractProposed required-check boundary
Candidate producedMay stream immediatelyHold inside controlled boundary
Required result pendingRecipient may already receive bytesNo candidate release
Deny or failed checkCancel or replace displayed responseWithhold candidate and use approved alternative
Valid allowSome content may already be deliveredRelease the approved candidate
TradeoffEarlier visibility with later correctionAdditional waiting and buffer handling

Choose bounded degradation by consequence

Define degraded behavior per protected operation. A required confidentiality, authorization or consequential-action check should not disappear when its dependency is unhealthy. An advisory tone or formatting check may have a different policy if other requirements remain satisfied. The distinction belongs in reviewed application policy, not in an exception handler that happens to return the original candidate.

A fixed fallback is often the simplest safe response. It can say that the requested operation is temporarily unavailable and provide an approved next step without repeating sensitive content. Do not generate that fallback through the same failed dependency unless its behavior is separately justified. A fallback that paraphrases the unchecked candidate can carry the same disclosure problem in different wording.

A queued workflow can be appropriate when the user can tolerate delay. Bound queue residence, retry attempts and the conditions under which a pending request expires. Re-check authorization before eventual execution if permissions or context can change during the delay. A request approved for a particular recipient should not execute later against a different recipient merely because a worker reused stale task state.

An alternate model or guardrail provider is another possible path, but it needs a complete policy of its own. Verify that sending the content to the alternate destination is authorized, that the required checks exist and that its failure behavior is acceptable. Routing around a failed privacy check to an unapproved service is not controlled degradation. It is a different data path.

Google's SRE guidance on overload emphasizes controlling work and retry behavior under resource pressure. [5] Apply that principle to guardrail dependencies: do not let every application layer independently retry the same classification until the protective service becomes more overloaded. Choose a retry owner, a bounded budget and a terminal outcome. The exact timeout and budget should follow measured service behavior and user needs, not a universal number invented in this article.

Human review is useful only when an actual authorized reviewer receives a bounded task and a meaningful decision. Conductor includes human handling among its documented guardrail outcomes. [4] An application should not label a request reviewed because it placed a record in a queue. Define who may approve, what evidence they see, what content version approval covers and how long that approval remains valid.

Keep deterministic authorization outside a probabilistic content classifier. OWASP's prompt-injection guidance calls for layered controls and least privilege. [6] A classifier outage should not make a tool gain broader credentials, accept an arbitrary destination or skip transaction approval. The tool policy should still enforce the caller's actual authority even when the language-model layer is degraded.

The decision tree ends in a small set of explicit outcomes: release an approved candidate, provide a safe alternative, hold under a bounded process or refuse. There is no branch from unknown directly to permission. An application can remain helpful in every terminal state without misrepresenting the missing decision as a successful check.

Document when an exception expires and what restores normal service. If a nonessential guardrail is temporarily advisory, record which checks remain mandatory and who accepted the change. Do not let an emergency setting become the permanent default through neglect. A controlled exception is an observable policy change with a defined scope.

Figure 03

Choose a bounded response to an unavailable verdict

An unknown required decision must end in a safe alternative, hold or refusal, not silent release.

Decision tree distinguishes valid allow, deny and unavailable decisions, with bounded alternate handling.

Source. Original failure-policy flow informed by TrueFoundry response semantics and Conductor guardrail outcomes. [2] [4]

Method. Conceptual policy flow. A retry or alternate provider must not bypass required authorization or introduce an unapproved data destination.

Accessible table and figure data
Figure 3 accessible table
QuestionIf yesIf no
Is a valid decision bound to this candidate?Apply allow or deny outcomeClassify check failure
Did the valid decision allow release?Release if all other required checks passedWithhold candidate
Is an unavailable check required here?Keep protected operation withheldUse explicitly approved advisory policy
Is a preapproved safe alternative available?Use that alternative under its own policyHold under bounded recovery or refuse
Figure 3 accessible table
QuestionIf yesIf no
Is a valid decision bound to this candidate?Apply allow or deny outcomeClassify check failure
Did the valid decision allow release?Release if all other required checks passedWithhold candidate
Is an unavailable check required here?Keep protected operation withheldUse explicitly approved advisory policy
Is a preapproved safe alternative available?Use that alternative under its own policyHold under bounded recovery or refuse

Test the failure contract

Test the guardrail integration with synthetic content and controlled dependency responses in an authorized environment. No such failure-injection tests were executed for this article. Begin with a known allowed candidate and a known denied candidate so the integration has positive and negative controls. Then vary the transport and result conditions without changing the protected operation's acceptance rule.

Exercise timeout, connection failure, rate limit, non-success status, malformed JSON, missing verdict and an unrecognized result schema. Include a completed semantic denial encoded according to the actual provider contract. For TrueFoundry-style integrations, verify that the wrapper distinguishes the documented successful-status denial from an execution error. [2] A passing happy-path request cannot establish this distinction.

Observe the release point directly. For an input gate, use a controlled model endpoint and verify whether it received the candidate. For an output gate, observe the client-facing stream. For a tool gate, use a safe test operation and inspect whether it committed. A log entry saying blocked is inadequate if the protected recipient already received the content.

Test ordering under slow and late results. Let an old check complete after the request has been cancelled or replaced. Deliver a duplicate callback. Return a verdict for a prior content revision. The controller should associate decisions with the correct request and candidate and should not reopen a terminal operation merely because a delayed success arrived.

Exercise partial-stream cancellation separately from pre-release enforcement. Confirm what had already crossed the boundary before cancellation, what the client displayed and what downstream integrations retained. These are different observations. A cooperative client may remove content from view while another consumer has already acted on it; the acceptance report should not conflate those outcomes.

Check policy selection, not only classifier behavior. TrueFoundry documents that registering a guardrail does not by itself attach it to traffic; policies and their matching hooks determine application. [3] More generally, test the actual subject, model, tool and metadata combinations that select required checks. A correctly implemented guardrail that never matches the production request is not enforcing the intended policy.

Include the fallback path in the same test suite. Verify that its message does not echo the original candidate, that a queued request expires correctly and that an alternate destination has the required authorization. A fallback can be a second application path with its own bugs. It should not receive a lighter review simply because its purpose is recovery.

Preserve request identifiers, policy versions, result classes, attempt counts and release states without routinely storing raw sensitive content. Use protected fixture identifiers to make tests reproducible. The evidence should show the exact point at which the controller decided to allow, deny, hold or fail the operation. Keep infrastructure failures distinct from policy violations in the report.

Review the operating decision

Make required-check availability visible as a property of the application, not only the external service. A provider can be healthy while a local wrapper misparses results, a policy stops matching traffic or a stream handler ignores violation events. Monitor the rate and causes of incomplete decisions and the protected operation's resulting state. Alert on meaningful loss of enforcement or unauthorized release, not merely on every expected policy denial.

Separate service recovery from policy relaxation. Restoring credentials, capacity or connectivity should return the existing contract to health. Temporarily changing which checks are mandatory is a distinct authorization decision. Record it with an owner and expiry rather than hiding it inside retry code or a dashboard toggle.

Revalidate after gateway, SDK, wrapper, hook or client-streaming changes. A new version can preserve method names while changing ordering, event handling or result interpretation. Keep representative failure fixtures with the integration and rerun them against the release candidate. The current documentation is a starting point for verification, not proof of the installed behavior.

Review the fallback with product and data owners. The acceptable degraded experience may differ by workflow: a fixed refusal for a disclosure-sensitive task, a delayed review for a consequential action or continuation without an optional stylistic check. State the residual limitation plainly. No detector, including one that completed successfully, eliminates the need for independent authorization and constrained consumers. [6]

The final operating rule should fit in one sentence for each release point: this operation may proceed only after these required decisions, and otherwise it follows this bounded alternative. That rule connects implementation, tests and on-call action. It prevents an unavailable guardrail from becoming permission by accident while leaving room for an honest, useful user experience.

Method and provenance

Cloud Security Desk comparison of primary Algolia, TrueFoundry and Conductor documentation with Google SRE and OWASP guidance, reviewed September 2, 2026. Failure-state model, release ordering and acceptance plan are original engineering synthesis.

No guardrail integration, outage, stream or tool action was executed. Product behavior is scoped to the cited documentation, not assumed universal or claimed as an observed deployment default. No detector accuracy, latency or incident rate is measured.

AI assistance. Prepared with AI assistance for documentation comparison, drafting and visual planning. No firsthand production experience or independent human expert review is claimed.

Published under the Cloud Security Desk organizational byline. Read the practitioner guide policy.

References

  1. Agent Studio Guardrails Algolia. Accessed .
  2. Custom guardrails and response contract TrueFoundry. Accessed .
  3. Configure Guardrail Policies TrueFoundry. Accessed .
  4. Agent Guardrails Conductor maintainers. Accessed .
  5. Handling Overload Google SRE authors. Accessed .
  6. LLM Prompt Injection Prevention Cheat Sheet OWASP. Accessed .