The submit_result tool marked 'data' as optional (Type.Optional) in its
JSON schema, but runtime validation requires it when status is 'success'.
Models that follow the schema literally omit the data parameter, causing
every call to fail with 'data is required when status is success (got
null/undefined)'. The agent then retries indefinitely.
Change data from Type.Optional(dataSchema) to dataSchema so the schema
matches runtime requirements. Models are now forced to include the data
object when calling submit_result with success, resolving the loop.
For aborted status, models can pass data: {}; validation is skipped.
Co-authored-by: Cursor <cursoragent@cursor.com>