eyaltoledano/claude-task-master · warning

⚠️ DEPRECATION WARNING: Found configuration in legacy locat

Error message

⚠️  DEPRECATION WARNING: Found configuration in legacy location '${configPath}'. Please migrate to .taskmaster/config.json. Run 'task-master migrate' to automatically migrate your project.

What it means

When loading configuration, task-master detects a config.json in the legacy location (e.g. .taskmaster/config.json predecessor location) and warns that it must be migrated to .taskmaster/config.json. The legacy config still works, but support will be dropped.

Source

Thrown at scripts/modules/config-manager.js:170

						...defaults.models.research,
						...parsedConfig?.models?.research
					},
					fallback:
						parsedConfig?.models?.fallback?.provider &&
						parsedConfig?.models?.fallback?.modelId
							? { ...defaults.models.fallback, ...parsedConfig.models.fallback }
							: { ...defaults.models.fallback }
				},
				global: { ...defaults.global, ...parsedConfig?.global },
				claudeCode: { ...defaults.claudeCode, ...parsedConfig?.claudeCode },
				codexCli: { ...defaults.codexCli, ...parsedConfig?.codexCli },
				grokCli: { ...defaults.grokCli, ...parsedConfig?.grokCli }
			};
			configSource = `file (${configPath})`; // Update source info

			// Issue deprecation warning if using legacy config file
			if (isLegacy) {
				console.warn(
					chalk.yellow(
						`⚠️  DEPRECATION WARNING: Found configuration in legacy location '${configPath}'. Please migrate to .taskmaster/config.json. Run 'task-master migrate' to automatically migrate your project.`
					)
				);
			}

			// --- Validation (Warn if file content is invalid) ---
			// Use log.warn for consistency
			if (!validateProvider(config.models.main.provider)) {
				console.warn(
					chalk.yellow(
						`Warning: Invalid main provider "${config.models.main.provider}" in ${configPath}. Falling back to default.`
					)
				);
				config.models.main = { ...defaults.models.main };
			}
			if (!validateProvider(config.models.research.provider)) {
				console.warn(

View on GitHub (pinned to c0c98d367c)

Solutions

  1. Run `task-master migrate` to move the config automatically
  2. Alternatively move the file manually to .taskmaster/config.json and merge any existing content
  3. Commit the migrated config and remove the legacy file from the repo
  4. Ignore temporarily; the warning is non-fatal but the legacy path will stop working in a future release

Example fix

// before
.taskmaster/config.json (legacy path in use)
// after
$ task-master migrate   # moves config to .taskmaster/config.json
Defensive patterns

Strategy: validation

Validate before calling

import fs from 'fs';
const legacyPath = '.taskmaster/config.json'; // replace with actual legacy path check
const canonicalPath = '.taskmaster/config.json';
if (fs.existsSync(legacyPath) && legacyPath !== canonicalPath) {
  console.warn('Legacy config detected; run `task-master migrate`');
}

Type guard

const usesLegacyConfig = (paths) => paths.some(p => p !== '.taskmaster/config.json' && fs.existsSync(p));

Prevention

When it happens

Trigger: A project containing a config file at the old legacy path when `newConfig()`/`_loadAndValidateConfig` runs (any command that loads configuration).

Common situations: Projects created with older task-master versions and never migrated; copying an old project template; partial upgrades.

Related errors


AI-assisted analysis of eyaltoledano/claude-task-master@c0c98d367c (2026-08-29). Data as JSON: /api/errors/dde2c48223e57bff. Report an issue: GitHub.