Skip to content

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:

Terminal window
git --version
apm doctor

See 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.

Terminal window
apm targets
apm install <package> --target copilot,claude

When 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:

Terminal window
apm deps list # ends with: N native plugin(s) activated from .agents/plugins
apm targets

If 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:

Terminal window
apm doctor
apm auth github.example.com --check

A 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.

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:

Terminal window
export APM_EXTRA_CA_BUNDLE=/path/to/corporate-ca.pem
export HTTPS_PROXY=http://proxy.example.com:8080
apm install --verbose

See SSL / TLS issues.

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:

Terminal window
apm install --frozen
apm install
git add apm.yml apm.lock.yaml

Commit the deployed files too if your repository tracks them. CI also needs credentials for private sources. See Run in CI.

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:

Terminal window
apm policy status

Use 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.

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:

Terminal window
apm audit
apm find --source .claude/skills/style-checker/SKILL.md

To 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.

What you see: [!] No scripts found.

apm list lists scripts from apm.yml. Packages are under apm deps:

Terminal window
apm deps list
apm deps tree
apm deps why <package>

See Add and remove packages.

Collect this, then open an issue in the APM issue tracker with your apm.yml and apm.lock.yaml:

Terminal window
apm --version
APM_DEBUG=1 apm <failing-command> --verbose 2>&1 | tee apm-debug.log
apm cache info

Copyright (c) Microsoft Corporation. General documentation: CC-BY-4.0. Software, code examples and OpenAPM: Apache-2.0. See scope and exclusions.