why-op-failed/claude-code-anthropic-claude-opus-5.5/skill/4 · pass
Outcome
pass
1/1 Checks passed
Turns
3
model turns
CLI calls
1
0 exited non-zero
Help lookups
0
reads of the CLI's help
Tokens in
19181
15870 of them cached
Tokens out
1070
written by the model
Cost
$0.04
of the model calls
Wall time
19.1s
from start to the Checks
checks
| # | check | result | detail | signal |
|---|---|---|---|---|
| 1 | answer contains "ERC20InsufficientAllowance" | pass | the answer contains "ERC20InsufficientAllowance" · expected: ERC20InsufficientAllowance |
reproduce
unsnag run --scenario why-op-failed --agent claude-code:anthropic/claude-opus-5.5 --context skill --runs 1 Transcript highlighted = a Signal fired
| # | actor | content | exit | signal |
|---|---|---|---|---|
| 0 | user | You have the `pimlico` CLI available. A user says their user operation 0xcfb4fe7f158e5ab48a4d445992dfac3c0078ef95e86f70fd2410934f7ee27920 failed. Why did it fail? | ||
| 1 | agent | [Skill] {"skill":"pimlico"} Launching skill: pimlico | ||
| 2 | harness | 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] | ||
| 3 | agent | $ pimlico op 0xcfb4fe7f158e5ab48a4d445992dfac3c0078ef95e86f70fd2410934f7ee27920 --json {
"userOpHash": "0xcfb4fe7f158e5ab48a4d445992dfac3c0078ef95e86f70fd2410934f7ee27920",
"chainId": 84532,
"status": "execution_reverted_onchain",
"failed": true,
"transactionHash": "0x5c22ca85d355baa3d52b93490006137bc9905c5937fd3d616923f6935a279571",
"entryPoint": "0x0000000071727De22E5E9d8BAf0edAc6f37da032",
"revertReason": "ERC20InsufficientAllowance(0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108, 0, 25000000)",
"policyId": "sp_amused_arclight",
"costUsd": "0.022000",
"timeline": [
{
"type": "received",
"at": "2026-11-16T20:15:27.789Z",
"transactionHash": null,
"data": null
},
{
"type": "queued",
"at": "2026-11-16T20:15:28.104Z",
"transactionHash": null,
"data": null
},
{
"type": "added_to_mempool",
"at": "2026-11-16T20:15:28.224Z",
"transactionHash": null,
"data": null
},
{
"type": "submitted",
"at": "2026-11-16T20:15:29.619Z",
"transactionHash": "0x5c22ca85d355baa3d52b93490006137bc9905c5937fd3d616923f6935a279571",
"data": null
},
{
"type": "execution_reverted_onchain",
"at": "2026-11-16T20:15:34.765Z",
"transactionHash": "0x5c22ca85d355baa3d52b93490006137bc9905c5937fd3d616923f6935a279571",
"data": {
"reason": "ERC20InsufficientAllowance(0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108, 0, 25000000)"
}
}
],
"warnings": []
} | ||
| 4 | agent | The operation went onchain and its call reverted. The token contract rejected it with `ERC20InsufficientAllowance`. ``` ERC20InsufficientAllowance(spender = 0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108, allowance = 0, needed = 25000000) ``` **What happened:** - The operation was on Base Sepolia (chain 84532), using EntryPoint v0.7. It passed validation and was included in tx `0x5c22ca85…a279571` about 7 seconds after it arrived. - During execution, contract `0x4337084D…5Ff108` tried to move 25,000,000 base units of an ERC-20 token from the user's smart account. That's 25 tokens if the token has 6 decimals, like USDC. The account had given that spender an allowance of **0**, so `transferFrom` reverted. - Because only the call failed and validation succeeded, the gas was still spent. Your sponsorship policy `sp_amused_arclight` covered it, at a cost of **$0.022**. **Fix:** the smart account needs to approve `0x4337084D…5Ff108` for at least 25,000,000 units of that token before the call runs. The simplest way is to batch the two calls in one user operation: `token.approve(0x4337084D…, 25000000)` first, then the call that spends the tokens. Also check that the approval goes to this exact spender address. A common cause of this error is approving a different contract, such as a router instead of the contract that actually calls `transferFrom`. The Pimlico logs don't say which token or which target call this was. To find out, decode the operation's `callData` or look at tx `0x5c22ca85d355baa3d52b93490006137bc9905c5937fd3d616923f6935a279571` on Base Sepolia's block explorer. |
Target CLI calls
| # | call | exit | ms | signal |
|---|---|---|---|---|
| 0 | $ pimlico op 0xcfb4fe7f158e5ab48a4d445992dfac3c0078ef95e86f70fd2410934f7ee27920 --json {
"userOpHash": "0xcfb4fe7f158e5ab48a4d445992dfac3c0078ef95e86f70fd2410934f7ee27920",
"chainId": 84532,
"status": "execution_reverted_onchain",
"failed": true,
"transactionHash": "0x5c22ca85d355baa3d52b93490006137bc9905c5937fd3d616923f6935a279571",
"entryPoint": "0x0000000071727De22E5E9d8BAf0edAc6f37da032",
"revertReason": "ERC20InsufficientAllowance(0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108, 0, 25000000)",
"policyId": "sp_amused_arclight",
"costUsd": "0.022000",
"timeline": [
{
"type": "received",
"at": "2026-11-16T20:15:27.789Z",
"transactionHash": null,
"data": null
},
{
"type": "queued",
"at": "2026-11-16T20:15:28.104Z",
"transactionHash": null,
"data": null
},
{
"type": "added_to_mempool",
"at": "2026-11-16T20:15:28.224Z",
"transactionHash": null,
"data": null
},
{
"type": "submitted",
"at": "2026-11-16T20:15:29.619Z",
"transactionHash": "0x5c22ca85d355baa3d52b93490006137bc9905c5937fd3d616923f6935a279571",
"data": null
},
{
"type": "execution_reverted_onchain",
"at": "2026-11-16T20:15:34.765Z",
"transactionHash": "0x5c22ca85d355baa3d52b93490006137bc9905c5937fd3d616923f6935a279571",
"data": {
"reason": "ERC20InsufficientAllowance(0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108, 0, 25000000)"
}
}
],
"warnings": []
}
| 0 | 230 |
Final state
outcome
pass
final answer
The operation went onchain and its call reverted. The token contract rejected it with `ERC20InsufficientAllowance`. ``` ERC20InsufficientAllowance(spender = 0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108, allowance = 0, needed = 25000000) ``` **What happened:** - The operation was on Base Sepolia (chain 84532), using EntryPoint v0.7. It passed validation and was included in tx `0x5c22ca85…a279571` about 7 seconds after it arrived. - During execution, contract `0x4337084D…5Ff108` tried to move 25,000,000 base units of an ERC-20 token from the user's smart account. That's 25 tokens if the token has 6 decimals, like USDC. The account had given that spender an allowance of **0**, so `transferFrom` reverted. - Because only the call failed and validation succeeded, the gas was still spent. Your sponsorship policy `sp_amused_arclight` covered it, at a cost of **$0.022**. **Fix:** the smart account needs to approve `0x4337084D…5Ff108` for at least 25,000,000 units of that token before the call runs. The simplest way is to batch the two calls in one user operation: `token.approve(0x4337084D…, 25000000)` first, then the call that spends the tokens. Also check that the approval goes to this exact spender address. A common cause of this error is approving a different contract, such as a router instead of the contract that actually calls `transferFrom`. The Pimlico logs don't say which token or which target call this was. To find out, decode the operation's `callData` or look at tx `0x5c22ca85d355baa3d52b93490006137bc9905c5937fd3d616923f6935a279571` on Base Sepolia's block explorer.
teardown
—
mock gaps
—
contamination
—
dns lookups
0 (0 denied)
web tools
WebFetch (sandbox) · WebSearch (provider)
context inputs
| kind | source | placed at | offered | used |
|---|---|---|---|---|
| skill | skills/pimlico | .claude/skills/pimlico | true | true |
prompt
You have the `pimlico` CLI available. A user says their user operation 0xcfb4fe7f158e5ab48a4d445992dfac3c0078ef95e86f70fd2410934f7ee27920 failed. Why did it fail?