Skip to main content
August 27, 2026

CLI Bug: op run resolves an archived item when two items in a vault share a title

  • August 27, 2026
  • 0 replies
  • 3 views

When a vault contains two items with the same title — one active, one archived — op run can resolve the archived one and abort with an error saying the item has been deleted or archived. The active item is fine, and op read / op item get resolve it correctly the whole time.

The behaviour only appears once the env file crosses a small number of references to that item, which is what made it hard to pin down: every one-off check you'd naturally run to diagnose it passes.

Environment: op 2.39.0, macOS (Apple Silicon), installed via Homebrew.

What I was doing — running a command under op run with an env file of ~30 secret references, all pointing at fields on a single item.

What happened — the could not find item ENV in vault <vault>, because it has been deleted or archived error, followed by proof the item was active: op read returns the value, op item get returns the item with all fields.

What I tried — the nine-row probe table: reference count (1, 2, 6, 31) crossed with addressing (title vs item UUID), plus the empty-field and missing-field cases. Six by title fail, the identical six by UUID succeed, the identical six by title succeed once the archived twin is removed.

Two different failures share the same wording — the collision names the vault in plain text with no prefix; a genuinely archived item is prefixed could not resolve item UUID for item X: and names the vault as a UUID.

What it appears to be — above a small reference count, op run bulk-fetches the item by title without excluding archived items.

Then: reproducing it (6 steps in a scratch vault), detecting it (the op item list --include-archive one-liner), workarounds (rename rather than delete; or address by UUID), what I did not verify (threshold bracketed not measured; determinism unknown; other subcommands untested; no longer reproducible in place), and two suggestions (exclude archived items from the bulk lookup; separately, fix the message when an active item with that title exists).