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 / balance-alert-script/opencode-google-gemini-4-argon/skill/3 · ← prev next →

balance-alert-script/opencode-google-gemini-4-argon/skill/3 · pass

Outcome
pass
1/1 Checks passed
Turns
12
model turns
CLI calls
10
2 exited non-zero
Help lookups
4
reads of the CLI's help
Tokens in
44847
17593 of them cached
Tokens out
1062
written by the model
Cost
$0.07
of the model calls
Wall time
91.2s
from start to the Checks
scenario
balance-alert-script
agent
opencode:google/gemini-4-argon · 2.2.7
context
skill
repeat
3 · cell ✓✓✓✓✓
findings
F1
provider
Google AI Studio

checks

#checkresultdetailsignal
1
cd /work && test -f check-balance.sh
timeout 60 bash check-balance.sh > /dev/null 2>&1; high=$?
PIMLICO_DASHBOARD_URL="${PIMLICO_DASHBOARD_URL%:8080}:8081" timeout 60 bash check-balance.sh > /dev/null 2>&1; low=$?
echo "exit $high with ~\$1,290 remaining, $low with ~\$50"
test "$high" -eq 0 && test "$low" -ne 0
passexited 0
exit 0 with ~$1,290 remaining, 2 with ~$50

reproduce

unsnag run --scenario balance-alert-script --agent opencode:google/gemini-4-argon --context skill --runs 1

Transcript highlighted = a Signal fired

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

Write a script, check-balance.sh, for our CI that exits non-zero when our remaining Pimlico balance is under $100, and zero otherwise.
1agent
[skill] {"id":"pimlico"}
<skill_content name="pimlico">
# Skill: 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 cha
[… 1296 more characters]
$ ls -la /work
total 16
drwxr-xr-x 1 agent agent 4096 Nov 16 23:22 .
drwxr-xr-x 1 root  root  4096 Nov 16 23:22 ..
drwxrwxrwx 3 agent agent 4096 Nov 16 23:22 .agents
drwxrwxrwx 8 agent agent 4096 Nov 16 23:22 .git
2agent
$ pimlico --help && pimlico account balance --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           
[… 3808 more characters]
$ pimlico account balance --json
{
  "error": {
    "code": "USAGE",
    "message": "error: unknown command 'account'"
  },
  "warnings": []
}

Exit code: 1
err
3agent
$ pimlico balance --help && pimlico balance && pimlico balance --json
Usage: pimlico balance [options]

Account balance broken down into credits, open invoices and unbilled usage, and
remaining headroom

Options:
  --below <usd>      Exit 2 when the remaining balance is under this
  --watch [seconds]  Refresh every N seconds (min 10, default 30)
  -h, --help         display help for command
Credits                   $1,284.37
Open invoices (0)         $0.00
Balance                   $1,284.37
This month so far (est.)  -$242.22
Overdraft limit           $250.00
Remaining                 $1,292.15
Runway (est.)             ~85 days at $15.16/day this month
As of                     2026-11-16 23:22:22
{
  "balanceUsd": "1284.37",
  "creditsUsd": "1284.37",
  "openInvoicesUsd": "0.00",
  "openInvoices": [],
  "pendingUsd": "242.22",
  "overdraftLimitUsd": "250.00",
  "remainingUsd": "1292.15",
  "dailySpendUsd": "15.16",
  "runwayDays": 85,
  "currency": "USD",
  "asOf": "2026-11-16T23:22:22.416Z",
  "threshold": null,
  "belowThreshold": false,
  "warnings": []
}
4agent
$ pimlico balance --help
Usage: pimlico balance [options]

Account balance broken down into credits, open invoices and unbilled usage, and
remaining headroom

Options:
  --below <usd>      Exit 2 when the remaining balance is under this
  --watch [seconds]  Refresh every N seconds (min 10, default 30)
  -h, --help         display help for command
5agent
$ cat /work/.agents/skills/pimlico/SKILL.md
---
name: pimlico
description: Use the `pimlico` CLI to inspect and manage a Pimlico account (ERC-4337 bundler and paymaster) — balance, invoices, usage, API keys, sponsorship policies, and the logs of user operations and RPC requests. Use whenever a task mentions Pimlico, its API keys or policies, or debugging user operations sent through 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\|d
[… 1373 more characters]
6agent
**Investigating a Tool Response**

I'm puzzled by the tool's output. The initial error response is making me rethink how the tool functions. I'm now checking the directory structure and the file's head, which should give insight into the unexpected behavior. The goal is to figure out why the tool's response looked the way it did.
$ ls -la /work/.agents/skills/pimlico && sed 's/^/ /' /work/.agents/skills/pimlico/SKILL.md
total 12
drwxrwxr-x 2 agent agent 4096 Nov 13 00:31 .
drwxrwxrwx 3 agent agent 4096 Nov 16 23:22 ..
-rw-rw-r-- 1 agent agent 3381 Nov 13 00:31 SKILL.md
  ---
  name: pimlico
  description: Use the `pimlico` CLI to inspect and manage a Pimlico account (ERC-4337 bundler and paymaster) — balance, invoices, usage, API keys, sponsorship policies, and the logs of user operations and RPC requests. Use whenever a task mentions Pimlico, its API keys or policies, or debugging user operations sent through 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>
[… 1637 more characters]
7agent
$ tr '{}' '[]' < /work/.agents/skills/pimlico/SKILL.md
---
name: pimlico
description: Use the `pimlico` CLI to inspect and manage a Pimlico account (ERC-4337 bundler and paymaster) — balance, invoices, usage, API keys, sponsorship policies, and the logs of user operations and RPC requests. Use whenever a task mentions Pimlico, its API keys or policies, or debugging user operations sent through 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\|d
[… 1373 more characters]
8agent
$ pimlico balance --below 100; echo "Exit code: $?"
Credits                   $1,284.37
Open invoices (0)         $0.00
Balance                   $1,284.37
This month so far (est.)  -$242.22
Overdraft limit           $250.00
Remaining                 $1,292.15
Runway (est.)             ~85 days at $15.16/day this month
As of                     2026-11-16 23:22:55
Exit code: 0
9agent
$ pimlico balance --below 5000; echo "Exit code: $?"
Credits                   $1,284.37
Open invoices (0)         $0.00
Balance                   $1,284.37
This month so far (est.)  -$242.22
Overdraft limit           $250.00
Remaining                 $1,292.15
Runway (est.)             ~85 days at $15.16/day this month
As of                     2026-11-16 23:23:01
Remaining $1,292.15 is below the $5,000.00 threshold
Exit code: 2
10agent
$ git status && git log -n 5
On branch main
nothing to commit, working tree clean
commit 1d431b34b65633d7affb647f119661bff531adf9
Author: dev <dev@localhost>
Date:   Mon Nov 16 23:22:02 2026 +0000

    Add project files

commit ad38538afa427e756cba6d391def2e39e55bc427
Author: dev <dev@localhost>
Date:   Mon Nov 16 23:22:02 2026 +0000

    Initial commit
11agent
$ cat << 'EOF' > /work/check-balance.sh #!/usr/bin/env bash set -euo pipefail exec pimlico balance --below 100 EOF chmod +x /work/check-balance.sh /work/check-balance.sh
Credits                   $1,284.37
Open invoices (0)         $0.00
Balance                   $1,284.37
This month so far (est.)  -$242.22
Overdraft limit           $250.00
Remaining                 $1,292.15
Runway (est.)             ~85 days at $15.16/day this month
As of                     2026-11-16 23:23:26
12agent
Created `/work/check-balance.sh` and made it executable:

```bash
#!/usr/bin/env bash
set -euo pipefail

exec pimlico balance --below 100
```

`pimlico balance --below 100` checks your remaining Pimlico balance and exits with status `0` when it is at or above $100, and non-zero (`2` when below threshold, or `1`/`3`/`75` on CLI/auth/API errors) otherwise.

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]
0187
1
$ pimlico account balance --json
{
  "error": {
    "code": "USAGE",
    "message": "error: unknown command 'account'"
  },
  "warnings": []
}
1131ghost_command dismissed
nonzero_then_lookup dismissed
2
$ pimlico account balance --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]
0132ghost_command F1
3
$ pimlico balance --help
Usage: pimlico balance [options]

Account balance broken down into credits, open invoices and unbilled usage, and
remaining headroom

Options:
  --below <usd>      Exit 2 when the remaining balance is under this
  --watch [seconds]  Refresh every N seconds (min 10, default 30)
  -h, --help         display help for command
0172
4
$ pimlico balance
Credits                   $1,284.37
Open invoices (0)         $0.00
Balance                   $1,284.37
This month so far (est.)  -$242.22
Overdraft limit           $250.00
Remaining                 $1,292.15
Runway (est.)             ~85 days at $15.16/day this month
As of                     2026-11-16 23:22:22
0221
5
$ pimlico balance --json
{
  "balanceUsd": "1284.37",
  "creditsUsd": "1284.37",
  "openInvoicesUsd": "0.00",
  "openInvoices": [],
  "pendingUsd": "242.22",
  "overdraftLimitUsd": "250.00",
  "remainingUsd": "1292.15",
  "dailySpendUsd": "15.16",
  "runwayDays": 85,
  "currency": "USD",
  "asOf": "2026-11-16T23:22:22.416Z",
  "threshold": null,
  "belowThreshold": false,
  "warnings": []
}
0191
6
$ pimlico balance --help
Usage: pimlico balance [options]

Account balance broken down into credits, open invoices and unbilled usage, and
remaining headroom

Options:
  --below <usd>      Exit 2 when the remaining balance is under this
  --watch [seconds]  Refresh every N seconds (min 10, default 30)
  -h, --help         display help for command
0167
7
$ pimlico balance --below 100
Credits                   $1,284.37
Open invoices (0)         $0.00
Balance                   $1,284.37
This month so far (est.)  -$242.22
Overdraft limit           $250.00
Remaining                 $1,292.15
Runway (est.)             ~85 days at $15.16/day this month
As of                     2026-11-16 23:22:55
0221
8
$ pimlico balance --below 5000
Credits                   $1,284.37
Open invoices (0)         $0.00
Balance                   $1,284.37
This month so far (est.)  -$242.22
Overdraft limit           $250.00
Remaining                 $1,292.15
Runway (est.)             ~85 days at $15.16/day this month
As of                     2026-11-16 23:23:01
Remaining $1,292.15 is below the $5,000.00 threshold
2208
9
$ pimlico balance --below 100
Credits                   $1,284.37
Open invoices (0)         $0.00
Balance                   $1,284.37
This month so far (est.)  -$242.22
Overdraft limit           $250.00
Remaining                 $1,292.15
Runway (est.)             ~85 days at $15.16/day this month
As of                     2026-11-16 23:23:26
0166

Final state

outcome
pass
final answer
Created `/work/check-balance.sh` and made it executable:

```bash
#!/usr/bin/env bash
set -euo pipefail

exec pimlico balance --below 100
```

`pimlico balance --below 100` checks your remaining Pimlico balance and exits with status `0` when it is at or above $100, and non-zero (`2` when below threshold, or `1`/`3`/`75` on CLI/auth/API errors) otherwise.
teardown
—
mock gaps
—
contamination
—
dns lookups
0 (0 denied)
web tools
webfetch (sandbox)

context inputs

kindsourceplaced atofferedused
skillskills/pimlico.agents/skills/pimlicotruetrue

prompt

You have the `pimlico` CLI available.

Write a script, check-balance.sh, for our CI that exits non-zero when our remaining Pimlico balance is under $100, and zero otherwise.

Artifacts

run.json · agent-stdout.jsonl · opencode.db · service-mock.log