affaan-m/ECC · error

Seed path does not exist in repoRoot: ${seedPath}

Error message

Seed path does not exist in repoRoot: ${seedPath}

What it means

Thrown by overlaySeedPaths() when a normalized seed path (already validated to be inside repoRoot) does not exist on the source side. The function copies each seed path from repoRoot into the freshly-created worktree; a missing source means there is nothing to overlay, so it aborts before leaving the worktree half-seeded.

Source

Thrown at scripts/lib/tmux-worktree-orchestrator.js:94

      continue;
    }

    seen.add(normalizedPath);
    normalized.push(normalizedPath);
  }

  return normalized;
}

function overlaySeedPaths({ repoRoot, seedPaths, worktreePath }) {
  const normalizedSeedPaths = normalizeSeedPaths(seedPaths, repoRoot);

  for (const seedPath of normalizedSeedPaths) {
    const sourcePath = path.join(repoRoot, seedPath);
    const destinationPath = path.join(worktreePath, seedPath);

    if (!fs.existsSync(sourcePath)) {
      throw new Error(`Seed path does not exist in repoRoot: ${seedPath}`);
    }

    fs.mkdirSync(path.dirname(destinationPath), { recursive: true });
    fs.rmSync(destinationPath, { force: true, recursive: true });
    fs.cpSync(sourcePath, destinationPath, {
      dereference: false,
      force: true,
      preserveTimestamps: true,
      recursive: true
    });
  }
}

function buildWorkerArtifacts(workerPlan) {
  const seededPathsSection = workerPlan.seedPaths.length > 0
    ? [
        '',
        '## Seeded Local Overlays',

View on GitHub (pinned to 01e15490f0)

Solutions

  1. Create the missing file or directory at repoRoot/<seedPath> before invoking executePlan.
  2. If the file is optional, remove it from seedPaths or split into required vs optional lists and pre-check existence for the required set.
  3. Verify the path with fs.existsSync(path.join(repoRoot, seedPath)) before building the plan.
  4. On case-sensitive filesystems, confirm the casing matches exactly.

Example fix

// before
buildOrchestrationPlan({ repoRoot, seedPaths: ['.env.local'], workers });
// .env.local does not exist -> Seed path does not exist in repoRoot: .env.local

// after
const fs = require('fs');
const seedPaths = ['.env.local'].filter(p => fs.existsSync(path.join(repoRoot, p)));
buildOrchestrationPlan({ repoRoot, seedPaths, workers });
Defensive patterns

Strategy: validation

Validate before calling

const fs = require('fs');
const path = require('path');

function filterExistingSeedPaths(entries, repoRoot) {
  return (entries || []).filter(entry =>
    typeof entry === 'string' &&
    entry.trim().length > 0 &&
    fs.existsSync(path.join(repoRoot, entry))
  );
}

config.seedPaths = filterExistingSeedPaths(config.seedPaths, config.repoRoot);

Type guard

function seedPathExists(entry, repoRoot) {
  return typeof entry === 'string' &&
    entry.trim().length > 0 &&
    fs.existsSync(path.join(repoRoot, entry));
}

Try / catch

try {
  executePlan(plan);
} catch (error) {
  if (/Seed path does not exist in repoRoot/.test(error.message)) {
    plan.seedPaths = filterExistingSeedPaths(plan.seedPaths, plan.repoRoot);
    executePlan(plan);
    return;
  }
  throw error;
}

Prevention

When it happens

Trigger: config.seedPaths: ['.env.local'] when .env.local is gitignored and never created in this checkout; seedPaths referencing a directory the user deleted; pointing at a path that exists in a different branch than baseRef; case-sensitivity mismatch on Linux (the path was created as .Env.local).

Common situations: A new contributor runs the orchestrator before creating the local env file that the team's seedPaths expects; CI checkout excludes gitignored files; the path was valid on macOS (case-insensitive) but fails on Linux CI; seedPaths was updated but the file was never committed.

Related errors


AI-assisted analysis of affaan-m/ECC@01e15490f0 (2026-08-13). Data as JSON: /api/errors/fa0fd87459128c63. Report an issue: GitHub.