Troubleshoot
Something did not work and you want the fix fast. Find the symptom closest to yours, run the commands under it, and follow the link. Looking up an exact error message instead? Go to Common errors or Install failures.
Start with apm doctor for most problems: it checks git, network access and credentials,
and exits non-zero when a critical check fails.
Git works in the terminal, but APM cannot find it
Section titled “Git works in the terminal, but APM cannot find it”What you see: apm doctor reports git not found on PATH even though
Git works in your terminal. Compare the two checks:
git --versionapm doctorSee Git discovery troubleshooting for recovery steps and a cross-platform example.
Nothing was installed (no harness detected)
Section titled “Nothing was installed (no harness detected)”What you see: Error: No harness detected, and apm install exits with code 2.
APM writes files for harnesses, the agent tools that read them (.github/ for GitHub
Copilot, .claude/ for Claude Code). Your apm.yml names none in targets:, and the
repository has no harness folder for APM to detect. apm targets shows what APM found.
apm targetsapm install <package> --target copilot,claudeWhen this command creates apm.yml, it records the harnesses under targets:; in an existing
apm.yml, add targets: yourself. See
Choose your harnesses.
A plugin installed but is missing in Claude Code
Section titled “A plugin installed but is missing in Claude Code”What you see: apm install reported the plugin, but /plugin in Claude Code does not list
it.
APM deploys a Claude Code plugin whole to .agents/plugins/<plugin>/ and declares it in
.claude/settings.json, so /plugin lists it under apm-p-<hash>. Check that the package is
installed and activated, and that claude is an active target:
apm deps list # ends with: N native plugin(s) activated from .agents/pluginsapm targetsIf the plugin is not activated, the install printed Parked native plugin <pkg> with the next
step, usually apm approve <pkg>. If it is activated, accept Claude Code’s folder-trust prompt
and start a new session. See
Install plugins.
401 or 403 from GitHub Enterprise, Azure DevOps or GitLab
Section titled “401 or 403 from GitHub Enterprise, Azure DevOps or GitLab”What you see: Authentication failed for <operation> on <host>.
The host rejected APM’s credentials, or APM found none. Each host reads its own variable:
GITHUB_APM_PAT for GitHub and GitHub Enterprise, ADO_APM_PAT for Azure DevOps,
GITLAB_APM_PAT for GitLab. apm auth validates a GitHub, GitHub Enterprise or GitLab token
against the host:
apm doctorapm auth github.example.com --checkA 403 with a valid token usually means the token lacks access to that repository or is not authorized for the organization’s SSO. See Use private sources.
TLS or proxy errors
Section titled “TLS or proxy errors”What you see: TLS verification failed, CERTIFICATE_VERIFY_FAILED, or
unable to get local issuer certificate.
A corporate proxy or an internal server presents a certificate issued by a CA your machine does not trust. Add the CA without dropping public trust, and set the standard proxy variables if you use one:
export APM_EXTRA_CA_BUNDLE=/path/to/corporate-ca.pemexport HTTPS_PROXY=http://proxy.example.com:8080apm install --verboseSee SSL / TLS issues.
apm install --frozen fails in CI
Section titled “apm install --frozen fails in CI”What you see: apm install --frozen exits 1 in CI but apm install works on your laptop.
--frozen installs exactly what apm.lock.yaml records and never rewrites it. It fails when
the lockfile is missing, when apm.yml changed without a lockfile update, or when a deployed
file differs from its locked hash; in that case nothing is written. For edited files, keep
the change with apm export-patch, then delete the files and rerun apm install. Otherwise, reproduce it locally, then fix and commit:
apm install --frozenapm installgit add apm.yml apm.lock.yamlCommit the deployed files too if your repository tracks them. CI also needs credentials for private sources. See Run in CI.
Policy blocked my install
Section titled “Policy blocked my install”What you see: Install blocked by org policy -- see violations above. Remove or replace the blocked dependencies in apm.yml (run 'apm policy status' to see the active policy), then re-run the install.
Your organization’s apm-policy.yml does not allow a source or package you added. The lines
above the error name the rule, for example dependency-allowlist. Check which policy applied
and whether it blocks or warns:
apm policy statusUse an allowed source, or ask the policy owner for an exception. --no-policy skips the check
for one local run, but apm audit --ci still enforces it. See
Set an org policy.
A file changed and audit reports drift
Section titled “A file changed and audit reports drift”What you see: [!] Drift detected: 1 file(s) from apm audit ([x] when the run fails: apm audit --ci, or security.audit.fail_on_drift), with the path under modified.
A deployed file no longer matches the hash in the lockfile, usually because someone edited it. APM keeps local edits on install, so the drift stays until you choose. Find the package that owns the file:
apm auditapm find --source .claude/skills/style-checker/SKILL.mdTo keep the change, apm export-patch writes it as a patch for the package’s author. To discard
it, move the file aside and rerun apm install (plain apm install keeps your edit). See Inventory and drift.
apm list does not show my packages
Section titled “apm list does not show my packages”What you see: [!] No scripts found.
apm list lists scripts from apm.yml. Packages are under apm deps:
apm deps listapm deps treeapm deps why <package>Still stuck
Section titled “Still stuck”Collect this, then open an issue in the APM issue tracker
with your apm.yml and apm.lock.yaml:
apm --versionAPM_DEBUG=1 apm <failing-command> --verbose 2>&1 | tee apm-debug.logapm cache infoCopyright (c) Microsoft Corporation. General documentation: CC-BY-4.0. Software, code examples and OpenAPM: Apache-2.0. See scope and exclusions.