Orchestration errors
Common error signatures
Most orchestration failures are ValueError exceptions raised when a strategy name, workflow ID, or agent template cannot be resolved in the registry:
ValueError: Unknown strategy: {name}. Available: {...}— raised byget_strategy()when the requested strategy name is not registered.ValueError: Unknown workflow: {id}. Available: {...}— raised byget_workflow()when aWorkflowReferencepoints to a workflow ID that was never passed toregister_workflow().DelegationChainStrategysilently enforces amax_depth(default:3); pipelines that exceed this depth are cut off rather than raising immediately, which can surface as incomplete results rather than an exception.NestedStrategyandNestedSequentialStrategyshare the sameNestingContext.DEFAULT_MAX_DEPTHlimit — exceeding it while composing workflows-within-workflows produces errors that name the offendingWorkflowReference.
Where errors originate
The following functions are the direct raise sites. Errors returned from execute() on any strategy class typically trace back to one of these resolution steps:
get_strategy(strategy_name)— looks up a registeredExecutionStrategysubclass by name; raisesValueErrorfor unknown names.register_strategy(name, strategy_class)— registers a custom strategy; incorrectstrategy_classtypes cause failures at the nextget_strategy()call.register_workflow(workflow)— adds aWorkflowDefinitiontoWORKFLOW_REGISTRY; skipping this step before referencing the workflow causesget_workflow()to raise.get_workflow(workflow_id)— resolves a workflow by ID for use inNestedStrategyorNestedSequentialStrategy; raisesValueErrorif the ID is absent from the registry.get_template(template_id)— retrieves anAgentTemplatefrom the template registry; returnsNonerather than raising, so a missing template can produce subtle downstream failures in strategy execution.
How to diagnose
-
Read the
ValueErrormessage. Bothget_strategy()andget_workflow()include the full list of available names in the exception message. Compare that list against the name or ID you passed in — a typo or missing registration step is the most common cause. -
Check registration order.
NestedStrategyandNestedSequentialStrategyresolveWorkflowReferenceobjects at execution time, not at construction time. Ifregister_workflow()was not called beforeexecute()runs,get_workflow()raises even though the strategy object was created without error. -
Confirm
get_template()returned a value, notNone. Unlike the strategy and workflow lookups,get_template()returnsNonefor an unknowntemplate_idinstead of raising. If an agent step produces no output, verify the template ID withget_all_templates()and re-register withregister_custom_template()if it is missing. -
Verify
max_depthfor nested and delegation patterns.DelegationChainStrategydefaults tomax_depth=3andNestedStrategydefaults toNestingContext.DEFAULT_MAX_DEPTH. If your pipeline is deeper than these limits, pass an explicitmax_depthat construction time. -
Identify the composition pattern in use. The six patterns — Sequential, Parallel, Debate, Teaching, Refinement, and Adaptive — have different execution paths. Knowing which pattern your
MetaOrchestratorselected narrows which strategy'sexecute()method to inspect.
Source files
src/attune/orchestration/**src/attune/coordination/**
Tags: orchestration, teams