jackwener/OpenCLI · warning · EmptyResultError

No keys match "${flt}".

Error message

No keys match "${flt}".

What it means

An EmptyResultError raised by the state-keys command when, after listing keys in the resolved state.vscdb and applying the case-insensitive --filter substring match, zero keys remain. It is not a failure of the DB read; the DB simply has no keys matching the filter.

Source

Thrown at clis/trae-solo/state-fs.js:68

    name: 'state-keys',
    access: 'read',
    description: 'List all keys present in Trae SOLO\'s globalStorage state.vscdb (VSCode-style UI/agent state). Pass --workspace <ws-id> to query a per-workspace DB instead. Use state-get to read a specific value. (See renderer storage-keys for browser-side LS/SS.)',
    domain: 'localhost',
    browser: false,
    strategy: Strategy.LOCAL,
    args: [
        { name: 'filter', required: false, help: 'Case-insensitive substring filter over keys' },
        { name: 'workspace', required: false, help: 'Workspace id (from workspaces-list) to query a per-workspace DB' },
        { name: 'limit', type: 'int', required: false, default: 200 },
    ],
    columns: ['Index', 'Key', 'Kind', 'Path'],
    func: async (args) => {
        const db = resolveStateDb(args);
        const keys = listKeys(db);
        const flt = args.filter ? String(args.filter).toLowerCase() : null;
        const filtered = flt ? keys.filter((k) => k.toLowerCase().includes(flt)) : keys;
        if (!filtered.length) {
            throw new EmptyResultError('trae-solo storage-keys', flt ? `No keys match "${flt}".` : 'No keys.');
        }
        const limit = Number.isInteger(args.limit) && args.limit > 0 ? args.limit : 200;
        return filtered.slice(0, limit).map((k, i) => ({
            Index: i + 1,
            Key: k,
            Kind: '',
            Path: '',
        }));
    },
});

// -------- state-get --------
cli({
    site: 'trae-solo',
    name: 'state-get',
    access: 'read',
    description: 'Read a single key from Trae SOLO\'s globalStorage state.vscdb. Pass --workspace <ws-id> to query a per-workspace DB instead. Returns parsed JSON if the value is JSON.',
    domain: 'localhost',

View on GitHub (pinned to 49907e53dc)

Solutions

  1. Re-run with no --filter to see all keys, then adjust the filter.
  2. Shorten the filter to a broader substring (e.g. 'workbench' instead of a full key).
  3. Confirm you are querying the intended DB: add/remove --workspace.
  4. If expecting a known key, verify it exists in this Trae version.

Example fix

// before
opencli trae-solo state-keys --filter history.recentlyOpenedPathsList
// after
opencli trae-solo state-keys --filter history   # broader substring
Defensive patterns

Strategy: fallback

Validate before calling

const keys = listKeys(db);
const hit = flt ? keys.filter(k => k.toLowerCase().includes(flt)) : keys;
if (!hit.length) console.warn(`filter "${flt}" matches none of ${keys.length} keys`);

Try / catch

try {
  return await listKeys({ filter: flt });
} catch (e) {
  if (/No keys match/.test(e.message)) return listKeys({}); // fall back to unfiltered listing
  throw e;
}

Prevention

When it happens

Trigger: Running state-keys with a --filter string that matches no key in the resolved DB (global or per-workspace), or querying a workspace DB that is empty.

Common situations: Filter casing/wording differs from the stored key (e.g. 'history' vs 'history.recentlyOpenedPathsList'); querying a per-workspace DB whose keys differ from the global DB; key names changed between Trae versions.

Related errors


AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29). Data as JSON: /api/errors/05e790a40173fcdc. Report an issue: GitHub.