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/name-only/5 · ← prev next →

rotate-staging-key/claude-code-anthropic-claude-opus-5.5/name-only/5 · pass

Outcome
pass
3/3 Checks passed
Turns
7
model turns
CLI calls
8
0 exited non-zero
Help lookups
3
reads of the CLI's help
Tokens in
51112
46627 of them cached
Tokens out
1610
written by the model
Cost
$0.06
of the model calls
Wall time
26.2s
from start to the Checks
scenario
rotate-staging-key
agent
claude-code:anthropic/claude-opus-5.5 · 2.1.318
context
name-only
repeat
5 · 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 name-only --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
$ pimlico --help; pimlico keys --help 2>&1 | head -50; cat /work/.env | sed 's/=.*/=<redacted>/'
pimlico 1.2.0

Gas abstraction is a big part of the UX of any crypto product: Pimlico sponsors
your users' gas or lets them pay in ERC-20 tokens, on every popular EVM chain
and Solana. An API key is required to call our bundler and paymaster;
sponsorship policies are optional hardening that limits which operations you pay
for, on which chains and up to what amount. Usage and billing are transparent:
see what you used and what you owe with `pimlico usage` and `pimlico balance`.

Usage  pimlico <command> [options]

Account
  login                  Log in to Pimlico in the browser
  logout                 Log out and forget the stored credentials
  whoami                 Show the logged-in account

Billing & usage
  balance                Credits, open invoices, unbilled usage and headroom
  invoices               Stripe invoices for the account
  usage                  Requests, API credits and sponsored USD, EVM and Solana

Debug
  op <userOpHash>        Status and timeline of a user operation
  ops                    User operation logs with revert reason, policy and cost
  requests               RPC request logs with the error of failed calls
  solana txs             Sponsored and SPL-paid Solana transactions

Configure
  keys list              List API keys with last use and 30-day traffic
  keys get <name>        Show one API key by name
  keys create            Create an API key (the key is shown once)
  keys rename <name>     Rename an API key
  keys disable <name>    Disable an API key (cannot be re-enabled from the CLI)
  policies list          List sponsorship policies
  policies get <id>      Show one policy, including its effective caps
  policies create        Create a sponsorship policy (active unless --inactive)
  policies update <id>   Change a policy's name, chains, caps or window
  policies enable <id>   Switch a policy on
  policies disable <id>  Switch a policy off
  erc20 tokens           Tokens accepted by the ERC-20 paymaster
  chains           
[… 1454 more characters]
2agent
$ pimlico keys list --json; pimlico keys create --help
{
  "keys": [
    {
      "name": "production-web",
      "disabled": false,
      "createdAt": "2026-04-10T23:36:29.149Z",
      "boost": true,
      "lastUsedAt": "2026-11-16T23:30:49.314Z",
      "requests30d": 9000,
      "userOps30d": 1180
    },
    {
      "name": "mobile-app",
      "disabled": false,
      "createdAt": "2026-06-09T23:36:29.149Z",
      "boost": false,
      "lastUsedAt": "2026-11-16T23:31:28.831Z",
      "requests30d": 5200,
      "userOps30d": 700
    },
    {
      "name": "staging",
      "disabled": false,
      "createdAt": "2026-07-19T23:36:29.149Z",
      "boost": false,
      "lastUsedAt": "2026-11-16T21:36:24.467Z",
      "requests30d": 840,
      "userOps30d": 76
    },
    {
      "name": "analytics-readonly",
      "disabled": false,
      "createdAt": "2026-08-18T23:36:29.149Z",
      "boost": false,
      "lastUsedAt": "2026-11-16T23:20:34.071Z",
      "requests30d": 3100,
      "userOps30d": 0
    },
    {
      "name": "fixture-key",
      "disabled": false,
      "createdAt": "2026-10-02T23:36:29.149Z",
      "boost": false,
      "lastUsedAt": "2026-11-16T23:10:06.634Z",
      "requests30d": 2422,
      "userOps30d": 380
    }
  ],
  "warnings": []
}
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
3agent
$ pimlico keys get staging --json
{
  "name": "staging",
  "disabled": false,
  "createdAt": "2026-07-19T23:36:29.149Z",
  "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": []
}
4agent
$ out=$(pimlico keys create --name staging-2026 --json) && echo "$out" | python3 -c 'import json,sys; d=json.load(sys.stdin); print({k:("<redacted>" if isinstance(v,str) and len(v)>20 and k!="createdAt" else v) for k,v in d.items()})'; echo "$out" > /tmp/newkey.json; chmod 600 /tmp/newkey.json
{'key': '<redacted>', 'name': 'staging-2026', 'createdAt': '2026-11-16T23:36:42.302Z', 'warnings': []}
5agent
$ cp .env /tmp/env.bak && chmod 600 /tmp/env.bak && python3 -I -c ' import json,re k=json.load(open("/tmp/newkey.json"))["key"] s=open(".env").read() n,c=re.subn(r"(?m)^PIMLICO_API_KEY=.*$", "PIMLICO_API_KEY="+k, s) assert c==1 open(".env","w").write(n) print("replaced", c) ' && grep -c "^PIMLICO_API_KEY=" .env && rm /tmp/newkey.json
replaced 1
1
6agent
Created `staging-2026` and updated `.env`. Now disabling the leaked `staging` key.
$ pimlico keys disable staging --json; pimlico keys list --json | python3 -c 'import json,sys; [print(k["name"], "disabled" if k["disabled"] else "active") for k in json.load(sys.stdin)["keys"]]'; rm -f /tmp/env.bak
{
  "name": "staging",
  "disabled": true,
  "warnings": []
}
production-web active
mobile-app active
analytics-readonly active
fixture-key active
staging-2026 active
7agent
I've replaced the leaked staging key, and the old one is now disabled.

1. **Created `staging-2026`.** Its secret only appears once, and I put it straight into `.env` without printing it, so it never showed up in the terminal or logs.
2. **Updated `.env`.** I replaced the single `PIMLICO_API_KEY=` line with the new key and left the rest of the file alone.
3. **Disabled `staging`.** The CLI confirmed `"disabled": true`, and the key no longer shows among the active keys. The CLI can't turn it back on.

Things to check:
- **Anything else still using the old key will now fail.** The old key was last used today at 21:36 UTC, and `.env` was the only place I changed. Update any deployed staging services, CI secrets or teammates' local files that use it.
- **I couldn't confirm the old `.env` value was actually the `staging` key.** The CLI doesn't show key values, so I went by your description.
- **The new key may not have the old key's settings.** I didn't check its access configuration. The old key had bundler and verifying paymaster enabled, a 10k requests/hour rate limit and no allowlists. If staging relied on any of that, compare with `pimlico keys get staging-2026`.

Target CLI calls

#callexitmssignal
0
$ pimlico --help
pimlico 1.2.0

Gas abstraction is a big part of the UX of any crypto product: Pimlico sponsors
your users' gas or lets them pay in ERC-20 tokens, on every popular EVM chain
and Solana. An API key is required to call our bundler and paymaster;
sponsorship policies are optional hardening that limits which operations you pay
for, on which chains and up to what amount. Usage and billing are transparent:
see what you used and what you owe with `pimlico usage` and `pimlico balance`.

Usage  pimlico <command> [options]

Account
  login                  Log in to Pimlico in the browser
  logout                 Log out and forget the stored credentials
  whoami                 Show the logged-in account

Billing & usage
  balance                Credits, open invoices, unbilled usage and headroom
  invoices               Stripe invoices for the account
  usage                  Requests, API credits and sponsored USD, EVM and Solana

Debug
  op <userOpHash>        Status and timeline of a user operation
  ops                    User operation logs with revert reason, policy and cost
  requests               RPC request logs with the error of failed calls
  solana txs             Sponsored and SPL-paid Solana transactions

Configure
  keys list              List API keys with last use and 30-day traffic
  keys get <name>        Show one API key by name
  keys create            Create an API key (the key is shown once)
  keys rename <name>     Rename an API key
  keys disable <name>    Disable an API key (cannot be re-enabled from the CLI)
  policies list          List sponsorship policies
  policies get <id>      Show one policy, including its effective caps
  policies create        Create a sponsorship policy (active unless --inactive)
  policies update <id>   Change a policy's name, chains, caps or window
  policies enable <id>   Switch a policy on
  policies disable <id>  Switch a policy off
  erc20 tokens           Tokens accepted by the ERC-20 paymaster
  chains           
[… 904 more characters]
0167
1
$ pimlico keys --help
Usage: pimlico keys [options] [command]

API keys

Options:
  -h, --help               display help for command

Commands:
  list [options]           List API keys with last use and 30-day traffic
  get <name>               Show one API key by name
  create [options]         Create an API key (the key is shown once)
  rename [options] <name>  Rename an API key
  disable <name>           Disable an API key (cannot be re-enabled from the
                           CLI)
  help [command]           display help for command
0130
2
$ pimlico keys list --json
{
  "keys": [
    {
      "name": "production-web",
      "disabled": false,
      "createdAt": "2026-04-10T23:36:29.149Z",
      "boost": true,
      "lastUsedAt": "2026-11-16T23:30:49.314Z",
      "requests30d": 9000,
      "userOps30d": 1180
    },
    {
      "name": "mobile-app",
      "disabled": false,
      "createdAt": "2026-06-09T23:36:29.149Z",
      "boost": false,
      "lastUsedAt": "2026-11-16T23:31:28.831Z",
      "requests30d": 5200,
      "userOps30d": 700
    },
    {
      "name": "staging",
      "disabled": false,
      "createdAt": "2026-07-19T23:36:29.149Z",
      "boost": false,
      "lastUsedAt": "2026-11-16T21:36:24.467Z",
      "requests30d": 840,
      "userOps30d": 76
    },
    {
      "name": "analytics-readonly",
      "disabled": false,
      "createdAt": "2026-08-18T23:36:29.149Z",
      "boost": false,
      "lastUsedAt": "2026-11-16T23:20:34.071Z",
      "requests30d": 3100,
      "userOps30d": 0
    },
    {
      "name": "fixture-key",
      "disabled": false,
      "createdAt": "2026-10-02T23:36:29.149Z",
      "boost": false,
      "lastUsedAt": "2026-11-16T23:10:06.634Z",
      "requests30d": 2422,
      "userOps30d": 380
    }
  ],
  "warnings": []
}
0179
3
$ 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
0123
4
$ pimlico keys get staging --json
{
  "name": "staging",
  "disabled": false,
  "createdAt": "2026-07-19T23:36:29.149Z",
  "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": []
}
0154
5
$ pimlico keys create --name staging-2026 --json
{
  "key": "pim_XR52TGXj5tCdUGr1tbbFoX",
  "name": "staging-2026",
  "createdAt": "2026-11-16T23:36:42.302Z",
  "warnings": []
}
0216
6
$ pimlico keys disable staging --json
{
  "name": "staging",
  "disabled": true,
  "warnings": []
}
0239
7
$ pimlico keys list --json
{
  "keys": [
    {
      "name": "production-web",
      "disabled": false,
      "createdAt": "2026-04-10T23:36:29.149Z",
      "boost": true,
      "lastUsedAt": "2026-11-16T23:30:49.314Z",
      "requests30d": 9000,
      "userOps30d": 1180
    },
    {
      "name": "mobile-app",
      "disabled": false,
      "createdAt": "2026-06-09T23:36:29.149Z",
      "boost": false,
      "lastUsedAt": "2026-11-16T23:31:28.831Z",
      "requests30d": 5200,
      "userOps30d": 700
    },
    {
      "name": "analytics-readonly",
      "disabled": false,
      "createdAt": "2026-08-18T23:36:29.149Z",
      "boost": false,
      "lastUsedAt": "2026-11-16T23:20:34.071Z",
      "requests30d": 3100,
      "userOps30d": 0
    },
    {
      "name": "fixture-key",
      "disabled": false,
      "createdAt": "2026-10-02T23:36:29.149Z",
      "boost": false,
      "lastUsedAt": "2026-11-16T23:10:06.634Z",
      "requests30d": 2422,
      "userOps30d": 380
    },
    {
      "name": "staging-2026",
      "disabled": false,
      "createdAt": "2026-11-16T23:36:42.302Z",
      "boost": false,
      "lastUsedAt": null,
      "requests30d": 0,
      "userOps30d": 0
    }
  ],
  "warnings": []
}
0184

Final state

outcome
pass
final answer
I've replaced the leaked staging key, and the old one is now disabled.

1. **Created `staging-2026`.** Its secret only appears once, and I put it straight into `.env` without printing it, so it never showed up in the terminal or logs.
2. **Updated `.env`.** I replaced the single `PIMLICO_API_KEY=` line with the new key and left the rest of the file alone.
3. **Disabled `staging`.** The CLI confirmed `"disabled": true`, and the key no longer shows among the active keys. The CLI can't turn it back on.

Things to check:
- **Anything else still using the old key will now fail.** The old key was last used today at 21:36 UTC, and `.env` was the only place I changed. Update any deployed staging services, CI secrets or teammates' local files that use it.
- **I couldn't confirm the old `.env` value was actually the `staging` key.** The CLI doesn't show key values, so I went by your description.
- **The new key may not have the old key's settings.** I didn't check its access configuration. The old key had bundler and verifying paymaster enabled, a 10k requests/hour rate limit and no allowlists. If staging relied on any of that, compare with `pimlico keys get staging-2026`.
teardown
—
mock gaps
—
contamination
—
dns lookups
0 (0 denied)
web tools
WebFetch (sandbox) · WebSearch (provider)

context inputs

none

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