Tines AI action schema error

hi team

We recently started getting an error “The agent finished without returning structured output matching the configured schema.” not seen before with no changes to story.

I’ve included the agent steps and output schema. I have excluded the text.

{
“type”: “object”,
“title”: “close_notes”,
“properties”: {
“summary”: {
“type”: “string”,
“description”: “AI-generated summary of the case findings”,
“minLength”: 100,
“maxLength”: 1000
}
},
“required”: [
“summary”
]
}

{

“steps”: [

{

“role”: “user”,

“contents”: [

{

“text”: “”}",

“type”: “text”

}

]

},

{

“role”: “tool”,

“name”: “think”,

“inputs”: {

“input”: “Let me summarise the key findings into concise bullet points, avoiding the prohibited elements (alert name/verdict, headers, purpose of rule, classification, recommendations/next steps, preamble/postamble). I need to keep it under 990 characters.”

},

“output”: “Thought logged”

},

{

“role”: “tool”,

“name”: “check_size”,

“inputs”: {

“payload”: {

“output_text”: “”

}

},

“output”: “843”

},

{

“role”: “agent”,

“contents”: [

{

“text”: “”,

“type”: “text”

}

]

}

],

“output”: “The agent finished without returning structured output matching the configured schema.”,

“configuration”: {

“prompt”: “”,

“temperature”: “0”,

“system_instructions”: “”

},

“meta”: {

“provider”: {

“name”: “AWS Bedrock”,

“provider”: “aws_bedrock”,

“provisioning_type”: “customer_provisioned”

},

“input_tokens”: 5939,

“output_tokens”: 597,

“credits_used”: 0,

“remaining_credits”: 50,

“model”: “global.anthropic.claude-sonnet-4-6”,

“duration”: 15.250787263

},

“failed”: true

}

Hey @Mikhaily! Thanks for including the schema and the steps, that narrows it down a lot. Sharing some general debugging notes here too, since this error usually comes down to the same handful of causes.

What the error actually means…

When you configure an Output schema, the agent’s final turn has to contain an object that validates against it. This error means the last thing the agent produced wasn’t a schema-valid object. Importantly, it’s not saying your schema is malformed; yours looks fine.

What we can rule out in your case…

Your length constraints aren’t the problem. Your check_size tool returned 843, which sits comfortably inside minLength: 100 / maxLength: 1000. So assuming that’s the text it went on to submit, length isn’t the failure.

The usual causes, in rough order of likelihood…

  1. The model answered in prose instead of returning the object. The fix is to state the contract explicitly. Our best practices guide recommends exactly this under “Specify end results with Output Schema”. Something like “When finished, return your answer as structured output matching the provided schema (the summary field). Do not reply with plain text.”
  2. Valid JSON, but wrapped. Either fenced in a markdown code block, or nested under an extra key like {"output": {"summary": "..."}}. Adding “return the raw object, with no code fences or wrapper keys” clears this up.
  3. Competing definitions of “done.” Competing definitions of “done.” Your current setup gives the model three overlapping notions of a valid answer: the check_size tool, the schema’s length constraints, and the character guidance in the instructions (the think step shows it reasoning about “under 990 characters”). Heavy formatting pressure tends to push a model toward writing rather than submitting. I’d make the schema the single source of truth and simplify the tool, and note that a tool’s Description is passed to the model and shapes when it reaches for it, so it’s worth reviewing what check_size is telling it to do. For a deeper dive, check out our Explained article Writing effective prompts.
  4. Tight constraints turning a near-miss into a hard failure. minLength: 100 in particular. Loosening it, and giving maxLength a bit of headroom, buys tolerance.

On the “nothing changed in the story” bit…

Worth checking anyway, because something outside the story can change underneath it. Your metadata shows global.anthropic.claude-sonnet-4-6 on customer-provisioned AWS Bedrock, so the model is coming from your own Bedrock account rather than Tines’. Two things to verify there:

  • Whether the model or inference profile configured on the Bedrock side was changed or updated recently.
  • That global. prefix is a cross-region inference profile, which can route requests across regions. If you want fully reproducible behavior, a region-specific, version-pinned model ID is the safer choice. Whether a model closes out a tool loop with structured output or with prose is one of the more model-sensitive behaviors there is, so a change here can absolutely surface as a new intermittent failure with no story edit.

Making it resilient either way…

Even once it’s tuned, the AI Agent action has a Retries option (default 25) in task mode, and it’s worth having an explicit error path so a single bad turn doesn’t block a case from closing.

If it keeps happening after adding an explicit “return structured output” instruction, posting the redacted prompt and system instructions will help us keep troubleshooting.