Bug Report
Summary
When engine configuration (specifically max-turns) is moved into a shared import (.md file), the compiled .lock.yml file silently drops the --max-turns flag from the claude invocation. The workflow runs without the intended turn limit, defaulting to the engine's built-in default.
Steps to Reproduce
1. Create a shared import with engine config (shared/common.md):
---
engine:
id: claude
max-turns: 100
---
2. Import it in a workflow:
---
imports:
- shared/common.md
---
3. Compile:
gh aw compile my-workflow.md
Expected Behavior
The compiled my-workflow.lock.yml should include --max-turns 100 in the claude invocation, just as it does when engine.max-turns is defined inline in the workflow.
Actual Behavior
The --max-turns flag is absent from the compiled lock file. No warning or error is emitted during compilation.
Comparison
Inline engine config (works correctly):
# my-workflow.md
engine:
id: claude
max-turns: 100
Compiled invocation:
claude --print ... --max-turns 100 ...
Engine config via shared import (broken):
# shared/common.md
engine:
id: claude
max-turns: 100
# my-workflow.md
imports:
- shared/common.md
Compiled invocation:
claude --print ... (no --max-turns flag)
Impact
This is a silent failure — there is no compilation error or warning. Users refactoring engine configuration into shared imports will unknowingly lose their turn limit, which can lead to runaway agent jobs.
Environment
- Compiler version:
v0.65.7
Reported by Claude Code on behalf of the user.
Bug Report
Summary
When
engineconfiguration (specificallymax-turns) is moved into a shared import (.mdfile), the compiled.lock.ymlfile silently drops the--max-turnsflag from theclaudeinvocation. The workflow runs without the intended turn limit, defaulting to the engine's built-in default.Steps to Reproduce
1. Create a shared import with engine config (
shared/common.md):2. Import it in a workflow:
3. Compile:
Expected Behavior
The compiled
my-workflow.lock.ymlshould include--max-turns 100in theclaudeinvocation, just as it does whenengine.max-turnsis defined inline in the workflow.Actual Behavior
The
--max-turnsflag is absent from the compiled lock file. No warning or error is emitted during compilation.Comparison
Inline engine config (works correctly):
Compiled invocation:
Engine config via shared import (broken):
Compiled invocation:
Impact
This is a silent failure — there is no compilation error or warning. Users refactoring engine configuration into shared imports will unknowingly lose their turn limit, which can lead to runaway agent jobs.
Environment
v0.65.7Reported by Claude Code on behalf of the user.