Fix Step 7 handoff 400 by moving skills to the Activities leaf - #13
Merged
Conversation
The Step 7 runtime-handoff Coordinator is invoked twice (route, then
synthesize after a hand-back). With default_options={store: False} the
tool-call history is replayed on the second call, so a tool-producing
context provider (the skills provider) on the Coordinator desyncs that
replay and the service returns 400 'No tool call found for function call
output'. Move the travel-guide + response-guardrails skills back onto the
Activities leaf (invoked once) and make the Coordinator a pure router that
hands the full draft to Activities last to own the final deliverable.
Steps 8-9 keep skills on the workflow finalize node; strip skills off the
now-legacy build_travel_coordinator factory and correct its docstring plus
the finalize prompt that referenced the Step 7 Coordinator owning the
deliverable. Docs, README capability table, slices/manifests, and the
step_files/07 scaffold updated to match; adds the teaching point that a
handoff Coordinator cannot own tools/skills, motivating Step 8's finalize
node.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
A deployed Step 7 agent hit a runtime error after a handoff sequence (a specialist hands back to the Coordinator):
Root cause
The skills provider is a context provider that registers its skill tools on whichever agent holds it. Step 7 uses a
HandoffBuilderruntime handoff, where the Coordinator is the only participant invoked twice — once to route, then again to synthesize after a specialist hands back. Every agent sets the hard workshop invariantdefault_options={"store": False}, so the framework replays the whole tool-call history on the Coordinator's second call. A prior change (PR #9) had moved the skills onto the Coordinator; that extra tool stream desyncs the replay and the service rejects it with the 400. Leaf specialists are invoked once, so they carry context providers safely.Fix
travel-guide(PDF) +response-guardrailsskills ride on the Activities leaf. The Coordinator gathers flights/hotels first, then hands the full draft to Activities last so the deliverable and guardrail check reliably run through it.finalize_itinerarynode still owns the skills (invoked once, no handoff re-entry). Stripped the skills off the now-legacybuild_travel_coordinatorfactory (reference-only, not the 8–9 runtime path) and corrected its docstring + the finalize prompt that referenced the Step 7 Coordinator owning the deliverable.store=Falsereplay — which motivates Step 8's dedicated finalize node.Keeps all the independent PR #9 improvements (Flights returns fares, Hotels web toolbox, multi-section prompts, model-size hint,
agent-framework-orchestrationsin requirements).Known teaching limitation (intentional)
In Step 7 the guarded final path is routed, not structurally enforced — that's a real limitation of a pure router, and it's exactly what Step 8's workflow finalize node fixes.
Validation
coordinator.py/workflow.pyparse; every specialist slice == its*_INSTRUCTIONSconstant;step_files/07slices == solution.python .workshop/scripts/lint_steps.py→ 0 failures (2 pre-existing unrelated warnings).