Use a 1Password service account so a headless, VM, or background-service T3 Code server can read secrets via op without desktop approval prompts. See Secrets for basics, or 1Password Connect for self-hosted Connect.
Set it up
- In 1Password (Developer → Service Accounts), create a service account with read access only to the vaults T3 Code needs (cannot access Personal/Private/Employee vaults). Copy the one-time token.
- Install the 1Password CLI (
op) on the T3 Code server machine. - Set
OP_SERVICE_ACCOUNT_TOKENin the server’s environment (for a background service, add it toservice.envand runt3 service restart). Do not setOP_CONNECT_HOST/OP_CONNECT_TOKENin the same environment. - In Settings → Secrets → Add provider, enter any sign-in address (e.g.
my.1password.com;opignores it while the token is set), then useop://vault/item/fieldreferences.
Verify
On the server machine, test with a clean environment:
env -i PATH="$PATH" HOME="$(mktemp -d)" OP_SERVICE_ACCOUNT_TOKEN="$OP_SERVICE_ACCOUNT_TOKEN" \
op read --no-newline "op://Automation/provider-token/credential" >/dev/null && echo "Secret read"
Notes
- Agent scope: Agents inherit the server’s environment and can read any vault accessible to the service account—grant only vaults you’re comfortable exposing to agents.
- Reference names: Use item IDs if an item title contains characters outside letters, digits, spaces,
.,_, and-. - T3 Code times out secret reads after 45 seconds.