Skip to content

Update dependencies

Use this page to take new versions of your agent packages without surprises. A plain apm install never moves a version: it replays apm.lock.yaml. Versions change when you run apm update, edit apm.yml, or merge a pull request that does one of those.

Terminal window
apm outdated

apm outdated compares each locked dependency with its upstream and changes nothing. Add -v to list the newer tags. An unreachable source shows as unknown.

Preview, then apply:

Terminal window
apm update --dry-run
apm update

apm update prints a plan (added, updated, removed, unchanged) and asks before changing anything; the default answer is No. Name packages to limit the update to them (apm update contoso/review-skills). In scripts and CI, pass --yes. apm update also revalidates any marketplace behind a dependency and fails rather than use stale data.

“Latest” means the newest version your apm.yml allows:

Entry in apm.ymlWhat apm update does
#^1.1.0 (range)Moves to the highest matching tag
#main (branch)Moves to the branch tip
#<40-char SHA> (commit)Moves to the commit of the newest annotated release tag and adds the tag as a comment
#v1.1.0 (exact tag)Stays on that tag; edit it to move

To jump to a release outside your range, edit apm.yml and run apm install.

The lockfile diff is the change your reviewers approve. When Ben releases contoso/review-skills 1.2.0, Ana’s update pull request shows:

apm.lock.yaml
- repo_url: contoso/review-skills
resolved_ref: v1.1.0
resolved_commit: 3f2a9c1...
resolved_ref: v1.2.0
resolved_commit: b71e04d...
deployed_files:
- .agents/skills/security-review/SKILL.md
- .agents/skills/security-review/references/owasp.md

Read it for:

  • New packages: a new repo_url is a new transitive dependency.
  • New files, especially hooks, MCP servers and scripts. If your project uses the approval gate, they stay parked until someone runs apm approve.
  • Changed sources: a different host or repository for the same name.

apm update also re-checks executables against current approvals. If your organization turns the approval gate on, packages installed before it go through the gate on the next update. If you remove the approval for one type, such as hooks, from a package, the update retires that type. The lockfile lists the approved types in exec_allowed_types.

A pull request that changes apm.lock.yaml does not change the files on anyone’s machine. After you pull it, run:

Terminal window
apm install

CI rebuilds from the lockfile with apm install --frozen; see Run in CI.

Dependabot opens pull requests for git dependencies in apm.yml and regenerates apm.lock.yaml when one exists:

.github/dependabot.yml
version: 2
updates:
- package-ecosystem: "apm"
directory: "/"
schedule:
interval: "weekly"
  • Tag pins move to the newest semver tag, including package-scoped tags such as review-v1.4.0.
  • SHA pins move to the newest annotated, non-prerelease release tag, with the tag added as a comment.
  • Branch pins change the lockfile, not apm.yml.
  • It runs apm lock, which writes the lockfile without deploying files.

It skips object-form entries (git:, path:), entries without a ref, local paths, Azure DevOps and http:// sources, and mcp: entries. Reference: Dependabot supported ecosystems.

Renovate’s apm manager reads every apm.yml and updates entries pinned with an exact #ref:

renovate.json
{
"extends": ["config:recommended"]
}

With pinDigests (part of config:best-practices), it keeps a SHA pin and its tag comment current. When apm.lock.yaml exists, Renovate refreshes it by running apm install, so the apm CLI must be available to Renovate (for example binarySource=global on a self-hosted runner). Reference: Renovate apm manager.

Terminal window
apm outdated
[*] All dependencies are up-to-date

Claude: instructions move to AGENTS.md (0.38)

Section titled “Claude: instructions move to AGENTS.md (0.38)”

Claude projects now get always-on and single-directory instructions through AGENTS.md, which each generated CLAUDE.md imports with @AGENTS.md. Path-scoped instructions (for example applyTo: "**/*.py") stay in .claude/rules/.

  1. In a project that compiles, run apm install. Once a compiled AGENTS.md carries an always-on or directory instruction, it removes the .claude/rules/<name>.md file APM wrote for it and names where it moved. A rule file you edited is kept with a warning; delete it to finish the move.
  2. Run apm compile (install prints a reminder). It writes the root AGENTS.md, a <dir>/AGENTS.md for each single-directory instruction, and a CLAUDE.md next to each that contains @AGENTS.md.
  3. Commit the new AGENTS.md and CLAUDE.md files.

A hand-authored root CLAUDE.md that does not import @AGENTS.md changes nothing: apm install keeps every instruction in .claude/rules/ and warns once. To opt in, add a line @AGENTS.md to it, then rerun apm install and apm compile. A hand-authored root AGENTS.md also keeps every instruction in .claude/rules/; to opt in, set compilation.agents_md.mode: managed_section in apm.yml and add the <!-- apm:start --> and <!-- apm:end --> markers to the file once each. APM never overwrites either file.

The apm compile reminder clears once a compile has written each routed instruction as it is now. Changing an instruction’s applyTo or body brings the reminder back until you compile again.

In projects that target Claude plus Copilot or Codex, the shared AGENTS.md keeps the optimizer’s placement, so a directory or file-type instruction can load at the root for Claude. Use Claude-only targets or narrower globs if that matters. A directory instruction stays in .claude/rules/ when its directory does not exist or compilation.strategy is single-file.

A nested AGENTS.md loads when Claude opens a file in that folder, not in sessions that only run shell commands; put guidance needed there at the root. User scope (apm install -g) is unchanged: every instruction stays in ~/.claude/rules/. Details: apm compile.

From 0.39, a project that installs without running apm compile keeps the 0.37 layout: apm install writes always-on and directory instructions to .claude/rules/, as before 0.38. If a 0.38 install removed those files, the next apm install restores them. Projects that compile keep AGENTS.md and its CLAUDE.md import. No action is needed either way.

Updating APM itself is separate from updating packages: see Install APM.

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