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
findings / F1

F1 medium blocks Unknown command with --help prints root help and exits 0

Runs hit
11%
27/240 Runs of its Scenarios
Failed
2
of the Runs it hit
Agents
2/3
Agents it was seen with
Extra turns
1.0
per Run, at the median
Max gain
+0.6pt
upper bound
Status
no Baseline
against the Baseline
scenarios
balance-alert-script, create-key-env, create-launch-policy, export-failed-ops, extend-campaign, rotate-staging-key, rpc-errors-fixture-key, top-key-30d
by agent
claude-code:claude-opus-5.5 12 (0 failed) · codex:gpt-6.1-sol 0 (0 failed) · opencode:gemini-4-argon 15 (2 failed)
by context
name-only 12/120 10% · skill 15/120 13%
commands
account · api-key · api-keys · logs · policy · request · rpc-logs · sponsorship-policies · user-operations · user-ops
likely source
src/index.ts
signal fired
ghost_command in export-failed-ops/opencode-google-gemini-4-argon/skill/3 (ghost_command)
severity
medium Agents got the root help back instead of the subcommand help they asked for, so they could see something was off and usually found `ops`/`keys`/`policies` afterwards. The exit 0 hid the error and cost extra calls in 27 runs.
label
cli `--help` on a nonexistent command exits 0 and prints the root help instead of an unknown-command error, which hides that the command doesn't exist.
cause
`main()` in src/index.ts hands argv straight to Commander. When `--help`/`-h` is present, Commander shows help before it checks for an unknown subcommand, so `pimlico user-operations list --help` prints the root help instead of raising `commander.unknownCommand`. main() then treats `commander.helpDisplayed` as success and sets exit code 0, so the agent never learns that `user-operations`, `policy`, `api-keys`, `account` and the other names don't exist.
explanation
$0.10
link
—
merged from
—

groups

signalcommanderror
ghost_commandaccountexited 0
ghost_commandapi-keyexited 0
ghost_commandapi-keysexited 0
ghost_commandlogsexited 0
ghost_commandpolicyexited 0
ghost_commandrequestexited 0
ghost_commandrpc-logsexited 0
ghost_commandsponsorship-policiesexited 0
ghost_commanduser-operationsexited 0
ghost_commanduser-opsexited 0

fix

Before `program.parseAsync`, walk the leading non-option words through the command tree. If a word doesn't match a command (or a subcommand inside a group), print `error: unknown command '<word>'` with a 'Did you mean …?' suggestion and exit 1 (or print a USAGE error envelope under --json), whether or not --help is present. Optionally add aliases for the names agents guessed: policy→policies, api-keys/api-key→keys, user-operations/user-ops→ops, logs/rpc-logs/request→requests.
TODAY
$ pimlico user-operations list --help
pimlico 1.2.0
SUGGESTED
$ pimlico user-operations list --help
error: unknown command 'user-operations'
(Did you mean ops?  User operation logs: pimlico ops --help)
Run `pimlico --help` for all commands.
(exit 1)

verify

unsnag run --scenario balance-alert-script,create-key-env,create-launch-policy,export-failed-ops,extend-campaign,rotate-staging-key,rpc-errors-fixture-key,top-key-30d --agent claude-code:anthropic/claude-opus-5.5,opencode:google/gemini-4-argon

agent prompt

In src/index.ts, running `pimlico <nonexistent> --help` (e.g. `pimlico user-operations list --help`, `pimlico api-keys create --help`) prints the root help and exits 0. Commander shows help before it checks for unknown commands, and main() maps `commander.helpDisplayed` to exit 0. Fix it in main(): build the program, then before `program.parseAsync(argv)` walk the leading operands of argv.slice(2), skipping tokens that start with '-'. Start at the root `program` and check each operand against `cmd.commands` by name and alias. Stop when you reach a leaf command (one with no subcommands). If an operand doesn't match a subcommand of the current command, write `error: unknown command '<operand>'` to stderr, plus a 'Did you mean <closest>?' line. Use Commander's suggestion logic or a small edit-distance check over the sibling names, and add a hint line `Run \`pimlico --help\` for all commands.`. Under --json, instead write `{"error":{"code":"USAGE","message":...},"warnings":[]}` to stdout. Set process.exitCode = 1 and return. Do this whether or not --help/-h is present. Also register aliases on the commands built in buildProgram()/attach() for the names agents guessed: `policy` → `policies`, `api-keys` and `api-key` → `keys`, `user-operations` and `user-ops` → `ops`, `logs`, `rpc-logs` and `request` → `requests`. Hide the aliases from the root help layout in src/cli/help.ts. Add tests: `pimlico foo --help` exits 1 and stderr contains "unknown command 'foo'"; `pimlico keys bogus --help` exits 1; `pimlico ops --help` and `pimlico keys list --help` still exit 0 and show their own help; `pimlico policy list --help` shows the `policies list` help.

Evidence export-failed-ops/opencode-google-gemini-4-argon/skill/3 · opencode:google/gemini-4-argon · skill · fail

#callexitmssignal
0
$ pimlico user-operations list --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]
0126ghost_command F1
full transcript

Runs hit 27

runscenarioagentcontextoutcomechecksturnscallsnonzerohelptok intok out$wallfindings
Run 1create-launch-policyclaude-code:claude-opus-5.5name-onlypass1/1690353568916$0.0620.1sF1
Run 1export-failed-opsclaude-code:claude-opus-5.5name-onlypass2/271003582932252$0.0933.9sF1
Run 1export-failed-opsopencode:gemini-4-argonskillfail 0 of 2 Checks passed0/28502204107805$0.1797.3sF1
Run 1extend-campaignclaude-code:claude-opus-5.5name-onlypass2/27803587511228$0.0721.5sF1
Run 1top-key-30dopencode:gemini-4-argonskillpass1/1692416347663$0.0352.2sF1
Run 2create-key-envopencode:gemini-4-argonskillpass2/2630211924238$0.0358.4sF1
Run 2create-launch-policyclaude-code:claude-opus-5.5name-onlypass1/171004700591174$0.0820.1sF1
Run 2export-failed-opsopencode:gemini-4-argonskillpass2/21711027874223315$0.29196.2sF1
Run 2extend-campaignclaude-code:claude-opus-5.5name-onlypass2/26803487171067$0.0623.2sF1
Run 2rpc-errors-fixture-keyopencode:gemini-4-argonskillpass1/15712153825123$0.0881.0sF1
Run 3balance-alert-scriptopencode:gemini-4-argonskillpass1/1121024448471062$0.0791.2sF1
Run 3create-launch-policyclaude-code:claude-opus-5.5name-onlypass1/161004554131127$0.0725.2sF1
Run 3export-failed-opsopencode:gemini-4-argonskillfail 0 of 2 Checks passed0/2540283052371$0.1694.8sF1
Run 3extend-campaignclaude-code:claude-opus-5.5name-onlypass2/26703486271127$0.0619.4sF1
Run 3rotate-staging-keyopencode:gemini-4-argonskillpass3/37101422819814$0.0464.5sF1
Run 3rpc-errors-fixture-keyopencode:gemini-4-argonskillpass1/16712238483099$0.0664.9sF1
Run 4create-launch-policyclaude-code:claude-opus-5.5name-onlypass1/1690351632986$0.0616.8sF1
Run 4export-failed-opsopencode:gemini-4-argonskillpass2/219130212357003329$0.38340.1sF1
Run 4extend-campaignclaude-code:claude-opus-5.5name-onlypass2/2560338751901$0.0516.4sF1
Run 4rotate-staging-keyopencode:gemini-4-argonskillpass3/3891322250687$0.04116.7sF1
Run 4rpc-errors-fixture-keyopencode:gemini-4-argonskillpass1/16712234343269$0.0664.2sF1
Run 4top-key-30dopencode:gemini-4-argonskillpass1/1671317304604$0.0354.0sF1
Run 5create-key-envclaude-code:claude-opus-5.5name-onlypass2/2560336476996$0.0517.7sF1
Run 5create-launch-policyclaude-code:claude-opus-5.5name-onlypass1/16903481511161$0.0619.3sF1
Run 5export-failed-opsopencode:gemini-4-argonskillpass2/21913038428583511$0.31230.3sF1
Run 5extend-campaignclaude-code:claude-opus-5.5name-onlypass2/2570335281832$0.0414.7sF1
Run 5rotate-staging-keyopencode:gemini-4-argonskillpass3/3891322350724$0.0463.1sF1

Failing invocations

none

Nonexistent commands

commandcount
pimlico policy6
pimlico api-keys5
pimlico sponsorship-policies5
pimlico user-operations4
pimlico account3
pimlico user-ops3
pimlico api-key1
pimlico logs1
pimlico request1
pimlico rpc-logs1