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
| Usage | Fields and validation |
|---|---|
| In requests | View fields |
| In responses | View fields |
| In webhook payloads | View fields |
In requests
API JSON uses JSON field names (camelCase).
| Field | Type | Presence | Meaning |
|---|---|---|---|
toolNamePatterns | Array of string | Optional | Requested tool-name selection; not evaluated by the current generation workflow. |
serverIds | Array of string | Optional | Requested MCP server selection; not evaluated by the current generation workflow. |
onFailure | string (FAILURE_MODE_CONTINUE, FAILURE_MODE_STOP_LOOP, FAILURE_MODE_STOP_RUN) or integer (int32) | Optional | Requested failure action; not evaluated by the current generation workflow. |
includeTimeouts | boolean | Optional | Requested inclusion of timeouts as failures; not evaluated by the current generation workflow. |
errorSubstrings | Array of string | Optional | Requested error-text selection; not evaluated by the current generation workflow. |
priority | integer (int32) | Optional | Requested 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.
| Value | No. | Form | Meaning |
|---|---|---|---|
FAILURE_MODE_CONTINUE | 1 | Canonical | Request continued processing after the failed tool call. |
FAILURE_MODE_STOP_LOOP | 2 | Canonical | Request stopping the current tool-execution loop after the failure. |
FAILURE_MODE_STOP_RUN | 3 | Canonical | Request stopping the generation run after the failure. |
In responses
API JSON uses JSON field names (camelCase).
| Field | Type | Presence | Meaning |
|---|---|---|---|
toolNamePatterns | Array of string | Optional | Requested tool-name selection; not evaluated by the current generation workflow. |
serverIds | Array of string | Optional | Requested MCP server selection; not evaluated by the current generation workflow. |
onFailure | string (FAILURE_MODE_CONTINUE, FAILURE_MODE_STOP_LOOP, FAILURE_MODE_STOP_RUN) or integer (int32) | Optional | Requested failure action; not evaluated by the current generation workflow. |
includeTimeouts | boolean | Optional | Requested inclusion of timeouts as failures; not evaluated by the current generation workflow. |
errorSubstrings | Array of string | Optional | Requested error-text selection; not evaluated by the current generation workflow. |
priority | integer (int32) | Optional | Requested 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.
| Value | No. | Form | Meaning |
|---|---|---|---|
FAILURE_MODE_CONTINUE | 1 | Canonical | Request continued processing after the failed tool call. |
FAILURE_MODE_STOP_LOOP | 2 | Canonical | Request stopping the current tool-execution loop after the failure. |
FAILURE_MODE_STOP_RUN | 3 | Canonical | Request stopping the generation run after the failure. |
In webhook payloads
Webhook JSON uses protobuf field names (snake_case).
| Field | Type | Presence | Meaning |
|---|---|---|---|
tool_name_patterns | Array of string | Optional | Requested tool-name selection; not evaluated by the current generation workflow. |
server_ids | Array of string | Optional | Requested MCP server selection; not evaluated by the current generation workflow. |
on_failure | string (FAILURE_MODE_CONTINUE, FAILURE_MODE_STOP_LOOP, FAILURE_MODE_STOP_RUN) or integer (int32) | Optional | Requested failure action; not evaluated by the current generation workflow. |
include_timeouts | boolean | Optional | Requested inclusion of timeouts as failures; not evaluated by the current generation workflow. |
error_substrings | Array of string | Optional | Requested error-text selection; not evaluated by the current generation workflow. |
priority | integer (int32) | Optional | Requested 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.
| Value | No. | Form | Meaning |
|---|---|---|---|
FAILURE_MODE_CONTINUE | 1 | Canonical | Request continued processing after the failed tool call. |
FAILURE_MODE_STOP_LOOP | 2 | Canonical | Request stopping the current tool-execution loop after the failure. |
FAILURE_MODE_STOP_RUN | 3 | Canonical | Request stopping the generation run after the failure. |
Where used
| Reference | Relationship |
|---|---|
| Create an agent profile | POST /api/v1/agent-profiles/create |
| Import a prompt library | POST /api/v1/agent-profiles/import |
| Update an agent profile | POST /api/v1/agent-profiles/update |
| Append a message without generating | POST /api/v1/llm/append-message |
| Create a new conversation thread | POST /api/v1/llm/create-thread |
| Send a message to a conversation | POST /api/v1/llm/send-message |
| Send a message and wait for the result | POST /api/v1/llm/send-message-sync |
| Update context management settings | POST /api/v1/llm/update-context-management-settings |
| Update default generation config | POST /api/v1/llm/update-default-generation-config |
| Update conversation settings | POST /api/v1/llm/update-settings |
| Update the caller's default generation config | POST /api/v1/enduser/update-generation-config |
| Get an agent profile | POST /api/v1/agent-profiles/get |
| List agent profiles | POST /api/v1/agent-profiles/list |
| Withdraw your rating on a message | POST /api/v1/llm/delete-message-rating |
| Get full conversation state | POST /api/v1/llm/conversation-state |
| Rate an assistant message | POST /api/v1/llm/rate-message |
| Submit client-side tool results and wait for the next segment | POST /api/v1/llm/submit-client-tool-results-sync |
| Update prompt variables | POST /api/v1/llm/update-prompt-variables |
| Get the caller's end-user profile | POST /api/v1/enduser/get |
| Generation configuration | API JSON uses JSON field names (camelCase). |
| llm.generation_started | Webhook JSON uses protobuf field names (snake_case). |
| llm.message_published | Webhook JSON uses protobuf field names (snake_case). |
| ToolExecutionPolicy | Nested in model |
| ToolExecutionPolicy | Nested in model |
| ToolExecutionPolicy | Nested in model |
Download the public reference contract.
Document: DOC-API-MODEL-stop-on-failure-rule.