Preflight
Before running a saved chain you want to know what it will use, so you can
register or install the missing pieces. ReasoningChain answers this without
executing anything and without an LLM call.
What does this chain reference?
Section titled “What does this chain reference?”chain.required_tools() # tool names from tool / map / agent / planner steps and chain tools' allowed_toolschain.required_mcp_servers() # MCP server nameschain.required_skills() # AgentSkill identifiers (URI or source string)chain.required_code_profiles() # runtime_profile names of code stepschain.required_claude_code_clis() # cli_path of claude_code steps (default "claude")chain.required_codex_runtimes() # ["openai-codex"] if the chain has a codex stepchain.required_decision_credentials() # API-key env var names of decision steps (0.5.1)Tools found only at run time by a tool-discovery step are not listed. Names of embedded chain tools are left out, because the chain supplies them itself.
Preflight against a context
Section titled “Preflight against a context”chain.preflight(context) compares those lists with what the context has and
returns a PreflightReport:
report = chain.preflight(context)print(report.format_text())if not report.all_present: print("register first:", report.missing_tools)PreflightReport
Section titled “PreflightReport”| Field / member | How “missing” is decided |
|---|---|
required_* | Everything the chain references (seven lists, as above). |
missing_tools | Not in context.list_tools(). |
missing_code_profiles | context.code_execution_policy is absent or does not resolve the profile. |
missing_claude_code_clis | shutil.which() cannot find the CLI. |
missing_codex_runtimes | check_codex_runtime() reports the runtime unavailable. |
missing_decision_credentials | The env var is unset or empty. Only names are reported, never values. The host grant in decision_endpoints is not checked here; the step checks it at run time. |
missing_mcp_servers / missing_skills | Always empty. MCP servers carry their own config and skills resolve over the network at run time, so preflight lists them but does not check them. |
all_present (property) | True when every missing_* list is empty. |
format_text() | One line when everything is present, a breakdown otherwise. |
The report is data, not prose: MAESTRO turns it into a refusal or a dialog, and CLIs and CI read the lists directly.
In MAESTRO
Section titled “In MAESTRO”MAESTRO runs preflight twice: once on the parsed chain without a context (to
list requirements), and once against the populated run context right before
execution. A missing tool, MCP server or skill refuses the run. MAESTRO’s
pinned CARL build predates code profiles, Claude Code, Codex and decision
steps, so its report has no such lists (see
which CARL MAESTRO runs). From the
command line, maestro validate <chain.json> parses and preflights a chain
file (see CLI discovery).