Forum Discussion

JayBeavers's avatar
JayBeavers
New Contributor
8 days ago

op run fails with "deleted or archived" error when resolving item by name, but op item get works

1Password CLI Version: 2.32.0
OS: macOS (Darwin 25.1.0)
Shell: zsh

Problem:

When using op run with an env file that references items by name, it fails with:
[ERROR] could not find item GitLab in vault Employee, because it has been deleted or archived

However, the item exists and can be accessed by name with other commands:
# This works fine:
op item get "GitLab" --vault Employee --fields token

# This also confirms the item exists:
op item list --vault Employee | grep GitLab
# Returns: qf...bq GitLab Employee 3 weeks ago

Reproduction:

1. Create secrets.env:
GITLAB_TOKEN=op://Employee/GitLab/token

2. Run:
op run --env-file=secrets.env -- env | grep GITLAB

3. Error occurs despite the item being accessible via op item get.

Workaround:

Using the item ID instead of the name works:
GITLAB_TOKEN=op://Employee/qf...hq/token

Expected: op run should resolve items by name the same way op item get does.

No RepliesBe the first to reply