diff --git a/scripts/u/cascade b/scripts/u/cascade index ffe747f..30b0d74 100755 --- a/scripts/u/cascade +++ b/scripts/u/cascade @@ -125,29 +125,26 @@ if [ "$synthesize" -eq 0 ]; then printf '%s\n' "$results_json" | jq . [ "$failures" -gt 0 ] && exit 1 else - # Render results as readable text for the planner prompt. - results_text=$(printf '%s\n' "$results_json" | jq -r '.[] | "--- \(.id) [STATUS: \(.status)] ---\n\(.output)\n"') - synth_flags=(-backend "$PB" -model "$PM") if [ "$json_output" -eq 1 ]; then synth_flags+=(-json) - synth_prompt="Synthesize these worker results into a structured JSON response for the original task. Note: workers marked [STATUS: failed] did not complete successfully — include them in errors. + synth_prompt="Synthesize these worker results into a structured JSON response for the original task. Note: workers with status \"failed\" did not complete successfully — include them in errors. Output schema: {\"summary\": \"\", \"answer\": \"\", \"worker_results\": [{\"id\": \"\", \"status\": \"done|failed\", \"output\": \"\"}], \"errors\": [\"\"]} ORIGINAL TASK: $task -WORKER RESULTS: -$results_text" +WORKER RESULTS (JSON): +$results_json" else - synth_prompt="Synthesize these worker results into a final, coherent answer to the original task. Note: workers marked [STATUS: failed] did not complete successfully — account for this in your synthesis. + synth_prompt="Synthesize these worker results into a final, coherent answer to the original task. Note: workers with status \"failed\" did not complete successfully — account for this in your synthesis. ORIGINAL TASK: $task -WORKER RESULTS: -$results_text" +WORKER RESULTS (JSON): +$results_json" fi "$B" "${synth_flags[@]}" "$synth_prompt" fi