solve_visual_challenge
Apply selected tile indices to solve a visual challenge, returning pass/fail/continue status. For dynamic-replace challenges, send fresh selections until verification.
Instructions
Apply the AI client's tile selection, execute the click chain, click Verify, wait for the reCAPTCHA token, and return the outcome. Pairs with inspect_visual_challenge — must be called with the challenge_id returned by the previous inspect call.
Requires confirm: true as a safety latch — an accidental call without confirm returns confirm_required without clicking anything. Also requires QA_VISUAL_CHALLENGE_CONSENT=true at the server level.
DYNAMIC-REPLACE MODE (v0.7.4): when the challenge prompt says 'Click verify once there are none left' (en) / '確定沒有遺漏' (zh), clicked tiles get replaced with new images. solve detects this and returns status: 'continue' with a FRESH screenshot + tile grid instead of clicking Verify. The AI should look at the new screenshot and call solve again with the next matches. To finalize (click Verify and check for a token), pass an empty selected_tile_indices: [].
Returns: {status: 'passed' | 'continue' | 'failed' | 'expired' | 'consent_required' | 'confirm_required' | 'challenge_not_found' | 'error', challenge_id, attempts_remaining, token (only on passed), hint, plus on 'continue': screenshot_base64, tiles, tile_count, grid_layout, rounds_used}. Telemetry logs the boolean outcome only — no screenshots, no challenge text, no tile selection are ever persisted.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| challenge_id | Yes | Required. The challenge_id returned by inspect_visual_challenge. Expires after 5 minutes; re-inspect to get a fresh id. | |
| selected_tile_indices | Yes | Required. The tiles the AI client wants to click, by index (0..tile_count-1). For a 3x3 grid: tile 0 = top-left, 4 = center, 8 = bottom-right. For a 4x4 grid: 0..15 row-major. | |
| confirm | No | Safety latch. MUST be set to true for the click chain to execute. Without it, returns `confirm_required` and clicks nothing — this prevents an accidental tool call from auto-submitting a CAPTCHA. |