Problem
Some MCP tool servers return responses with double-encoded JSON, e.g.:
{"result": "{\"pods\": [{\"name\": \"api-server-abc\", ...}]}"}
When this is written to the scratchpad as an artifact, the exploration tools (get_in, iterate_over, schema, etc.) can't parse the inner content because they encounter a string where they expect an object/array.
This is the root cause of some remaining max_depth failures in orchestration — workers spend turns trying to extract data from artifacts that the exploration tools can't navigate, eventually exhausting their turn budget.
Expected Behavior
Scratchpad should detect and unwrap double-encoded JSON at write time, or exploration tools should transparently handle string-valued JSON fields that contain parseable JSON.
Impact
- Workers waste turns on unparseable artifacts, leading to avoidable
max_depth exhaustion
- Affects any MCP server that wraps responses in an extra layer of JSON encoding
Problem
Some MCP tool servers return responses with double-encoded JSON, e.g.:
{"result": "{\"pods\": [{\"name\": \"api-server-abc\", ...}]}"}When this is written to the scratchpad as an artifact, the exploration tools (
get_in,iterate_over,schema, etc.) can't parse the inner content because they encounter a string where they expect an object/array.This is the root cause of some remaining
max_depthfailures in orchestration — workers spend turns trying to extract data from artifacts that the exploration tools can't navigate, eventually exhausting their turn budget.Expected Behavior
Scratchpad should detect and unwrap double-encoded JSON at write time, or exploration tools should transparently handle string-valued JSON fields that contain parseable JSON.
Impact
max_depthexhaustion