fix(agents): name the map-branch output key in deep-research and finding-verifier

An llm node never persists its completion under `output` (the binding
is transient), so a map branch without state_updates collected the
stale inherited value: deep-research produced `None` findings and
finding-verifier errored on its first item because `output` was absent.

Both maps now declare an explicit output_key and their branch nodes
write it via state_updates. graph.example.yaml's research_subject gets
the same named-key pattern and its branch comment describes it.

Design: plans/map-subgraph-branches-design.md §2.6, §3.7 (C9).
This commit is contained in:
Dark-Alex-17 committed 2026-09-11 10:56:26 -06:00
1 parent 24088a48a1
commit a7744e7f89
3 files changed
+12 -3

No files matched your search

+3
View File
@@ -115,6 +115,7 @@ nodes:
as: question
branch: research_one_question
collect_into: question_findings
output_key: finding
max_concurrency: 3
next: combine_findings
@@ -152,6 +153,8 @@ nodes:
max_iterations: 10
max_attempts: 2
temperature: 0.1
state_updates:
finding: "{{output}}"
combine_findings:
id: combine_findings
@@ -95,6 +95,7 @@ nodes:
as: finding
branch: verify_one
collect_into: verdicts
output_key: verdict
max_concurrency: 4
next: done
@@ -150,6 +151,8 @@ nodes:
max_iterations: 8
max_attempts: 2
temperature: 0.1
state_updates:
verdict: "{{output}}"
done:
id: done
+6 -3
View File
@@ -387,7 +387,7 @@ nodes:
# (not spawn-finish order).
max_concurrency: 3 # Optional per-map cap. Defaults to
# settings.max_concurrency above.
output_key: output # Optional. State key the branch's output
output_key: subject_summary # Optional. State key the branch's output
# appears under. Default "output". Useful
# only if the branch reads its own bound
# name back (rare).
@@ -403,8 +403,11 @@ nodes:
prompt: "Research {{subject}}: pull the key facts and one citation."
tools:
- web_search_coyote
# No `next:`, `state_updates:`, or `output_schema:` here. Map branches
# have a strict contract (see `subjects_map.branch` comment).
# Recommended pattern: write the completion to a named key via
# `state_updates` and point the map's `output_key` at that same key.
# `{{output}}` is bound only while these templates render.
state_updates:
subject_summary: "{{output}}"
# Aggregator that runs after the map joins. Reads the collected list.
aggregate_subjects: