abhigyanpatwari/GitNexus · error

analyze --watch does not support ${unsupported.map(([name])

Error message

analyze --watch does not support ${unsupported.map(([name]) => name).join(', ')}

What it means

Thrown by resolveWatchOptions in watch.ts when embedding-related CLI flags are supplied together with `analyze --watch`. Watch mode does not support embedding configuration (embeddingBaseUrl, embeddingModel, --embedding-auth-token, --embedding-dims), and instead of silently ignoring them the CLI fails fast, listing the unsupported flags.

Source

Thrown at gitnexus/src/cli/watch.ts:129

    ['--skip-agents-md', cli.skipAgentsMd],
    ['--skip-skills', cli.skipSkills],
    ['--no-stats', cli.stats === false],
    ['--self-commit', cli.selfCommit],
    ['--index-only', cli.indexOnly],
    ['--skip-git', cli.skipGit],
    ['--spring-actuator', cli.springActuator],
    ['walCheckpointThreshold', cli.walCheckpointThreshold],
    ['embeddingThreads', cli.embeddingThreads],
    ['embeddingBatchSize', cli.embeddingBatchSize],
    ['embeddingSubBatchSize', cli.embeddingSubBatchSize],
    ['embeddingDevice', cli.embeddingDevice],
    ['embeddingBaseUrl', cli.embeddingBaseUrl],
    ['embeddingModel', cli.embeddingModel],
    ['--embedding-auth-token', cli.embeddingAuthToken],
    ['--embedding-dims', cli.embeddingDims],
  ].filter(([, value]) => value !== undefined && value !== false);
  if (unsupported.length > 0) {
    throw new Error(
      `analyze --watch does not support ${unsupported.map(([name]) => name).join(', ')}`,
    );
  }
  reportIgnoredConfig(
    [
      ['embeddings', config.embeddings],
      ['dropEmbeddings', config.dropEmbeddings],
      ['defaultBranch', config.defaultBranch],
      ['skipAgentsMd', config.skipAgentsMd !== undefined],
      ['skipSkills', config.skipSkills !== undefined],
      ['stats', config.stats !== undefined],
      ['springActuator', config.springActuator],
      ['walCheckpointThreshold', config.walCheckpointThreshold],
      ['embeddingThreads', config.embeddingThreads],
      ['embeddingBatchSize', config.embeddingBatchSize],
      ['embeddingSubBatchSize', config.embeddingSubBatchSize],
      ['embeddingDevice', config.embeddingDevice],
      ['embeddingBaseUrl', config.embeddingBaseUrl],

View on GitHub (pinned to 52924ef12c)

Solutions

  1. Remove the embedding flags from the --watch invocation; embeddings are configured for non-watch analyze runs only.
  2. Split the command: run embedding-enabled `analyze` once, then run `analyze --watch` without embedding flags for incremental updates.
  3. If the flags come from a shared script, gate them on a non-watch mode variable or move them into a config file read only by full analyze.
  4. Check reportIgnoredConfig output — if a flag is only informational for watch, drop it rather than passing it.

Example fix

// before
gitnexus analyze --watch --embedding-base-url http://localhost:8080 --embedding-dims 768

// after
gitnexus analyze --embedding-base-url http://localhost:8080 --embedding-dims 768
gitnexus analyze --watch
Defensive patterns

Strategy: validation

Validate before calling

const watchUnsupported = ['--embedding-base-url', '--embedding-model', '--embedding-auth-token', '--embedding-dims'];
const offending = watchUnsupported.filter(f => process.argv.includes(f));
if (process.argv.includes('--watch') && offending.length) {
  throw new Error(`analyze --watch does not support ${offending.join(', ')}`);
}

Try / catch

try {
  await runWatchCommand(argv);
} catch (e) {
  if (e.message.startsWith('analyze --watch does not support')) {
    console.error(`${e.message}\nRun embedding flags in a non-watch analyze pass instead.`);
    process.exitCode = 2;
  } else throw e;
}

Prevention

When it happens

Trigger: Running `gitnexus analyze --watch --embedding-base-url https://...` (or --embedding-model, --embedding-auth-token, --embedding-dims) with any of those flags set to a value other than undefined/false.

Common situations: Reusing an analyze script/command that includes embedding flags and adding --watch; CI configs where watch mode was appended to an existing embedding-enabled analyze invocation; following docs for full analyze and applying it to watch.

Related errors


AI-assisted analysis of abhigyanpatwari/GitNexus@52924ef12c (2026-09-01). Data as JSON: /api/errors/de5a6d67322ef0a5. Report an issue: GitHub.