unsnag pimlico 1.2.0 · 7bff655a7e58 dirty
· 32m 29s mock
known gaps of mock: usage and key activity have no 1-2 hour aggregation lag; month-to-date metered units behind balance are fixed values; no rate limiting
runs / rotate-staging-key/claude-code-anthropic-claude-opus-5.5/skill/4 · ← prev next →

rotate-staging-key/claude-code-anthropic-claude-opus-5.5/skill/4 · pass

Outcome
pass
3/3 Checks passed
Turns
9
model turns
CLI calls
9
0 exited non-zero
Help lookups
1
reads of the CLI's help
Tokens in
71275
65934 of them cached
Tokens out
1829
written by the model
Cost
$0.08
of the model calls
Wall time
31.3s
from start to the Checks
scenario
rotate-staging-key
agent
claude-code:anthropic/claude-opus-5.5 · 2.1.318
context
skill
repeat
4 · cell ✓✓✓✓✓
findings
—
provider
Anthropic

checks

#checkresultdetailsignal
1
set -euo pipefail
curl -fsS "$PIMLICO_DASHBOARD_URL/__mock/facts" | jq -e '
  ([.keys[] | select(.name == "staging")] | length == 1 and .[0].disabled)
  and ([.keys[] | select(.name == "staging-2026" and (.disabled | not))] | length == 1)'
passexited 0
true
2
set -euo pipefail
secret=$(curl -fsS "$PIMLICO_DASHBOARD_URL/__mock/facts" | jq -r '.keys[] | select(.name == "staging-2026") | .secret')
grep -Eq "^(export )?PIMLICO_API_KEY=[\"']?$secret[\"']?[[:space:]]*$" /work/.env
test "$(grep -c PIMLICO_API_KEY /work/.env)" -eq 1
passexited 0
3
set -euo pipefail
curl -fsS "$PIMLICO_DASHBOARD_URL/__mock/events" | jq -e '
  [.events[] | select(.ok)] as $e
  | ([$e[] | select(.procedure == "keys.create")][0].seq) < ([$e[] | select(.procedure == "keys.disable")][0].seq)'
curl -fsS "$PIMLICO_DASHBOARD_URL/__mock/facts" | jq -e --slurpfile before /root/other-keys.json '[.keys[] | select(.name != "staging" and .name != "staging-2026") | {name, disabled}] == $before[0]'
passexited 0
true
true

reproduce

unsnag run --scenario rotate-staging-key --agent claude-code:anthropic/claude-opus-5.5 --context skill --runs 1

Transcript highlighted = a Signal fired

#actorcontentexitsignal
0user
You have the `pimlico` CLI available.

Our staging Pimlico API key leaked. Replace it with a new key called staging-2026, update PIMLICO_API_KEY in .env to the new key, and then disable the leaked one.
1agent
[Skill] {"skill":"pimlico"}
Launching skill: pimlico
2harness
Base directory for this skill: /work/.claude/skills/pimlico

# The `pimlico` CLI

`pimlico` reads and changes the Pimlico account the user is logged in to. Every
command takes `--json`, which prints one JSON object (errors too, as
`{"error": {...}}` on stdout). Prefer `--json` when you parse output.

Exit codes: `0` ok, `1` error, `2` a threshold was breached (`balance --below`),
`3` not logged in, `75` the API is unavailable or rate-limited. On exit 3, run
`pimlico login --no-wait --json`, show the user the `url` and `code`, then call
`pimlico login --wait --json` in the same turn until `status` is not `pending`.

## Commands

| Task | Command |
| --- | --- |
| Who am I logged in as | `pimlico whoami` |
| Credits, open invoices, runway | `pimlico balance` (`--below <usd>` exits 2 under it) |
| Invoices | `pimlico invoices` (`--open` for unpaid only) |
| Traffic and spend | `pimlico usage --last 24h\|7d\|30d --group chain\|key\|day [--key <name>]` |
| One user operation | `pimlico op <userOpHash> [--chain <id>]` |
| User operation logs | `pimlico ops [--key <name>] [--chain <id>] [--status <status>] [--last 24h\|7d\|30d]` |
| RPC request logs | `pimlico requests [--key <name>] [--method <rpc method>] [--status success\|error] [--bodies]` |
| Supported chains | `pimlico chains [--mainnet\|--testnet]` (no login needed) |
| ERC-20 paymaster tokens | `pimlico erc20 tokens [--chain <id>]` |
| API keys | `pimlico keys list [--all]`, `keys get <name>`, `keys create --name <n>`, `keys rename <name> --to <n>`, `keys disable <name>` |
| Sponsorship policies | `pimlico policies list`, `policies get <sp_id>`, `policies create --name <n> …`, `policies update <sp_id> …`, `policies enable\|disable <sp_id>` |

Run `pimlico <command> --help` for every flag.

## Things to know

- **Policies are addressed by id**, not name: find the `sp_…` id with
  `pimlico policies list` first. Policy amounts are in USD
  (`--budget-usd`, `--per-user-usd`, `--per-op-usd`); `--chains` takes
  comma-separated chain ids (Base is 8453, Optimism 10, Base Sepolia 84532).
  Dates (`--start`, `--end`) are ISO 8601.
- **API keys are addressed by name.** `keys create` prints the new key's
  secret once; save it then. `keys disable` cannot be undone from the CLI.
  Names only need to be unique among active keys.
- **Logs are paginated.** `ops` and `requests` print 50 records per page and a
  `nextCursor`; pass `--all` to walk every page (up to `--max`, 1000 by
  default; with `--json` it prints one JSON object per line). `--csv` prints
  CSV. Both default to the last 24h; widen with `--last 7d` or `--last 30d`.
- **`ops --status` takes one status.** A failed operation is any of
  `failed_validation`, `dropped`, `failed_onchain`,
  `execution_reverted_onchain` and `frontran_onchain`; query each, or fetch
  them all and filter. Operations rejected on submission never become
  operations: look for them with
  `pimlico requests --method eth_sendUserOperation --status error`.
- **Why did an oper
[… 78 more characters]
3agent
$ pimlico keys list --all --json; grep -n PIMLICO .env | sed 's/=.*/=<redacted>/'
{
  "keys": [
    {
      "name": "legacy-2023",
      "disabled": true,
      "createdAt": "2025-10-12T23:30:46.236Z",
      "boost": false,
      "lastUsedAt": null,
      "requests30d": 0,
      "userOps30d": 0
    },
    {
      "name": "production-web",
      "disabled": false,
      "createdAt": "2026-04-10T23:30:46.236Z",
      "boost": true,
      "lastUsedAt": "2026-11-16T23:25:06.401Z",
      "requests30d": 9000,
      "userOps30d": 1180
    },
    {
      "name": "mobile-app",
      "disabled": false,
      "createdAt": "2026-06-09T23:30:46.236Z",
      "boost": false,
      "lastUsedAt": "2026-11-16T23:25:45.918Z",
      "requests30d": 5200,
      "userOps30d": 700
    },
    {
      "name": "staging",
      "disabled": false,
      "createdAt": "2026-07-19T23:30:46.236Z",
      "boost": false,
      "lastUsedAt": "2026-11-16T21:30:41.554Z",
      "requests30d": 840,
      "userOps30d": 76
    },
    {
      "name": "analytics-readonly",
      "disabled": false,
      "createdAt": "2026-08-18T23:30:46.236Z",
      "boost": false,
      "lastUsedAt": "2026-11-16T23:14:51.158Z",
      "requests30d": 3100,
      "userOps30d": 0
    },
    {
      "name": "fixture-key",
      "disabled": false,
      "createdAt": "2026-10-02T23:30:46.236Z",
      "boost": false,
      "lastUsedAt": "2026-11-16T23:04:23.721Z",
      "requests30d": 2422,
      "userOps30d": 380
    }
  ],
  "warnings": []
}
1:PIMLICO_API_KEY=<redacted>
4agent
$ pimlico keys get staging --json; cut -c1-24 .env | sed -n 1p; wc -l .env
{
  "name": "staging",
  "disabled": false,
  "createdAt": "2026-07-19T23:30:46.236Z",
  "accessConfig": {
    "bundlerEnabled": true,
    "accountApiEnabled": false,
    "magicSpendEnabled": false,
    "boostEnabled": false,
    "evmDisabled": false,
    "solanaDisabled": false,
    "verifyingPaymasterEnabled": true,
    "walletMethodEnabled": false,
    "apiVersionsEnabled": [
      "v1",
      "v2"
    ],
    "entryPointVersionsEnabled": [
      "0x0000000071727De22E5E9d8BAf0edAc6f37da032",
      "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789"
    ],
    "sponsorshipPolicyAllowlist": null,
    "userAgentAllowlist": null,
    "originAllowlist": null,
    "ipAllowlist": null,
    "paymasterSignatureExpirySeconds": 600
  },
  "rateLimitMax": 10000,
  "rateLimitWindow": 3600000,
  "boost": false,
  "warnings": []
}
PIMLICO_API_KEY=pim_H5zc
1 .env
5agent
$ pimlico keys create --help
Usage: pimlico keys create [options]

Create an API key (the key is shown once)

Options:
  --name <name>  Key name, unique among your active keys (required)
  -h, --help     display help for command
6agent
$ umask 077 && pimlico keys create --name staging-2026 --json > /tmp/newkey.json; echo exit=$?; python3 -I -c "import json;d=json.load(open('/tmp/newkey.json'));print({k:(v if 'key' not in k.lower() and 'secret' not in k.lower() else str(v)[:8]+'…') for k,v in d.items()})"
exit=0
{'key': 'pim_8VE6…', 'name': 'staging-2026', 'createdAt': '2026-11-16T23:31:01.893Z', 'warnings': []}
7agent
$ python3 -I -c " import json,re k=json.load(open('/tmp/newkey.json'))['key'] s=open('.env').read() s2=re.sub(r'^PIMLICO_API_KEY=.*$', lambda m:'PIMLICO_API_KEY='+k, s, flags=re.M) open('.env','w').write(s2) print('updated' if k in s2 else 'FAILED')" && cut -c1-24 .env && rm /tmp/newkey.json && pimlico keys get staging-2026 --json | head -4
updated
PIMLICO_API_KEY=pim_8VE6
{
  "name": "staging-2026",
  "disabled": false,
  "createdAt": "2026-11-16T23:31:01.893Z",
8agent
$ diff <(pimlico keys get staging --json | python3 -I -c "import json,sys;d=json.load(sys.stdin);print(json.dumps({k:d[k] for k in ('accessConfig','rateLimitMax','rateLimitWindow','boost')},indent=1))") <(pimlico keys get staging-2026 --json | python3 -I -c "import json,sys;d=json.load(sys.stdin);print(json.dumps({k:d[k] for k in ('accessConfig','rateLimitMax','rateLimitWindow','boost')},indent=1))") && echo same-config
same-config
9agent
$ pimlico keys disable staging --json; pimlico keys list --all --json | python3 -I -c "import json,sys;[print(k['name'],'disabled' if k['disabled'] else 'active') for k in json.load(sys.stdin)['keys']]"
{
  "name": "staging",
  "disabled": true,
  "warnings": []
}
legacy-2023 disabled
production-web active
mobile-app active
staging disabled
analytics-readonly active
fixture-key active
staging-2026 active
10agent
I've replaced the leaked staging key with a new one called `staging-2026` and disabled the leaked key, `staging`.

1. **New key:** `staging-2026` is active. I compared it with the old key and its settings match: the same bundler and paymaster access, API versions, entry points, rate limit (10,000 requests per hour) and no boost.
2. **`.env`:** `PIMLICO_API_KEY` now holds the new key, which starts with `pim_8VE6…`. No other lines changed, and the secret was never printed in full. I deleted the temporary file I used to hold it.
3. **Leaked key:** `staging` is now disabled. This can't be undone from the CLI.

The old key was last used today at 21:30 UTC, so something was still using it. Any staging service or CI job that reads the key from somewhere other than this `.env` will fail until you give it the new key. If nobody on your side made that 21:30 request, it may have been whoever got hold of the leaked key. You can check with `pimlico requests --key staging --last 30d`.

`.env` isn't tracked by git, so there's nothing to commit. Add it to `.gitignore` if it isn't there already, so the key doesn't get committed by accident.

Target CLI calls

#callexitmssignal
0
$ pimlico keys list --all --json
{
  "keys": [
    {
      "name": "legacy-2023",
      "disabled": true,
      "createdAt": "2025-10-12T23:30:46.236Z",
      "boost": false,
      "lastUsedAt": null,
      "requests30d": 0,
      "userOps30d": 0
    },
    {
      "name": "production-web",
      "disabled": false,
      "createdAt": "2026-04-10T23:30:46.236Z",
      "boost": true,
      "lastUsedAt": "2026-11-16T23:25:06.401Z",
      "requests30d": 9000,
      "userOps30d": 1180
    },
    {
      "name": "mobile-app",
      "disabled": false,
      "createdAt": "2026-06-09T23:30:46.236Z",
      "boost": false,
      "lastUsedAt": "2026-11-16T23:25:45.918Z",
      "requests30d": 5200,
      "userOps30d": 700
    },
    {
      "name": "staging",
      "disabled": false,
      "createdAt": "2026-07-19T23:30:46.236Z",
      "boost": false,
      "lastUsedAt": "2026-11-16T21:30:41.554Z",
      "requests30d": 840,
      "userOps30d": 76
    },
    {
      "name": "analytics-readonly",
      "disabled": false,
      "createdAt": "2026-08-18T23:30:46.236Z",
      "boost": false,
      "lastUsedAt": "2026-11-16T23:14:51.158Z",
      "requests30d": 3100,
      "userOps30d": 0
    },
    {
      "name": "fixture-key",
      "disabled": false,
      "createdAt": "2026-10-02T23:30:46.236Z",
      "boost": false,
      "lastUsedAt": "2026-11-16T23:04:23.721Z",
      "requests30d": 2422,
      "userOps30d": 380
    }
  ],
  "warnings": []
}
0231
1
$ pimlico keys get staging --json
{
  "name": "staging",
  "disabled": false,
  "createdAt": "2026-07-19T23:30:46.236Z",
  "accessConfig": {
    "bundlerEnabled": true,
    "accountApiEnabled": false,
    "magicSpendEnabled": false,
    "boostEnabled": false,
    "evmDisabled": false,
    "solanaDisabled": false,
    "verifyingPaymasterEnabled": true,
    "walletMethodEnabled": false,
    "apiVersionsEnabled": [
      "v1",
      "v2"
    ],
    "entryPointVersionsEnabled": [
      "0x0000000071727De22E5E9d8BAf0edAc6f37da032",
      "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789"
    ],
    "sponsorshipPolicyAllowlist": null,
    "userAgentAllowlist": null,
    "originAllowlist": null,
    "ipAllowlist": null,
    "paymasterSignatureExpirySeconds": 600
  },
  "rateLimitMax": 10000,
  "rateLimitWindow": 3600000,
  "boost": false,
  "warnings": []
}
0164
2
$ pimlico keys create --help
Usage: pimlico keys create [options]

Create an API key (the key is shown once)

Options:
  --name <name>  Key name, unique among your active keys (required)
  -h, --help     display help for command
0135
3
$ pimlico keys create --name staging-2026 --json
{
  "key": "pim_8VE6FebvyYkQ4ooJuT8m5r",
  "name": "staging-2026",
  "createdAt": "2026-11-16T23:31:01.893Z",
  "warnings": []
}
0232
4
$ pimlico keys get staging-2026 --json
{
  "name": "staging-2026",
  "disabled": false,
  "createdAt": "2026-11-16T23:31:01.893Z",
  "accessConfig": {
    "bundlerEnabled": true,
    "accountApiEnabled": false,
    "magicSpendEnabled": false,
    "boostEnabled": false,
    "evmDisabled": false,
    "solanaDisabled": false,
    "verifyingPaymasterEnabled": true,
    "walletMethodEnabled": false,
    "apiVersionsEnabled": [
      "v1",
      "v2"
    ],
    "entryPointVersionsEnabled": [
      "0x0000000071727De22E5E9d8BAf0edAc6f37da032",
      "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789"
    ],
    "sponsorshipPolicyAllowlist": null,
    "userAgentAllowlist": null,
    "originAllowlist": null,
    "ipAllowlist": null,
    "paymasterSignatureExpirySeconds": 600
  },
  "rateLimitMax": 10000,
  "rateLimitWindow": 3600000,
  "boost": false,
  "warnings": []
}
0178
5
$ pimlico keys get staging --json
{
  "name": "staging",
  "disabled": false,
  "createdAt": "2026-07-19T23:30:46.236Z",
  "accessConfig": {
    "bundlerEnabled": true,
    "accountApiEnabled": false,
    "magicSpendEnabled": false,
    "boostEnabled": false,
    "evmDisabled": false,
    "solanaDisabled": false,
    "verifyingPaymasterEnabled": true,
    "walletMethodEnabled": false,
    "apiVersionsEnabled": [
      "v1",
      "v2"
    ],
    "entryPointVersionsEnabled": [
      "0x0000000071727De22E5E9d8BAf0edAc6f37da032",
      "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789"
    ],
    "sponsorshipPolicyAllowlist": null,
    "userAgentAllowlist": null,
    "originAllowlist": null,
    "ipAllowlist": null,
    "paymasterSignatureExpirySeconds": 600
  },
  "rateLimitMax": 10000,
  "rateLimitWindow": 3600000,
  "boost": false,
  "warnings": []
}
0165
6
$ pimlico keys get staging-2026 --json
{
  "name": "staging-2026",
  "disabled": false,
  "createdAt": "2026-11-16T23:31:01.893Z",
  "accessConfig": {
    "bundlerEnabled": true,
    "accountApiEnabled": false,
    "magicSpendEnabled": false,
    "boostEnabled": false,
    "evmDisabled": false,
    "solanaDisabled": false,
    "verifyingPaymasterEnabled": true,
    "walletMethodEnabled": false,
    "apiVersionsEnabled": [
      "v1",
      "v2"
    ],
    "entryPointVersionsEnabled": [
      "0x0000000071727De22E5E9d8BAf0edAc6f37da032",
      "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789"
    ],
    "sponsorshipPolicyAllowlist": null,
    "userAgentAllowlist": null,
    "originAllowlist": null,
    "ipAllowlist": null,
    "paymasterSignatureExpirySeconds": 600
  },
  "rateLimitMax": 10000,
  "rateLimitWindow": 3600000,
  "boost": false,
  "warnings": []
}
0167
7
$ pimlico keys disable staging --json
{
  "name": "staging",
  "disabled": true,
  "warnings": []
}
0212
8
$ pimlico keys list --all --json
{
  "keys": [
    {
      "name": "legacy-2023",
      "disabled": true,
      "createdAt": "2025-10-12T23:30:46.236Z",
      "boost": false,
      "lastUsedAt": null,
      "requests30d": 0,
      "userOps30d": 0
    },
    {
      "name": "production-web",
      "disabled": false,
      "createdAt": "2026-04-10T23:30:46.236Z",
      "boost": true,
      "lastUsedAt": "2026-11-16T23:25:06.401Z",
      "requests30d": 9000,
      "userOps30d": 1180
    },
    {
      "name": "mobile-app",
      "disabled": false,
      "createdAt": "2026-06-09T23:30:46.236Z",
      "boost": false,
      "lastUsedAt": "2026-11-16T23:25:45.918Z",
      "requests30d": 5200,
      "userOps30d": 700
    },
    {
      "name": "staging",
      "disabled": true,
      "createdAt": "2026-07-19T23:30:46.236Z",
      "boost": false,
      "lastUsedAt": "2026-11-16T21:30:41.554Z",
      "requests30d": 840,
      "userOps30d": 76
    },
    {
      "name": "analytics-readonly",
      "disabled": false,
      "createdAt": "2026-08-18T23:30:46.236Z",
      "boost": false,
      "lastUsedAt": "2026-11-16T23:14:51.158Z",
      "requests30d": 3100,
      "userOps30d": 0
    },
    {
      "name": "fixture-key",
      "disabled": false,
      "createdAt": "2026-10-02T23:30:46.236Z",
      "boost": false,
      "lastUsedAt": "2026-11-16T23:04:23.721Z",
      "requests30d": 2422,
      "userOps30d": 380
    },
    {
      "name": "staging-2026",
      "disabled": false,
      "createdAt": "2026-11-16T23:31:01.893Z",
      "boost": false,
      "lastUsedAt": null,
      "requests30d": 0,
      "userOps30d": 0
    }
  ],
  "warnings": []
}
0184

Final state

outcome
pass
final answer
I've replaced the leaked staging key with a new one called `staging-2026` and disabled the leaked key, `staging`.

1. **New key:** `staging-2026` is active. I compared it with the old key and its settings match: the same bundler and paymaster access, API versions, entry points, rate limit (10,000 requests per hour) and no boost.
2. **`.env`:** `PIMLICO_API_KEY` now holds the new key, which starts with `pim_8VE6…`. No other lines changed, and the secret was never printed in full. I deleted the temporary file I used to hold it.
3. **Leaked key:** `staging` is now disabled. This can't be undone from the CLI.

The old key was last used today at 21:30 UTC, so something was still using it. Any staging service or CI job that reads the key from somewhere other than this `.env` will fail until you give it the new key. If nobody on your side made that 21:30 request, it may have been whoever got hold of the leaked key. You can check with `pimlico requests --key staging --last 30d`.

`.env` isn't tracked by git, so there's nothing to commit. Add it to `.gitignore` if it isn't there already, so the key doesn't get committed by accident.
teardown
—
mock gaps
—
contamination
—
dns lookups
0 (0 denied)
web tools
WebFetch (sandbox) · WebSearch (provider)

context inputs

kindsourceplaced atofferedused
skillskills/pimlico.claude/skills/pimlicotruetrue

prompt

You have the `pimlico` CLI available.

Our staging Pimlico API key leaked. Replace it with a new key called staging-2026, update PIMLICO_API_KEY in .env to the new key, and then disable the leaked one.

Artifacts

run.json · agent-stdout.jsonl · service-mock.log · session.jsonl