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/opencode-google-gemini-4-argon/name-only/5 · ← prev next →

rotate-staging-key/opencode-google-gemini-4-argon/name-only/5 · pass

Outcome
pass
3/3 Checks passed
Turns
6
model turns
CLI calls
7
0 exited non-zero
Help lookups
3
reads of the CLI's help
Tokens in
14676
2102 of them cached
Tokens out
496
written by the model
Cost
$0.03
of the model calls
Wall time
79.7s
from start to the Checks
scenario
rotate-staging-key
agent
opencode:google/gemini-4-argon · 2.2.7
context
name-only
repeat
5 · cell ✓✓✓✓✓
findings
—
provider
Google AI Studio

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 opencode:google/gemini-4-argon --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
$ cat .env
PIMLICO_API_KEY=pim_H5zckuhdnmJGsLsDbtiTW4
$ 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 list --json
{
  "keys": [
    {
      "name": "production-web",
      "disabled": false,
      "createdAt": "2026-04-10T23:37:02.965Z",
      "boost": true,
      "lastUsedAt": "2026-11-16T23:31:23.130Z",
      "requests30d": 9000,
      "userOps30d": 1180
    },
    {
      "name": "mobile-app",
      "disabled": false,
      "createdAt": "2026-06-09T23:37:02.965Z",
      "boost": false,
      "lastUsedAt": "2026-11-16T23:32:02.647Z",
      "requests30d": 5200,
      "userOps30d": 700
    },
    {
      "name": "staging",
      "disabled": false,
      "createdAt": "2026-07-19T23:37:02.965Z",
      "boost": false,
      "lastUsedAt": "2026-11-16T21:36:58.283Z",
      "requests30d": 840,
      "userOps30d": 76
    },
    {
      "name": "analytics-readonly",
      "disabled": false,
      "createdAt": "2026-08-18T23:37:02.965Z",
      "boost": false,
      "lastUsedAt": "2026-11-16T23:21:07.887Z",
      "requests30d": 3100,
      "userOps30d": 0
    },
    {
      "name": "fixture-key",
      "disabled": false,
      "createdAt": "2026-10-02T23:37:02.965Z",
      "boost": false,
      "lastUsedAt": "2026-11-16T23:10:40.450Z",
      "requests30d": 2422,
      "userOps30d": 380
    }
  ],
  "warnings": []
}
$ 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
$ 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
3agent
$ pimlico keys create --name staging-2026 --json
{
  "key": "pim_CByo5WAdJod3cLFRzJUGgh",
  "name": "staging-2026",
  "createdAt": "2026-11-16T23:38:06.389Z",
  "warnings": []
}
4agent
$ printf 'PIMLICO_API_KEY=pim_CByo5WAdJod3cLFRzJUGgh\n' > .env
(no output)
$ pimlico keys disable staging --json
{
  "name": "staging",
  "disabled": true,
  "warnings": []
}
5agent
$ cat .env
PIMLICO_API_KEY=pim_CByo5WAdJod3cLFRzJUGgh
$ pimlico keys list --json
{
  "keys": [
    {
      "name": "production-web",
      "disabled": false,
      "createdAt": "2026-04-10T23:37:02.965Z",
      "boost": true,
      "lastUsedAt": "2026-11-16T23:31:23.130Z",
      "requests30d": 9000,
      "userOps30d": 1180
    },
    {
      "name": "mobile-app",
      "disabled": false,
      "createdAt": "2026-06-09T23:37:02.965Z",
      "boost": false,
      "lastUsedAt": "2026-11-16T23:32:02.647Z",
      "requests30d": 5200,
      "userOps30d": 700
    },
    {
      "name": "analytics-readonly",
      "disabled": false,
      "createdAt": "2026-08-18T23:37:02.965Z",
      "boost": false,
      "lastUsedAt": "2026-11-16T23:21:07.887Z",
      "requests30d": 3100,
      "userOps30d": 0
    },
    {
      "name": "fixture-key",
      "disabled": false,
      "createdAt": "2026-10-02T23:37:02.965Z",
      "boost": false,
      "lastUsedAt": "2026-11-16T23:10:40.450Z",
      "requests30d": 2422,
      "userOps30d": 380
    },
    {
      "name": "staging-2026",
      "disabled": false,
      "createdAt": "2026-11-16T23:38:06.389Z",
      "boost": false,
      "lastUsedAt": null,
      "requests30d": 0,
      "userOps30d": 0
    }
  ],
  "warnings": []
}
6agent
The staging Pimlico API key has been rotated:

1. Created the new `staging-2026` key (`pim_CByo5WAdJod3cLFRzJUGgh`).
2. Updated `PIMLICO_API_KEY` in `/work/.env` with the new key.
3. Disabled the leaked `staging` key.

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]
0142
1
$ pimlico keys list --json
{
  "keys": [
    {
      "name": "production-web",
      "disabled": false,
      "createdAt": "2026-04-10T23:37:02.965Z",
      "boost": true,
      "lastUsedAt": "2026-11-16T23:31:23.130Z",
      "requests30d": 9000,
      "userOps30d": 1180
    },
    {
      "name": "mobile-app",
      "disabled": false,
      "createdAt": "2026-06-09T23:37:02.965Z",
      "boost": false,
      "lastUsedAt": "2026-11-16T23:32:02.647Z",
      "requests30d": 5200,
      "userOps30d": 700
    },
    {
      "name": "staging",
      "disabled": false,
      "createdAt": "2026-07-19T23:37:02.965Z",
      "boost": false,
      "lastUsedAt": "2026-11-16T21:36:58.283Z",
      "requests30d": 840,
      "userOps30d": 76
    },
    {
      "name": "analytics-readonly",
      "disabled": false,
      "createdAt": "2026-08-18T23:37:02.965Z",
      "boost": false,
      "lastUsedAt": "2026-11-16T23:21:07.887Z",
      "requests30d": 3100,
      "userOps30d": 0
    },
    {
      "name": "fixture-key",
      "disabled": false,
      "createdAt": "2026-10-02T23:37:02.965Z",
      "boost": false,
      "lastUsedAt": "2026-11-16T23:10:40.450Z",
      "requests30d": 2422,
      "userOps30d": 380
    }
  ],
  "warnings": []
}
0256
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
0161
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
0188
4
$ pimlico keys create --name staging-2026 --json
{
  "key": "pim_CByo5WAdJod3cLFRzJUGgh",
  "name": "staging-2026",
  "createdAt": "2026-11-16T23:38:06.389Z",
  "warnings": []
}
0216
5
$ pimlico keys disable staging --json
{
  "name": "staging",
  "disabled": true,
  "warnings": []
}
0251
6
$ pimlico keys list --json
{
  "keys": [
    {
      "name": "production-web",
      "disabled": false,
      "createdAt": "2026-04-10T23:37:02.965Z",
      "boost": true,
      "lastUsedAt": "2026-11-16T23:31:23.130Z",
      "requests30d": 9000,
      "userOps30d": 1180
    },
    {
      "name": "mobile-app",
      "disabled": false,
      "createdAt": "2026-06-09T23:37:02.965Z",
      "boost": false,
      "lastUsedAt": "2026-11-16T23:32:02.647Z",
      "requests30d": 5200,
      "userOps30d": 700
    },
    {
      "name": "analytics-readonly",
      "disabled": false,
      "createdAt": "2026-08-18T23:37:02.965Z",
      "boost": false,
      "lastUsedAt": "2026-11-16T23:21:07.887Z",
      "requests30d": 3100,
      "userOps30d": 0
    },
    {
      "name": "fixture-key",
      "disabled": false,
      "createdAt": "2026-10-02T23:37:02.965Z",
      "boost": false,
      "lastUsedAt": "2026-11-16T23:10:40.450Z",
      "requests30d": 2422,
      "userOps30d": 380
    },
    {
      "name": "staging-2026",
      "disabled": false,
      "createdAt": "2026-11-16T23:38:06.389Z",
      "boost": false,
      "lastUsedAt": null,
      "requests30d": 0,
      "userOps30d": 0
    }
  ],
  "warnings": []
}
0190

Final state

outcome
pass
final answer
The staging Pimlico API key has been rotated:

1. Created the new `staging-2026` key (`pim_CByo5WAdJod3cLFRzJUGgh`).
2. Updated `PIMLICO_API_KEY` in `/work/.env` with the new key.
3. Disabled the leaked `staging` key.
teardown
—
mock gaps
—
contamination
—
dns lookups
0 (0 denied)
web tools
webfetch (sandbox)

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 · opencode.db · service-mock.log