Agent Builder - JSON Schema editor duplicates required and breaks the editor

Thanks for the very clear repro and screenshot – this looks like a bug in the JSON-schema editor, and the malformed default on the answers property is likely what’s triggering it.


In the schema you pasted, the answers property has:

"default":

with no value. That’s not valid JSON, and the editor appears to get into a bad internal state when it tries to parse and then re-save the schema. On reopen, it repeatedly appends the same keys into required, and later when it tries to mutate required it hits a.required is undefined, which is why you can’t edit or switch the output type anymore.

As a workaround:

  1. Update the schema so that answers.default is either a valid JSON value (e.g. []) or remove default entirely. For example:
"answers": {
  "type": "array",
  "description": "An array of 4 possible answers. One is correct; the other three are incorrect.",
  "items": { "type": "string", "description": "A possible answer to the question." },
  "minItems": 4,
  "maxItems": 4
}
  1. Create a new step with response_format.type = "json_schema" and paste the cleaned schema.
  2. Save, close, and reopen the Advanced editor to confirm that:
    • required contains each key only once, and
    • editing or changing the output type no longer throws a.required is undefined.

Once the new step is working, you can delete the old broken one. We’ve flagged the behavior internally so the editor can handle malformed JSON more gracefully instead of corrupting required. Please let us know if this helps. Thank you!