Skip to content

Agent imports: .github/agents/ path does not resolve — must be under .github/workflows/ #19703

@tore-unumed

Description

@tore-unumed

Bug

The custom agents documentation states that agent files should live in .github/agents/:

Agent files are Markdown files stored in the .github/agents/ directory of your repository.

However, importing from that path fails with:

.github/workflows/planner-test.md:60:5: error: import file not found
58 |
59 | imports:
60 |   - .github/agents/planner.md
         ^^^^^^^^^^^^^^^^^^^^^^^^^
61 |   - shared/jira.md

The import resolver appears to use .github/workflows/ as its base path (consistent with how shared/ imports resolve). Moving the agent file to .github/workflows/agents/planner.md and importing as agents/planner.md compiles successfully.

Expected behavior

imports: - .github/agents/planner.md should resolve the file at .github/agents/planner.md from the repo root, as documented.

Actual behavior

The compiler reports "import file not found" because it resolves the path relative to .github/workflows/, looking for .github/workflows/.github/agents/planner.md.

Workaround

Place agent files under .github/workflows/agents/ and import as agents/planner.md.

Environment

  • gh-aw v0.53.3
  • OS: Linux (WSL2 Ubuntu 22.04)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions