jackwener/OpenCLI · warning · EmptyResultError

No tasks on disk.

Error message

No tasks on disk.

What it means

An EmptyResultError from task-fs-list when the scan of Trae's task snapshot/config directories produced zero rows. It means no task directories exist on disk under the Trae session storage the command inspects.

Source

Thrown at clis/trae-solo/task-fs.js:74

                .filter((n) => n.endsWith('.json') && !n.endsWith('-hooks.json') && !n.startsWith('boot') && !n.startsWith('ide_'))
                .map((n) => n.replace(/\.json$/, '')))
            : new Set();
        const all = [...new Set([...snapshotIds, ...configIds])];
        const rows = all
            .map((id) => {
                const snapPath = path.join(TRAE_SNAPSHOT_DIR, id);
                const configPath = path.join(TRAE_AGENTCONFIG_DIR, id + '.json');
                const hasSnap = fs.existsSync(snapPath);
                const hasCfg = fs.existsSync(configPath);
                let mtime = 0;
                if (hasSnap) mtime = Math.max(mtime, fs.statSync(snapPath).mtimeMs);
                if (hasCfg) mtime = Math.max(mtime, fs.statSync(configPath).mtimeMs);
                return { id, hasSnap, hasCfg, mtime };
            })
            .sort((a, b) => b.mtime - a.mtime);
        const limit = Number.isInteger(args.limit) && args.limit > 0 ? args.limit : 100;
        if (!rows.length) {
            throw new EmptyResultError('trae-solo task-fs-list', 'No tasks on disk.');
        }
        return rows.slice(0, limit).map((r, i) => ({
            Index: i + 1,
            'Task Id': r.id,
            'Has Snapshot': r.hasSnap ? 'yes' : 'no',
            'Has Config': r.hasCfg ? 'yes' : 'no',
            Modified: new Date(r.mtime).toISOString().replace('T', ' ').slice(0, 19),
            Phase: '',
            'Turn Id': '',
            Commit: '',
        }));
    },
});

// -------- task-fs-turns --------
cli({
    site: 'trae-solo',
    name: 'task-fs-turns',

View on GitHub (pinned to 49907e53dc)

Solutions

  1. Create at least one task/conversation in Trae so snapshot/config folders appear, then retry.
  2. Verify the tasks root path the CLI scans (ls it) and fix the configured TRAE data directory if empty.
  3. Remove any filter that might be excluding all rows (e.g. restrictive --limit handling or directory checks).

Example fix

// before
opencli trae-solo task-fs-list   # empty snapshot dir
// after
ls ~/.trae/snapshot ~/.trae   # confirm data dir; create a task in Trae, then:
opencli trae-solo task-fs-list
Defensive patterns

Strategy: validation

Validate before calling

const fs = require('fs');
if (!fs.existsSync(TASKS_ROOT)) throw new Error(`tasks dir missing: ${TASKS_ROOT} — no tasks created yet`);

Try / catch

try {
  return await taskFsList(args);
} catch (e) {
  if (/No tasks on disk/.test(e.message)) return []; // or surface a friendly hint
  throw e;
}

Prevention

When it happens

Trigger: Running task-fs-list in an environment where Trae never created any tasks, the task storage root points to a wrong/empty path, or all candidate folders were filtered out (no snapshot and no config).

Common situations: Fresh Trae install with no chat/solo tasks; TRAE data dir env var misconfigured to an empty location; tasks cleaned by disk cleanup or after Trae cache reset.

Related errors


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