-
Notifications
You must be signed in to change notification settings - Fork 53
Open
Description
Summary
When agentic orchestrators process templates, preprocess() runs on the template before format() substitutes context values. This means any <include> tags that end up in step outputs (e.g., step1_output, step2_output) will bypass preprocessing when substituted into subsequent step templates.
This affects all agentic orchestrators and potentially other consumers of preprocess().
Current Flow
preprocess()runs on the template (expands<include>directives)format()substitutes context values (includingstepN_output)- Context values are NOT preprocessed
Potential Issue
If an <include> tag ends up in a step's output:
- It gets substituted into later templates via
{stepN_output} - Substitution happens AFTER preprocess
- The
<include>tag passes through unexpanded to the LLM
How this could happen:
- An early step's
<include>wasn't expanded (e.g., file not found) and the LLM echoed it back - The LLM generated an
<include>tag in its response
Scope
agentic_change_orchestrator.pyagentic_test_orchestrator.py(if applicable)- Any other agentic orchestrators
- Other consumers of
preprocess()that use context substitution after preprocessing
Options to Consider
- Preprocess context values before adding them to the context dict
- Post-format scan for
<include>tags and warn/expand - Accept the limitation - document that step outputs shouldn't contain
<include>tags - Centralized solution in preprocess or a wrapper function used by all orchestrators
Related
This was identified during work on the template preprocessing fix for agentic_change_orchestrator.py (branch: fix/change-orchestrator-template-preprocessing).
Action
- Investigate whether this is a real problem in practice
- Audit all agentic orchestrators and preprocess consumers
- Determine the appropriate fix if needed
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels