Skip to main content

StopOnFailureRule

Requested tool-selection rule for handling an execution failure. The current generation workflow stores these rules but does not evaluate them or stop a loop or run because of them.

The conditions in stopOnFailureRules, including priority, timeout inclusion and error matching, are not enforced. Do not rely on these fields as a stop control.

Usage profiles​

UsageFields and validation
In requestsView fields
In responsesView fields
In webhook payloadsView fields

In requests​

API JSON uses JSON field names (camelCase).

FieldTypePresenceMeaning
toolNamePatternsArray of stringOptionalRequested tool-name selection; not evaluated by the current generation workflow.
serverIdsArray of stringOptionalRequested MCP server selection; not evaluated by the current generation workflow.
onFailurestring (FAILURE_MODE_CONTINUE, FAILURE_MODE_STOP_LOOP, FAILURE_MODE_STOP_RUN) or integer (int32)OptionalRequested failure action; not evaluated by the current generation workflow.
includeTimeoutsbooleanOptionalRequested inclusion of timeouts as failures; not evaluated by the current generation workflow.
errorSubstringsArray of stringOptionalRequested error-text selection; not evaluated by the current generation workflow.
priorityinteger (int32)OptionalRequested rule priority; not evaluated by the current generation workflow. Minimum: -2147483648. Maximum: 2147483647.

Values of onFailure​

Requested scope of stopping after a tool execution failure.

ValueNo.FormMeaning
FAILURE_MODE_CONTINUE1CanonicalRequest continued processing after the failed tool call.
FAILURE_MODE_STOP_LOOP2CanonicalRequest stopping the current tool-execution loop after the failure.
FAILURE_MODE_STOP_RUN3CanonicalRequest stopping the generation run after the failure.

In responses​

API JSON uses JSON field names (camelCase).

FieldTypePresenceMeaning
toolNamePatternsArray of stringOptionalRequested tool-name selection; not evaluated by the current generation workflow.
serverIdsArray of stringOptionalRequested MCP server selection; not evaluated by the current generation workflow.
onFailurestring (FAILURE_MODE_CONTINUE, FAILURE_MODE_STOP_LOOP, FAILURE_MODE_STOP_RUN) or integer (int32)OptionalRequested failure action; not evaluated by the current generation workflow.
includeTimeoutsbooleanOptionalRequested inclusion of timeouts as failures; not evaluated by the current generation workflow.
errorSubstringsArray of stringOptionalRequested error-text selection; not evaluated by the current generation workflow.
priorityinteger (int32)OptionalRequested rule priority; not evaluated by the current generation workflow. Minimum: -2147483648. Maximum: 2147483647.

Values of onFailure​

Requested scope of stopping after a tool execution failure.

ValueNo.FormMeaning
FAILURE_MODE_CONTINUE1CanonicalRequest continued processing after the failed tool call.
FAILURE_MODE_STOP_LOOP2CanonicalRequest stopping the current tool-execution loop after the failure.
FAILURE_MODE_STOP_RUN3CanonicalRequest stopping the generation run after the failure.

In webhook payloads​

Webhook JSON uses protobuf field names (snake_case).

FieldTypePresenceMeaning
tool_name_patternsArray of stringOptionalRequested tool-name selection; not evaluated by the current generation workflow.
server_idsArray of stringOptionalRequested MCP server selection; not evaluated by the current generation workflow.
on_failurestring (FAILURE_MODE_CONTINUE, FAILURE_MODE_STOP_LOOP, FAILURE_MODE_STOP_RUN) or integer (int32)OptionalRequested failure action; not evaluated by the current generation workflow.
include_timeoutsbooleanOptionalRequested inclusion of timeouts as failures; not evaluated by the current generation workflow.
error_substringsArray of stringOptionalRequested error-text selection; not evaluated by the current generation workflow.
priorityinteger (int32)OptionalRequested rule priority; not evaluated by the current generation workflow. Minimum: -2147483648. Maximum: 2147483647.

Values of on_failure​

Requested scope of stopping after a tool execution failure.

ValueNo.FormMeaning
FAILURE_MODE_CONTINUE1CanonicalRequest continued processing after the failed tool call.
FAILURE_MODE_STOP_LOOP2CanonicalRequest stopping the current tool-execution loop after the failure.
FAILURE_MODE_STOP_RUN3CanonicalRequest stopping the generation run after the failure.

Where used​

ReferenceRelationship
Create an agent profilePOST /api/v1/agent-profiles/create
Import a prompt libraryPOST /api/v1/agent-profiles/import
Update an agent profilePOST /api/v1/agent-profiles/update
Append a message without generatingPOST /api/v1/llm/append-message
Create a new conversation threadPOST /api/v1/llm/create-thread
Send a message to a conversationPOST /api/v1/llm/send-message
Send a message and wait for the resultPOST /api/v1/llm/send-message-sync
Update context management settingsPOST /api/v1/llm/update-context-management-settings
Update default generation configPOST /api/v1/llm/update-default-generation-config
Update conversation settingsPOST /api/v1/llm/update-settings
Update the caller's default generation configPOST /api/v1/enduser/update-generation-config
Get an agent profilePOST /api/v1/agent-profiles/get
List agent profilesPOST /api/v1/agent-profiles/list
Withdraw your rating on a messagePOST /api/v1/llm/delete-message-rating
Get full conversation statePOST /api/v1/llm/conversation-state
Rate an assistant messagePOST /api/v1/llm/rate-message
Submit client-side tool results and wait for the next segmentPOST /api/v1/llm/submit-client-tool-results-sync
Update prompt variablesPOST /api/v1/llm/update-prompt-variables
Get the caller's end-user profilePOST /api/v1/enduser/get
Generation configurationAPI JSON uses JSON field names (camelCase).
llm.generation_startedWebhook JSON uses protobuf field names (snake_case).
llm.message_publishedWebhook JSON uses protobuf field names (snake_case).
ToolExecutionPolicyNested in model
ToolExecutionPolicyNested in model
ToolExecutionPolicyNested in model

Download the public reference contract.

Document: DOC-API-MODEL-stop-on-failure-rule.