classify_action_outcome
Classify the outcome of the most recent action as success, no_op, backend_failure, ui_failure, or unknown using UI state changes, action type, and optional network evidence.
Instructions
Classify the outcome of the most recent action into exactly one of: success, no_op, backend_failure, ui_failure, unknown.
Use the runtime action result's action_type as actionType so the classifier can distinguish local-state actions from side-effect actions.
Use this when the intended outcome is not already fully verified by the UI signal alone.
For backend/API activity, compare get_screen_fingerprint before and after the action and call get_network_activity immediately after the action if the outcome is still ambiguous.
HOW TO GATHER INPUTS before calling:
Call wait_for_screen_change or compare get_screen_fingerprint before/after — set uiChanged accordingly.
If you checked for a specific element with wait_for_ui, set expectedElementVisible.
Pass actionType from the action response when available.
Only provide networkRequests if you already collected them or want to classify a side-effect action with backend evidence.
RULES (applied in order — stop at first match):
If uiChanged=true OR expectedElementVisible=true → outcome=success
If actionType is missing → outcome=unknown
If any request has status=failure or retryable → outcome=backend_failure
If actionType maps to a local-state action → outcome=no_op; prefer state-based verification and avoid default network fallback
If actionType maps to a side-effect action and no networkRequests were supplied → outcome=unknown
If no requests returned → outcome=no_op
If all requests succeeded → outcome=ui_failure
Otherwise → outcome=unknown
BEHAVIOUR after outcome:
success → continue
no_op → retry with richer state verification or re-resolve the element
backend_failure → stop and report the failing endpoint
ui_failure → stop and report failure
unknown → take one recovery step (e.g. capture_debug_snapshot), then stop
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uiChanged | Yes | true if the screen fingerprint or activity changed after the action. Use wait_for_screen_change or compare get_screen_fingerprint before and after. | |
| actionType | No | The runtime action_type from the action response (for example tap, tap_element, swipe, type_text, press_back, start_app). | |
| hasLogErrors | No | true if structured log errors were observed (e.g. from read_log_stream). Optional — include if you have already read logs. | |
| networkRequests | No | Optional network evidence collected after the action. Use it when the expected outcome is backend/API activity or when the UI signal is ambiguous. | |
| expectedElementVisible | No | true if the element you expected to appear is now visible (from wait_for_ui). Omit if you did not check for a specific element. |