> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sequentum.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Fail

> Fails an Agent when a configured condition is true.

The Fail command fails an Agent when a configured condition is true. Use it to stop execution and return a selected failure message. Located under **Other** in the command palette.

## Configure a failure condition

Build a condition from the selected XPath and apply transformations when needed.

![Fail command selection and transformation settings](https://mintcdn.com/sequentum/dOYM46qwxTPgqNVx/images/agents/commands/fail/img-02.png?fit=max\&auto=format\&n=dOYM46qwxTPgqNVx\&q=85\&s=c39bdfd32a23ee8ad53ff45a8d9f4f6c)

For example, if the condition is satisfied, return the failure message; otherwise, return an empty string.

![Example Fail command condition](https://mintcdn.com/sequentum/dOYM46qwxTPgqNVx/images/agents/commands/fail/img-03.png?fit=max\&auto=format\&n=dOYM46qwxTPgqNVx\&q=85\&s=2157902e01172e01806b6c1881937161)

## Command properties

### Selected failure message

![Fail selected failure message settings](https://mintcdn.com/sequentum/dOYM46qwxTPgqNVx/images/agents/commands/fail/img-07.png?fit=max\&auto=format\&n=dOYM46qwxTPgqNVx\&q=85\&s=ae187fa9bd49b5a0d78730bac9253066)

* **When missing:** Defines how the Agent behaves when content is not found. The default is **Ignore**, which means the Agent moves forward without logging an error and proceeds to the next sibling command.
  * **Fail:** The Agent stops and returns an error. If parallel commands exist, it logs the error and moves to the next parallel command.
  * **Warn:** The Agent logs a warning but continues processing further commands.
  * **Ignore:** The Agent logs neither an error nor a warning, skips child commands, and moves to the next parallel command.
* **When hidden or disabled:** Controls how the Agent handles selected elements based on their visibility or enabled state.
  * **Select:** The Agent selects visible and disabled elements that match the XPath.
  * **Ignore:** The Agent selects only elements that are present and enabled—that is, elements that match the XPath and are interactable.
* **Selected failure message:** Shows the content selected by the command on the current page. If no content is selected or the selection is missing, it displays **No selected Content**.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.