Read the trace, not the chat — find the broken turn before reading the user's complaint — step 6 of 9
The agent returned malformed JSON. The downstream parser is
catching the error and returning "unknown". This hides the
symptom but doesn't fix the bug — the next user gets the same
wrong answer, packaged as "unknown".
The trace shows the bug is upstream: the prompt didn't tell the
model to return JSON. The fix is to return a dict describing
the upstream class so the caller can route to the right fix.
Fix the parser to RETURN
{"class": "prompt", "fix_layer": "the prompt", "raw": <the raw model output>}
instead of swallowing the error with "unknown".
Expected output:
{'class': 'prompt', 'fix_layer': 'the prompt', 'raw': 'I think the answer is 42'}
The agent returned malformed JSON. The downstream parser is
catching the error and returning "unknown". This hides the
symptom but doesn't fix the bug — the next user gets the same
wrong answer, packaged as "unknown".
The trace shows the bug is upstream: the prompt didn't tell the
model to return JSON. The fix is to return a dict describing
the upstream class so the caller can route to the right fix.
Fix the parser to RETURN
{"class": "prompt", "fix_layer": "the prompt", "raw": <the raw model output>}
instead of swallowing the error with "unknown".
Expected output:
{'class': 'prompt', 'fix_layer': 'the prompt', 'raw': 'I think the answer is 42'}
this step needs the editor
on desktop today; in the app (coming soon). save your spot and we'll bring you back here when you're ready.