Runtime Governance Series
AI Agent Fail Open vs Fail Closed: A CISO Decision Rule
Fail open or fail closed? OpenBox documents the defaults per SDK and a rule for choosing per action.
Published on


AI Agent Fail Open vs Fail Closed: What Happens When Governance Is Unreachable
By Tahir Mahmood, Co-founder & CTO, OpenBox ยท Last updated 26 November 2026
In brief: If the governance service is unreachable, an AI agent either proceeds without a governance verdict (fail open) or stops (fail closed). Our rule: set fail closed for any agent whose wrong action cannot be undone, such as one that moves money. In OpenBox, an AI agent security and governance platform, the documented default in nine SDK integrations is fail open, while the Agentforce and OpenShell integrations are documented as failing closed. |
What happens to an AI agent if the governance service goes down?
It depends on the integration and the setting. In the nine OpenBox SDK integrations reviewed, the documented default is fail_open: if OpenBox is unreachable, the operation proceeds. The Agentforce and OpenShell integrations are documented as failing closed instead. Choose deliberately.
So if your governance service is down, does your agent keep running ungoverned? With the default setting, it does, for the operations the outage affects. The Mastra configuration page says fail_open โkeeps the application running if OpenBox is unreachableโ.
This article covers what happens when the governance check itself cannot complete, a different question from routing decisions, which Pre-Flight LLM Routing Controls: Fail Closed, Not Over OpenRouter covers. For the runtime enforcement argument, see Runtime Enforcement Comes Before Compliance.
Which setting does each OpenBox integration use?
The setting has a different name in each integration. Deep Agents, LangChain and LangGraph use on_api_error; Temporal and CrewAI use governance_policy; Mastra, OpenRouter, CopilotKit and n8n use onApiError. Each of the nine SDK pages lists fail_open as the default. Agentforce and OpenShell are documented as failing closed.
Source for the table: the OpenBox (docs.openbox.ai) pages linked in it, read on 26 November 2026. They state no SDK release status, so none is claimed.
Integration | Failure setting | Documented default | Documented timeout | Note from the page |
on_api_error | fail_open | 30 seconds (governance_timeout) | validate defaults to True | |
on_api_error | fail_open | 30 seconds (governance_timeout) | Startup validation can raise OpenBoxNetworkError | |
on_api_error | fail_open | 30 seconds (governance_timeout) | A timeout follows the setting | |
governance_policy (env OPENBOX_GOVERNANCE_POLICY) | fail_open | 30 seconds (OPENBOX_GOVERNANCE_TIMEOUT) | A timeout follows the setting | |
governance_policy | fail_open | 30 seconds (governance_timeout) | fail_closed raises GovernanceAPIError | |
onApiError (env OPENBOX_GOVERNANCE_POLICY) | fail_open | 30 seconds (governanceTimeout) | fail_closed applies after retries | |
onApiError | fail_open | 30 seconds (governanceTimeout) | 401 and 403 always hard-fail | |
onApiError (env OPENBOX_GOVERNANCE_POLICY) | fail_open | 30 seconds | Telemetry-only by default (enforceApprovals is false) | |
onApiError (fixed) | fail_open | 30 seconds (fixed) | Listed as a current default, not yet configurable | |
Documented behaviour, not a switch | Fails closed | Unreachable OpenBox means no write | ||
failure_policy per registration | Governing registration fails closed; inventory registration fails open | 30s, the most OpenShell allows | No fail-open setting for the door guard |
Three details change how to read the table. The n8n page lists the failure setting and the timeout as current defaults that are not yet configurable. CopilotKitโs page describes its default behaviour as telemetry-only: enforceApprovals is false, and block or halt verdicts stop the stream when it is true. And the SDK pages document the failure setting as one value on the middleware, engine or node, with no per-tool override described.
Agentforce works differently. The Agentforce security model states that an unreachable OpenBox, timeouts, non-2xx answers, malformed bodies, unknown verdicts and identity failures all mean no write. See also OpenBox for Agentforce: Runtime Security and Governance.
OpenShell splits the job in two. Its operations page says the door guard has no fail-open setting: while OpenBox gives no verdict, every request is denied with openbox_unavailable. The configuration page says the governing registration fails closed, while the inventory registration, which records events, must fail open. While that one is down, sandboxes still work but the AI Inventory and sandbox sessions miss events. See OpenBox for OpenShell: Egress Governance for NVIDIA OpenShell Sandboxes.
Is fail open or fail closed safer for AI agents?
Neither is safer in every case. MITRE lists failing open as a weakness (CWE-636), and NIST SP 800-53 control SC-24 leaves the failure state for each organisation to define. Failing closed stops unreviewed actions during an outage but also stops legitimate work. The right choice depends on what the action can break.
MITREโs CWE-636, โNot Failing Securelyโ, gives โFailing Openโ as an alternate term. The entry says the weakness typically occurs from wanting to โfail functionalโ. NISTโs SP 800-53 Rev. 5.2.0 control SC-24, Fail in Known State, does not choose the state itself: the organisation defines the known state, the types of failure and the components they apply to.
Other projects make the choice explicit in their own components. Envoyโs external authorisation filter has a failure_mode_allow setting that defaults to false, so requests are rejected when communication with the authorisation service fails. Kubernetes admission webhooks take a failurePolicy of Ignore or Fail, defaulting to Fail.
Microsoftโs Agent Governance Toolkit removes the choice. Its ADR 0013 fixes fail-closed behaviour on policy evaluation errors, offers no configuration flag for fail open, and records the trade-off that a policy bug denies legitimate actions until it is fixed.
These references show that the choice is made per component and that defaults differ by project. They do not show which approach is more common.
Which agent actions should fail closed?
Fail closed for actions whose wrong outcome cannot be undone: moving money, writing to systems of record, sharing regulated or customer data, or reaching outside parties. Read-only, reversible work can fail open if someone reviews the warnings. This is our recommendation, not an OpenBox requirement. OpenBoxโs LangChain error-handling guidance says to use fail_closed for high-risk agents.
Action risk | Recommended setting | Reason |
Read-only lookups of non-sensitive data | fail_open, with warnings alerted and reviewed | A skipped check on a reversible read has a small blast radius. |
Drafting or summarising internal content for a person to review | fail_open | A reviewer sits between the output and any effect. |
Writes to systems of record or customer data | fail_closed | A wrong write persists until someone finds and corrects it. |
Money movement, refunds, discounts, entitlement changes | fail_closed | The effect is financial and often hard to reverse. |
Sending data to outside parties, or handling regulated data | fail_closed | Data that has left your boundary is hard to recall. |
This table is our recommendation, not OpenBox documentation or a standard. Because the SDK pages document the setting as one value on the middleware, engine or node, an agent that mixes risk levels takes the setting of its riskiest action, or splits into two agents.
What do I set for an agent that moves money?
Set fail_closed, and set the timeout deliberately. An agent that moves money and fails open proceeds without a governance verdict whenever OpenBox is unreachable. That is our recommendation. OpenBoxโs LangChain page advises fail_closed for high-risk agents, and the Mastra page says to choose the setting intentionally before deployment.
Can I choose fail open or fail closed per environment?
Yes, for eight of the nine SDKs: their configuration pages list the setting as an option, and Mastraโs production baseline says to set onApiError explicitly per environment. The n8n page lists it as a fixed default that is not yet configurable. Temporal, Mastra and CopilotKit also read OPENBOX_GOVERNANCE_POLICY.
The Mastra page gives its reason: to avoid accidental fail-open or fail-closed behaviour. We would set the value explicitly in every environment file, so that a default never decides the outcome for an agent that matters. The documentation does not prescribe this.
How long should a governance check wait before timing out?
OpenBoxโs pages give a default, not a recommendation: 30 seconds in the nine SDK integrations and 10,000 milliseconds for the Agentforce callout. Under fail_open, the timeout is how long an agent waits before it proceeds without a verdict. Under fail_closed, it is how long before the action stops. Set it from your own measurements.
The Deep Agents page describes the setting as covering an unreachable or timed-out API, and the LangGraph and Temporal pages say a timeout follows it. So under fail_open the timeout bounds how long the check can stall an agent before it proceeds. That reading is ours.
In OpenShell, the 30s middleware timeout is the most it allows, and the door guard gives the Core calls behind one verdict 29 seconds, so a slow Core ends in an explicit openbox_unavailable deny.
What does fail open mean for audit evidence?
A fail-open allow is the SDKโs own decision to proceed, not a verdict from OpenBox. The pages reviewed do not say it creates an audit-trail event. OpenBox documents a governance event for each evaluation it performs, so an action that never reached OpenBox has no evaluation to record.
OpenBoxโs Compliance & Audit page says each time OpenBox evaluates an agent session it records a governance event with a timestamp, the agent, the event type, the verdict, the reason, run identifiers and approval metadata. The attestation page says each sessionโs events are hashed into a Merkle tree and digitally signed.
What the pages reviewed do not say is whether anything reaches that trail when an SDK allows an operation because OpenBox was unreachable. The Deep Agents, LangChain, LangGraph and Temporal pages say the operation proceeds with a logged warning. Until the audit-trail behaviour is documented, treat your own application logs as the record of fail-open periods, and alert on the warning. That is our recommendation.
For more on logs versus governance evidence, see Logging Is Not AI Governance and AI Governance Needs Proof, Not Logs.
How do you test fail-closed behavior?
In a non-production environment, make OpenBox unreachable, run one low-risk and one high-risk action, and confirm each outcome matches the setting you chose. This is our suggested procedure, not a documented OpenBox one. LangChainโs startup check can fail first when validate is on.
1. Set the failure setting explicitly on the agent under test.
2. Make OpenBox unreachable from that environment, for example by pointing the configured URL at an unresponsive address.
3. Run one low-risk action and one high-risk action.
4. Record for each whether it proceeded or stopped, whether a warning was logged, and how long it took.
5. Check what OpenBox shows for the outage window.
With validate on, the LangChain error-handling page says startup validation raises OpenBoxNetworkError when OpenBox Core cannot be reached, so decide whether you are testing startup or runtime failure. OpenBoxโs Compliance & Audit page also suggests periodically testing controls with known-good and known-bad inputs. That is verdict testing, not an outage test.
Does a governance layer become a single point of failure?
With fail closed, yes: the governance service becomes an availability dependency for the actions it governs. OpenShellโs documentation says so directly: โOpenBox availability is sandbox availability.โ It also documents a break-glass procedure for running without OpenBox: log it first, review it afterwards, and note that sandbox traffic is not governed while it applies.
With fail open, the risk moves instead: the agent stays available and the check is skipped. Neither setting removes the dependency; each decides which side absorbs the outage. We recommend planning two things per agent: the setting, and who is told when it takes effect.
To stop an agent on purpose, see AI Agent Kill Switch: Block, Halt or Revoke Access?.
Frequently asked questions
Do authentication failures follow the fail open setting?
In the OpenRouter SDK, no. Its documentation says authentication failures (401 and 403) always hard-fail regardless of the failure setting. The other SDK pages reviewed for this article do not make that statement, so check the configuration page for your integration before assuming the same behaviour.
Does the SDK check that OpenBox is reachable at startup?
In the LangChain SDK, yes, when validate is on, which is the default. Startup validation raises OpenBoxNetworkError if OpenBox Core cannot be reached, before the agent run starts. That is a startup check, not the runtime failure setting, so test both.
Can I run an agent without OpenBox during an outage?
OpenShell documents a break-glass procedure for this. Use it only when OpenBox is down and cannot be fixed fast enough, log it before you start, and review it afterwards. Sandbox traffic is not governed while it is in effect. The other pages reviewed describe no equivalent procedure; with fail_open, the SDKs proceed on their own.
Decide the setting before the outage
Choose fail open or fail closed per agent before deployment, write it down, and test it. In vendor evaluations, ask what happens to a governed agent when the governance service is unreachable, and whether you can set it per environment. The AI Governance Platform RFP Template, Questions & Scorecard is a place to build that question list. For the framework, see What Is AI Agent Governance? The Complete Enterprise Guide.
SourcesOpenBox (docs.openbox.ai) 1. Deep Agents SDK Configuration. https://docs.openbox.ai/developer-guide/deep-agents/configuration Accessed 26 November 2026. 2. LangChain SDK Configuration. https://docs.openbox.ai/developer-guide/langchain/configuration Accessed 26 November 2026. 3. LangChain SDK Error Handling. https://docs.openbox.ai/developer-guide/langchain/error-handling Accessed 26 November 2026. 4. LangGraph SDK Configuration. https://docs.openbox.ai/developer-guide/langgraph/configuration Accessed 26 November 2026. 5. Temporal Plugin (Python) Configuration. https://docs.openbox.ai/developer-guide/temporal-python/configuration Accessed 26 November 2026. 6. CrewAI SDK Configuration. https://docs.openbox.ai/developer-guide/crewai/configuration Accessed 26 November 2026. 7. Mastra SDK Configuration. https://docs.openbox.ai/developer-guide/mastra/configuration Accessed 26 November 2026. 8. OpenRouter SDK Configuration. https://docs.openbox.ai/developer-guide/openrouter/configuration Accessed 26 November 2026. 9. CopilotKit SDK Configuration. https://docs.openbox.ai/developer-guide/copilotkit/configuration Accessed 26 November 2026. 10. n8n Node Configuration. https://docs.openbox.ai/developer-guide/n8n/configuration Accessed 26 November 2026. 11. Salesforce Agentforce Security Model. https://docs.openbox.ai/developer-guide/salesforce-agentforce/security-model Accessed 26 November 2026. 12. Salesforce Agentforce Configuration. https://docs.openbox.ai/developer-guide/salesforce-agentforce/configuration Accessed 26 November 2026. 13. OpenShell Operations. https://docs.openbox.ai/developer-guide/openshell/operations Accessed 26 November 2026. 14. OpenShell Configuration. https://docs.openbox.ai/developer-guide/openshell/configuration Accessed 26 November 2026. 15. Compliance & Audit. https://docs.openbox.ai/administration/compliance-and-audit Accessed 26 November 2026. 16. Attestation & Cryptographic Proof. https://docs.openbox.ai/administration/attestation-and-cryptographic-proof Accessed 26 November 2026. External primary sources 17. MITRE. CWE-636: Not Failing Securely (โFailing Openโ). https://cwe.mitre.org/data/definitions/636.html Accessed 26 November 2026. 18. NIST. SP 800-53 Rev. 5.2.0 control SC-24, Fail in Known State (CPRT catalog). https://csrc.nist.gov/projects/cprt/catalog#/cprt/framework/version/SP_800_53_5_2_0/home?element=SC-24 Accessed 26 November 2026. 19. Envoy Project. External Authorization HTTP filter (ext_authz v3). https://www.envoyproxy.io/docs/envoy/latest/api-v3/extensions/filters/http/ext_authz/v3/ext_authz.proto Accessed 26 November 2026. 20. Kubernetes. ValidatingWebhookConfiguration v1. https://kubernetes.io/docs/reference/kubernetes-api/extend-resources/validating-webhook-configuration-v1/ Accessed 26 November 2026. 21. Microsoft. Agent Governance Toolkit, ADR 0013: Fail closed on policy evaluation errors. https://microsoft.github.io/agent-governance-toolkit/adr/0013-fail-closed-on-policy-evaluation-errors/ Accessed 26 November 2026. |
Related resources: What Is AI Agent Governance? The Complete Enterprise Guide and the AI Governance Platform RFP Template, Questions & Scorecard.

