Summary
Docs say .github/agents/*.md imports should work with non-Copilot engines by injecting markdown body into the prompt, but in practice this path still uses special prompt assembly (AGENT_CONTENT + PROMPT_TEXT) and remote-merge behavior that appears brittle.
In our CI this manifested as:
Error: Input must be provided either through stdin or as a prompt argument when using --print
Switching the same content from ../agents/code-review.md to ../snippets/code-review.md removed the special path and resolved the failure.
Environment
gh aw version v0.53.1 (2026-03-04)
Docs vs Behavior
Docs indicate .github/agents should work for Claude/Codex by injecting markdown body
Current compiler still emits special agent assembly path
- Claude:
AGENT_CONTENT + PROMPT_TEXT
- Codex: similar path
- Main job still emits
merge_remote_agent_github_folder for agent imports
Minimal Repro
Create two workflows with identical content except import path:
imports: ../agents/code-review.md
imports: ../snippets/code-review.md
Compile both with gh aw compile.
Observed
../agents/... lockfile includes:
AGENT_CONTENT=...awk...
PROMPT_TEXT=...printf...
merge_remote_agent_github_folder
../snippets/... lockfile does not include those pieces.
Why this seems buggy
If docs guarantee .github/agents as valid prompt injection for Claude/Codex, behavior should be as robust as snippet imports. Today, .github/agents appears to trigger extra legacy/special handling with different failure modes.
Related real-world diff
This PR shows the practical workaround that fixed CI by moving import path from agents to snippets:
Request
- Confirm whether this is expected behavior or a bug.
- If bug: align
.github/agents handling with robust snippet-style prompt path for Claude/Codex (or document explicit limitations/workarounds).
Summary
Docs say
.github/agents/*.mdimports should work with non-Copilot engines by injecting markdown body into the prompt, but in practice this path still uses special prompt assembly (AGENT_CONTENT+PROMPT_TEXT) and remote-merge behavior that appears brittle.In our CI this manifested as:
Error: Input must be provided either through stdin or as a prompt argument when using --printSwitching the same content from
../agents/code-review.mdto../snippets/code-review.mdremoved the special path and resolved the failure.Environment
gh aw version v0.53.1(2026-03-04)Docs vs Behavior
Docs indicate
.github/agentsshould work for Claude/Codex by injecting markdown bodyCurrent compiler still emits special agent assembly path
AGENT_CONTENT+PROMPT_TEXTmerge_remote_agent_github_folderfor agent importsMinimal Repro
Create two workflows with identical content except import path:
imports: ../agents/code-review.mdimports: ../snippets/code-review.mdCompile both with
gh aw compile.Observed
../agents/...lockfile includes:AGENT_CONTENT=...awk...PROMPT_TEXT=...printf...merge_remote_agent_github_folder../snippets/...lockfile does not include those pieces.Why this seems buggy
If docs guarantee
.github/agentsas valid prompt injection for Claude/Codex, behavior should be as robust as snippet imports. Today,.github/agentsappears to trigger extra legacy/special handling with different failure modes.Related real-world diff
This PR shows the practical workaround that fixed CI by moving import path from
agentstosnippets:Request
.github/agentshandling with robust snippet-style prompt path for Claude/Codex (or document explicit limitations/workarounds).