#23·cli

keys list crashes if any keypair file is corrupted

Author: MayurK-cmdCreated Aug 26, 2026Updated Aug 26, 2026

The keys list command uses Promise.all() to load all keypairs in parallel. If any single keypair file is corrupted or unreadable, the entire Promise.all() rejects and the command fails, preventing users from seeing their valid keys.

Expected behavior:

  • Display all valid keys
  • Show an error or warning for any keys that failed to load
  • Command completes successfully

Current behavior:

  • Single corrupted key causes entire list command to fail
  • User sees no keys at all, with unhelpful error

Location: src/commands/KeysCommand.ts:129-139

Suggested fix:

Replace Promise.all() with Promise.allSettled() and filter results: const results = await Promise.allSettled( keypairFiles.map(async (file) => { /* ... */ }) );

const keypairData = results .filter((r) => r.status === "fulfilled") .map((r) => r.value);

// optionally warn about failures

Type: Bug - Robustness