abhigyanpatwari/GitNexus · error · Error
analyze --watch does not support ${unsupported.map(([name])
Error message
analyze --watch does not support ${unsupported.map(([name]) => name).join(', ')} What it means
resolveWatchOptions() rejects flag/config combinations that `analyze --watch` cannot honor — currently the embedding-related options (embeddingBaseUrl, embeddingModel, --embedding-auth-token, --embedding-dims). If any of them is set (not undefined/false), the command fails fast listing the offending option names, because watch mode does not (re)build embeddings.
Source
Thrown at gitnexus/src/cli/analyze-watch.ts:136
['--skip-git', cli.skipGit],
['--spring-actuator', cli.springActuator],
// Rejected under --watch for the same reason as --spring-actuator: the
// watcher reacts to source changes, and nothing watches an out-of-band
// document directory. Honouring the flag here would read the documents once
// and then quietly serve a stale answer for the rest of the session.
['--asyncapi-spec', cli.asyncapiSpec],
['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 0d1aed942f)
Solutions
- Remove the embedding flags from the watch invocation.
- Run a one-shot `gitnexus analyze` (without --watch) when embeddings need to be generated.
- Clear the embedding keys from your gitnexus config file or scope them to the non-watch command.
- If embeddings should be supported in watch mode, file a feature request.
Example fix
// before gitnexus analyze --watch --embedding-base-url https://api.example.com // after gitnexus analyze --embedding-base-url https://api.example.com gitnexus analyze --watch
Defensive patterns
Strategy: validation
Validate before calling
const embeddingFlags = ['embeddingBaseUrl','embeddingModel','embeddingAuthToken','embeddingDims'];
if (useWatchMode && embeddingFlags.some(f => cli[f] !== undefined && cli[f] !== false))
throw new Error('embedding options are not supported with --watch'); Prevention
- Keep embedding flags out of watch-mode invocations
- Split scripts: one-shot analyze for embeddings, watch for incremental indexing
- Audit global config files for embedding keys that leak into watch runs
When it happens
Trigger: Running `gitnexus analyze --watch` while passing --embedding-base-url / --embedding-model / --embedding-auth-token / --embedding-dims on the CLI, or with those keys set in config so they survive the filter as defined values.
Common situations: Reusing an analyze invocation script that includes embedding flags, a CI config that sets embedding options globally and then runs watch mode, or forgetting that watch mode skips embedding work.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- analyze --watch does not support ${unsupported.map(([name])
- ${flag} must be a positive integer
- ${flag} must not exceed ${maximum}
- Watch refresh is already running
- Ignore controls remain invalid; fix them before indexing mor
AI-assisted analysis of abhigyanpatwari/GitNexus@0d1aed942f (2026-09-08).
Data as JSON: /api/errors/d0920016d4606215.
Report an issue: GitHub.