Repository navigation
Closed
Labels
type/bugSomething does not work as documented.
Description
Describe the bug
After upgrading from apm 0.12.2 to 0.12.4, I have the below error.
To Reproduce
-
Have an apm.yml listing targets like:
targets: - agent-skills - claude - copilot - opencode
-
Run
apm install -
Observe error and log message stating
agent-skillsin theValid targetslist(.venv)$ apm install [>] Installing dependencies from apm.yml... [x] [x] Unknown target '['agent-skills'' Valid targets: agent-skills, claude, codex, copilot, cursor, gemini, opencode, windsurf Fix with one of: apm targets # see all supported harnesses apm install <pkg> --target agent-skills apm install <pkg> --dry-run Or declare in apm.yml: targets: - agent-skills [!] Install interrupted after 0.6s.
-
Run
apm targetsas error message suggests(.venv)$ apm targets TARGET STATUS SOURCE DEPLOY DIR ------------ ---------- ---------------------------------------- ---------- claude active .claude/ .claude/ copilot inactive needs .github/copilot-instructions.md .github/ cursor inactive needs .cursor/ .cursor/ codex inactive needs .codex/ .codex/ gemini inactive needs GEMINI.md .gemini/ opencode active .opencode/ .opencode/ windsurf inactive needs .windsurf/ .windsurf/
-
Observe
agent-skillsis not present in the output, despite being present in the apm install output.
Expected behavior
- No error, as
agent-skillswas previously not producing one, and the error message suggests it is a valid target. agent-skillsis listed byapm targets.
Environment (please complete the following information):
- OS: macOS
- Python Version: 3.14.3 (note, this is not a pre-release version as was flagged in a different bug report; it was released in Feb 2026)
- APM Version: 0.12.4
- VSCode Version (if relevant): n/a
Logs
Full log:
(.venv)$ apm --version
Agent Package Manager (APM) CLI version 0.12.4 (6aceef7)
pmounce at pmounce-Mac15,7 in ~/src/egen/awesome2 (pete/mise-bump)
(.venv)$ apm install
[>] Installing dependencies from apm.yml...
[x] [x] Unknown target '['agent-skills''
Valid targets: agent-skills, claude, codex, copilot, cursor, gemini, opencode, windsurf
Fix with one of:
apm targets # see all supported harnesses
apm install <pkg> --target agent-skills
apm install <pkg> --dry-run
Or declare in apm.yml:
targets:
- agent-skills
[!] Install interrupted after 0.6s.
pmounce at pmounce-Mac15,7 in ~/src/egen/awesome2 (pete/mise-bump)
(.venv)$ apm targets
TARGET STATUS SOURCE DEPLOY DIR
------------ ---------- ---------------------------------------- ----------
claude active .claude/ .claude/
copilot inactive needs .github/copilot-instructions.md .github/
cursor inactive needs .cursor/ .cursor/
codex inactive needs .codex/ .codex/
gemini inactive needs GEMINI.md .gemini/
opencode active .opencode/ .opencode/
windsurf inactive needs .windsurf/ .windsurf/Additional context
apm.yml:
---
name: foo
version: 0.0.1
description: Foo
author: Peter Mounce
dependencies:
apm:
- ./docs-as-code/content-root/standards/documenting/skills/docs-authoring
- ./docs-as-code/content-root/standards/style-guides/skills/bash-authoring
- ./docs-as-code/content-root/standards/style-guides/skills/code-authoring
- ./docs-as-code/content-root/standards/style-guides/skills/git-commit
- ./docs-as-code/content-root/standards/style-guides/skills/python-authoring
- ./docs-as-code/content-root/standards/style-guides/skills/utility-scripts
- Dicklesworthstone/beads_rust/.claude/skills/br#5cad749f1ed13a75e76bc95b776e47443b16c9bb
- JuliusBrussee/caveman#ef6050c5e1848b6880ff47c32ade1a608a64f85e
- microsoft/apm/packages/apm-guide#2b1fb6bfd42da6d7bcd14efdb0d87c5de7acc878
mcp: []
scripts: {}
target:
- agent-skills
- claude
- copilot
- opencodeMetadata
Metadata
Assignees
Labels
type/bugSomething does not work as documented.
Type
Projects
- StatusShow more project fieldsDone
Activity
petemounce commentedon May 8, 2026
Confirmed issue is present in
0.12.3as well. I have reverted to0.12.2as the most recent usable version for my environment.danielmeppiel commentedon May 8, 2026
Thanks for the detailed report -- this one had two coupled symptoms, and both are addressed in
main(unreleased) now:1. The crash itself (
Unknown target '['agent-skills'') is fixed by #1197 (already merged onmain).The root cause was the same as #1188: the singular
target:parser branch was doingstr(raw).split(",")on a Python list, producing tokens like"['agent-skills'". #1197 made the singulartarget:key accept the YAML list form (e.g.target: [copilot, claude]) the same way the pluraltargets:key always has.I reproduced your exact symptom on
0.12.4against bothtarget:(singular, list) andtargets:(plural, list); only the singular form crashes. On HEAD, both forms parse cleanly. Worth double-checking your localapm.yml-- the issue body showstargets:(plural) but the error text only manifests with the singulartarget:key carrying a list, so the file you actually had on disk almost certainly used singulartarget:.2. The discoverability gap --
apm targetsnot listingagent-skillseven though the error message advertised it -- is fixed by #1215 (just opened, againstmain).agent-skillsis a meta-target (multi-harness fan-out into.agents/skills/, no singledeploy_dir) and is intentionally hidden from theapm targetstable; it is surfaced only viaapm targets --json --allfor power users. The error renderer was advertising it anyway, which is exactly what made you (rightly) suspect APM was contradicting itself. #1215 filtersagent-skillsout of the unknown-target error suggestions so the recovery path printed on errors matches what the discovery command actually lists. It does NOT removeagent-skillsfrom the canonical set: explicit--target agent-skillsandtargets: [agent-skills]inapm.ymlcontinue to work for power users.Shipping: both #1197 and #1215 land in the next minor release. Closing as solved on that basis -- please reopen if you still see either symptom on
main(or once the next release ships).fix(errors): hide agent-skills from unknown-target suggestions (#1208)
fix(errors): hide agent-skills from unknown-target suggestions (#1208)
fix(errors): hide agent-skills meta-target from unknown-target sugges…
petemounce commentedon May 9, 2026
What's the reasoning behind both
targetandtargetsin theapm.yml, both evidently intended to support multiple items?Would it be reasonable to introduce
apm schema config|lock|policy [--output path]to write out jsonschema that one might validate the files against via pre-commit? That might also reduce user uncertainty in those files; a schema is easier to validate against vs docs prose, and that would also allow APM itself to reject bad input 1 closer to its surface for a clearer UX.Footnotes
via its own internal representation, I mean. Wouldn't lean on a file or remote call for something that can be internally represented. My thought was to serialise that representation to disk for a pre-commit to validate against. I'm not sure what apm's internal input handling is; I've had good experiences with pedantic in the past and I saw it has a schema generation hookup https://pydantic.dev/docs/validation/latest/concepts/json_schema/ ↩
fix(errors): hide agent-skills meta-target from unknown-target sugges…