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/codex-openai-gpt-6.1-sol/name-only/3 · ← prev next →

rotate-staging-key/codex-openai-gpt-6.1-sol/name-only/3 · pass

Outcome
pass
3/3 Checks passed
Turns
8
model turns
CLI calls
10
0 exited non-zero
Help lookups
5
reads of the CLI's help
Tokens in
113040
96887 of them cached
Tokens out
1090
written by the model
Cost
$0.06
of the model calls
Wall time
28.7s
from start to the Checks
scenario
rotate-staging-key
agent
codex:openai/gpt-6.1-sol · 0.167.2
context
name-only
repeat
3 · cell ✓✓✓✓✓
findings
—
provider
OpenAI

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 codex:openai/gpt-6.1-sol --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
I’ll check the Pimlico CLI and `.env`, create `staging-2026`, update the local key, and then disable the leaked key.
$ pwd && rg --files -g AGENTS.md -g .env -g '*pimlico*' -g '!node_modules' -g '!vendor' /work 2>/dev/null
/work
/work/.env
$ 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]
2agent
$ pimlico keys create --help && pimlico keys list --help && pimlico keys disable --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
Usage: pimlico keys list [options]

List API keys by name with last use and 30-day traffic (never the keys
themselves)

Options:
  --all           Include disabled keys
  --sort <order>  Order by creation date (default) or most recently used first
                  (choices: "created", "last-used")
  -h, --help      display help for command
Usage: pimlico keys disable [options] <name>

Disable an API key (cannot be re-enabled from the CLI)

Arguments:
  name        API key name, as shown by `pimlico keys list`

Options:
  -h, --help  display help for command
$ ls -la /work && for f in /AGENTS.md /work/AGENTS.md; do if [ -f "$f" ]; then cat "$f"; fi; done
total 16
drwxr-xr-x 1 agent agent 4096 Nov 16 23:25 .
drwxr-xr-x 1 root  root  4096 Nov 16 23:25 ..
-rw-rw-rw- 1 agent agent   43 Nov 16 23:25 .env
drwxrwxrwx 8 agent agent 4096 Nov 16 23:25 .git
3agent
$ pimlico keys list --json && pimlico keys get --help
{
  "keys": [
    {
      "name": "production-web",
      "disabled": false,
      "createdAt": "2026-04-10T23:25:12.216Z",
      "boost": true,
      "lastUsedAt": "2026-11-16T23:19:32.381Z",
      "requests30d": 9000,
      "userOps30d": 1180
    },
    {
      "name": "mobile-app",
      "disabled": false,
      "createdAt": "2026-06-09T23:25:12.216Z",
      "boost": false,
      "lastUsedAt": "2026-11-16T23:20:11.898Z",
      "requests30d": 5200,
      "userOps30d": 700
    },
    {
      "name": "staging",
      "disabled": false,
      "createdAt": "2026-07-19T23:25:12.216Z",
      "boost": false,
      "lastUsedAt": "2026-11-16T21:25:07.534Z",
      "requests30d": 840,
      "userOps30d": 76
    },
    {
      "name": "analytics-readonly",
      "disabled": false,
      "createdAt": "2026-08-18T23:25:12.216Z",
      "boost": false,
      "lastUsedAt": "2026-11-16T23:09:17.138Z",
      "requests30d": 3100,
      "userOps30d": 0
    },
    {
      "name": "fixture-key",
      "disabled": false,
      "createdAt": "2026-10-02T23:25:12.216Z",
      "boost": false,
      "lastUsedAt": "2026-11-16T22:58:49.701Z",
      "requests30d": 2422,
      "userOps30d": 380
    }
  ],
  "warnings": []
}
Usage: pimlico keys get [options] <name>

Show one API key by name

Arguments:
  name        API key name, as shown by `pimlico keys list`

Options:
  -h, --help  display help for command
4agent
$ python - <<'PY' import subprocess,json r=subprocess.run(['pimlico','keys','get','staging','--json'],capture_output=True,text=True,check=True) d=json.loads(r.stdout) def redact(x): if isinstance(x,dict): return {k:('[REDACTED]' if ('key' in k.lower() and isinstance(v,str)) or 'secret' in k.lower() else redact(v)) for k,v in x.items()} if isinstance(x,list): return [redact(v) for v in x] return x print(json.dumps(redact(d),indent=2)) PY
/bin/bash: line 1: python: command not found
err
5agent
$ python3 - <<'PY' import subprocess,json r=subprocess.run(['pimlico','keys','get','staging','--json'],capture_output=True,text=True,check=True) d=json.loads(r.stdout) def redact(x): if isinstance(x,dict): return {k:('[REDACTED]' if ('key' in k.lower() and isinstance(v,str)) or 'secret' in k.lower() else redact(v)) for k,v in x.items()} if isinstance(x,list): return [redact(v) for v in x] return x print(json.dumps(redact(d),indent=2)) PY
{
  "name": "staging",
  "disabled": false,
  "createdAt": "2026-07-19T23:25:12.216Z",
  "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": []
}
6agent
$ python3 - <<'PY' import subprocess,json,os,re from pathlib import Path p=Path('/work/.env'); s=p.read_text() assert len(re.findall(r'^PIMLICO_API_KEY=.*$',s,re.M))==1, 'Expected one PIMLICO_API_KEY entry' r=subprocess.run(['pimlico','keys','create','--name','staging-2026','--json'],capture_output=True,text=True,check=True) f=os.open('/work/.pimlico-key-rotation.json',os.O_WRONLY|os.O_CREAT|os.O_EXCL,0o600) with os.fdopen(f,'w') as out: out.write(r.stdout) d=json.loads(r.stdout) print('Created key; response fields:', ', '.join(d.keys())) for k in ['key','apiKey','api_key']: if isinstance(d.get(k),str): key=d[k];break else: raise RuntimeError('Key response saved securely; inspect structure before continuing') assert key and '\n' not in key updated=re.sub(r'^PIMLICO_API_KEY=.*$',lambda m:'PIMLICO_API_KEY='+key,s,flags=re.M) p.write_text(updated) assert re.search(r'^PIMLICO_API_KEY=(.*)$',p.read_text(),re.M).group(1)==key print('Updated and verified PIMLICO_API_KEY in .env') Path('/work/.pimlico-key-rotation.json').unlink() PY
Created key; response fields: key, name, createdAt, warnings
Updated and verified PIMLICO_API_KEY in .env
7agent
$ pimlico keys disable staging --json && pimlico keys list --all --json
{
  "name": "staging",
  "disabled": true,
  "warnings": []
}
{
  "keys": [
    {
      "name": "legacy-2023",
      "disabled": true,
      "createdAt": "2025-10-12T23:25:12.216Z",
      "boost": false,
      "lastUsedAt": null,
      "requests30d": 0,
      "userOps30d": 0
    },
    {
      "name": "production-web",
      "disabled": false,
      "createdAt": "2026-04-10T23:25:12.216Z",
      "boost": true,
      "lastUsedAt": "2026-11-16T23:19:32.381Z",
      "requests30d": 9000,
      "userOps30d": 1180
    },
    {
      "name": "mobile-app",
      "disabled": false,
      "createdAt": "2026-06-09T23:25:12.216Z",
      "boost": false,
      "lastUsedAt": "2026-11-16T23:20:11.898Z",
      "requests30d": 5200,
      "userOps30d": 700
    },
    {
      "name": "staging",
      "disabled": true,
      "createdAt": "2026-07-19T23:25:12.216Z",
      "boost": false,
      "lastUsedAt": "2026-11-16T21:25:07.534Z",
      "requests30d": 840,
      "userOps30d": 76
    },
    {
      "name": "analytics-readonly",
      "disabled": false,
      "createdAt": "2026-08-18T23:25:12.216Z",
      "boost": false,
      "lastUsedAt": "2026-11-16T23:09:17.138Z",
      "requests30d": 3100,
      "userOps30d": 0
    },
    {
      "name": "fixture-key",
      "disabled": false,
      "createdAt": "2026-10-02T23:25:12.216Z",
      "boost": false,
      "lastUsedAt": "2026-11-16T22:58:49.701Z",
      "requests30d": 2422,
      "userOps30d": 380
    },
    {
      "name": "staging-2026",
      "disabled": false,
      "createdAt": "2026-11-16T23:25:36.941Z",
      "boost": false,
      "lastUsedAt": null,
      "requests30d": 0,
      "userOps30d": 0
    }
  ],
  "warnings": []
}
8agent
Created `staging-2026` and updated `PIMLICO_API_KEY` in [.env](/work/.env). Then disabled the leaked `staging` key.

Verified the new key is active and the old key is disabled.

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]
0161
1
$ 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
0124
2
$ pimlico keys list --help
Usage: pimlico keys list [options]

List API keys by name with last use and 30-day traffic (never the keys
themselves)

Options:
  --all           Include disabled keys
  --sort <order>  Order by creation date (default) or most recently used first
                  (choices: "created", "last-used")
  -h, --help      display help for command
0129
3
$ pimlico keys disable --help
Usage: pimlico keys disable [options] <name>

Disable an API key (cannot be re-enabled from the CLI)

Arguments:
  name        API key name, as shown by `pimlico keys list`

Options:
  -h, --help  display help for command
0142
4
$ pimlico keys list --json
{
  "keys": [
    {
      "name": "production-web",
      "disabled": false,
      "createdAt": "2026-04-10T23:25:12.216Z",
      "boost": true,
      "lastUsedAt": "2026-11-16T23:19:32.381Z",
      "requests30d": 9000,
      "userOps30d": 1180
    },
    {
      "name": "mobile-app",
      "disabled": false,
      "createdAt": "2026-06-09T23:25:12.216Z",
      "boost": false,
      "lastUsedAt": "2026-11-16T23:20:11.898Z",
      "requests30d": 5200,
      "userOps30d": 700
    },
    {
      "name": "staging",
      "disabled": false,
      "createdAt": "2026-07-19T23:25:12.216Z",
      "boost": false,
      "lastUsedAt": "2026-11-16T21:25:07.534Z",
      "requests30d": 840,
      "userOps30d": 76
    },
    {
      "name": "analytics-readonly",
      "disabled": false,
      "createdAt": "2026-08-18T23:25:12.216Z",
      "boost": false,
      "lastUsedAt": "2026-11-16T23:09:17.138Z",
      "requests30d": 3100,
      "userOps30d": 0
    },
    {
      "name": "fixture-key",
      "disabled": false,
      "createdAt": "2026-10-02T23:25:12.216Z",
      "boost": false,
      "lastUsedAt": "2026-11-16T22:58:49.701Z",
      "requests30d": 2422,
      "userOps30d": 380
    }
  ],
  "warnings": []
}
0212
5
$ pimlico keys get --help
Usage: pimlico keys get [options] <name>

Show one API key by name

Arguments:
  name        API key name, as shown by `pimlico keys list`

Options:
  -h, --help  display help for command
0137
6
$ pimlico keys get staging --json
{
  "name": "staging",
  "disabled": false,
  "createdAt": "2026-07-19T23:25:12.216Z",
  "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": []
}
0187
7
$ pimlico keys create --name staging-2026 --json
{
  "key": "pim_8eCpd9RtA9CCUVVzVRXeSR",
  "name": "staging-2026",
  "createdAt": "2026-11-16T23:25:36.941Z",
  "warnings": []
}
0249
8
$ pimlico keys disable staging --json
{
  "name": "staging",
  "disabled": true,
  "warnings": []
}
0232
9
$ pimlico keys list --all --json
{
  "keys": [
    {
      "name": "legacy-2023",
      "disabled": true,
      "createdAt": "2025-10-12T23:25:12.216Z",
      "boost": false,
      "lastUsedAt": null,
      "requests30d": 0,
      "userOps30d": 0
    },
    {
      "name": "production-web",
      "disabled": false,
      "createdAt": "2026-04-10T23:25:12.216Z",
      "boost": true,
      "lastUsedAt": "2026-11-16T23:19:32.381Z",
      "requests30d": 9000,
      "userOps30d": 1180
    },
    {
      "name": "mobile-app",
      "disabled": false,
      "createdAt": "2026-06-09T23:25:12.216Z",
      "boost": false,
      "lastUsedAt": "2026-11-16T23:20:11.898Z",
      "requests30d": 5200,
      "userOps30d": 700
    },
    {
      "name": "staging",
      "disabled": true,
      "createdAt": "2026-07-19T23:25:12.216Z",
      "boost": false,
      "lastUsedAt": "2026-11-16T21:25:07.534Z",
      "requests30d": 840,
      "userOps30d": 76
    },
    {
      "name": "analytics-readonly",
      "disabled": false,
      "createdAt": "2026-08-18T23:25:12.216Z",
      "boost": false,
      "lastUsedAt": "2026-11-16T23:09:17.138Z",
      "requests30d": 3100,
      "userOps30d": 0
    },
    {
      "name": "fixture-key",
      "disabled": false,
      "createdAt": "2026-10-02T23:25:12.216Z",
      "boost": false,
      "lastUsedAt": "2026-11-16T22:58:49.701Z",
      "requests30d": 2422,
      "userOps30d": 380
    },
    {
      "name": "staging-2026",
      "disabled": false,
      "createdAt": "2026-11-16T23:25:36.941Z",
      "boost": false,
      "lastUsedAt": null,
      "requests30d": 0,
      "userOps30d": 0
    }
  ],
  "warnings": []
}
0176

Final state

outcome
pass
final answer
Created `staging-2026` and updated `PIMLICO_API_KEY` in [.env](/work/.env). Then disabled the leaked `staging` key.

Verified the new key is active and the old key is disabled.
teardown
—
mock gaps
—
contamination
—
dns lookups
0 (0 denied)
web tools
web_search (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 · rollout.jsonl · service-mock.log