Skip to content

Agent UX: pm files --add on an existing path with a new note silently keeps the old note (changed:false, no hint), and there is no way to edit a link's note in place #1334

Closed

Description

@unbraind

What happens

pm files <id> --add on a path that is already linked, with a different note=, reports changed: false and keeps the old note. Nothing says the new note was ignored, or how to change it.

Observed with pm 2026.9.28 on 2026-09-28, while updating a tracker item after a dependency bump:

$ pm get pm-graph-ipvn --fields files | grep prepare-merge-driver
    scripts/prepare-merge-driver.ts,project,Published pm-ops 2026.9.26 canonical launcher copy

$ pm files pm-graph-ipvn --add "path=scripts/prepare-merge-driver.ts,scope=project,note=Published pm-ops 2026.9.28 canonical launcher copy"
changed: false
count: 7

$ pm get pm-graph-ipvn --fields files | grep prepare-merge-driver
    scripts/prepare-merge-driver.ts,project,Published pm-ops 2026.9.26 canonical launcher copy

The only way to change the note is --remove path followed by --add. That writes two history events for one edit and moves the link to the end of the list.

Why it matters for agents

A link note is evidence: here it records which version of a vendored file the item certifies. An agent that re-adds a link with a corrected note reads changed: false as "already correct" and moves on, leaving the tracker with a stale claim. A code-review bot caught this one on a PR; it would otherwise have shipped.

Suggestion (any of these)

  1. --add on an existing path with a different note/scope updates the entry and reports changed: true, with the previous value in the history event.
  2. Or keep --add idempotent, but report changed: false with a receipt such as unchanged_existing: [{path, note_kept, note_ignored}] and a hint naming the edit path.
  3. Add an explicit edit verb, e.g. pm files <id> --update path=<p>,note=<new>, and mirror it on pm docs and pm test, which share the same pair form.

Related: #867, fixed duplicate adds reporting changed: true; this is the opposite case, where a real change is reported as none.

Activity

  1. unbraind commented on Sep 28, 2026

    @unbraind
    OwnerAuthor

    Tracked in pm-zqxlfs, with historical idempotency lineage pm-jb1ron. The implementation will preserve equal retries while persisting explicit revised notes through the shared files/docs SDK.

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions