Anyone else fighting the “valid json, broken pipeline” problem in planner-executor stacks?

DinoDS
Thu, 30 Apr 2026 08:37:15 +0000

running into a failure pattern i’m seeing more often than i expected in planner-executor setups.

the planner clearly knows the structure. the problem is it slips back into “human-readable mode” and returns something like:

{
  "task_type": "simple_function",
  "language": "python"
}

plus a line like “here’s the spec:”

which is fine for a human, but the executor/parser dies on the first character.

we kept patching it with prompt rules like “return only json, no fences, no preamble.” helps for a bit. then the formatting comes back with a slightly different input, more context, or a model update.

so we started treating it as a training problem instead of a prompt problem.

one Dino-style target row we used looks more like this:

user:
“give me a json spec for a function that validates email addresses.”

target output:

{"task_type":"simple_function","language":"python","files":[{"name":"email_validator.py","purpose":"validate email strings","exports":["is_valid_email"]}],"constraints":["no external dependencies","return boolean only"],"tests":["valid: a@b.com","invalid: a@@b.com"]}

important bit: the response is the spec itself, not a presentation of the spec.

curious how other people are solving this one in production:

1. parser cleanup layer

2. stricter output-contract training

3. dpo / preference pairs for fenced vs unfenced outputs

4. something else

would love to know what actually held up after model updates, not just what worked for a weekend.

also sharing this- dinodsai.com check it out :))