AgentFixboard

AI Agent with a structured output parser fails after a few turns with nested 'output'

An AI Agent using a structured output parser plus memory works at first, then starts failing schema validation after several turns.

From GitHub

n8n-io/n8n

Difficulty
Easy
Time
~5 min
Steps
2
Fixed in
n8n@1.112.3
Last checked

Verified fix: PR #19376 merged on . Fixed in n8n@1.112.3 (first stable release containing the merge commit). Last checked .

Symptom

An AI Agent using a structured output parser plus memory works at first, then starts failing schema validation after several turns.

Evidence what you'll see

  • Memory holds output: { output: ... } instead of the expected shape
  • Later replies come back wrapped in an extra output key
  • Schema validation error from the structured output parser

Cause

The agent wrapped already-formatted JSON in another output layer before parsing; that nested shape went into memory and the agent copied it in later replies.

Fix steps

0 of 2 done

Your check marks stay in this browser only.

Verify the fix worked

  • Run a multi-turn conversation and confirm each reply matches your schema without an extra output key.

Sources and credit

Summarized in our own words from these public reports. Credit goes to their authors.

Provided as is, without warranty. Try changes in a non-production environment and back up first. Security-related steps: verify against the official docs. Terms · Request removal or attribution change

Hit an error we don't cover? Submit it