eyaltoledano/claude-task-master · error

CONFIG_MISSING

CONFIG_MISSING

Error message

The configuration file is missing. Run "task-master init" to create it.

What it means

setResponseLanguage() first checks that the project's configuration file exists (configExists). If not, it returns CONFIG_MISSING instead of attempting a read-modify-write on a non-existent file. The project was never initialized or the config file was deleted/renamed.

Source

Thrown at scripts/modules/task-manager/response-language.js:35

	// Use centralized config path finding instead of hardcoded path
	const configPath = findConfigPath(null, { projectRoot });
	const configExists = isConfigFilePresent(projectRoot);

	log(
		'debug',
		`Checking for config file using findConfigPath, found: ${configPath}`
	);
	log(
		'debug',
		`Checking config file using isConfigFilePresent(), exists: ${configExists}`
	);

	if (!configExists) {
		return {
			success: false,
			error: {
				code: 'CONFIG_MISSING',
				message:
					'The configuration file is missing. Run "task-master init" to create it.'
			}
		};
	}

	// Validate response language
	if (typeof lang !== 'string' || lang.trim() === '') {
		return {
			success: false,
			error: {
				code: 'INVALID_RESPONSE_LANGUAGE',
				message: `Invalid response language: ${lang}. Must be a non-empty string.`
			}
		};
	}

	try {

View on GitHub (pinned to c0c98d367c)

Solutions

  1. Run `task-master init` in the project root to create the config file, then retry setting the response language.
  2. cd into the correct project root (the directory containing .taskmaster/) before running the command.
  3. If the config lives elsewhere (monorepo), point projectRoot at the directory that actually holds the task-master config.
  4. Restore the deleted config from version control if .taskmaster/config.json was tracked and removed.

Example fix

// before
$ cd ~/repos/app && task-master response-language --set spanish // CONFIG_MISSING
// after
$ cd ~/repos/app && task-master init && task-master response-language --set spanish
Defensive patterns

Strategy: validation

Validate before calling

const fs = require('fs');
const path = require('path');
const cfgPath = path.join(projectRoot, '.taskmaster', 'config.json');
if (!fs.existsSync(cfgPath)) {
  throw new Error('Config file missing — run `task-master init` before setting response language');
}

Try / catch

const res = await setResponseLanguage(lang, projectRoot);
if (!res.success && res.error?.code === 'CONFIG_MISSING') {
  console.error(`No task-master config in ${projectRoot} — run "task-master init"`);
}

Prevention

When it happens

Trigger: Calling setResponseLanguage(lang, projectRoot) where projectRoot contains no .taskmaster/config.json (or whatever config path is configured) — running the command outside an initialized task-master project, or after the .taskmaster directory was removed or is gitignored-and-unchecked-out.

Common situations: Running `task-master response-language` in a fresh repo before `task-master init`; cloning a repo where .taskmaster was gitignored; wrong working directory (parent of the real project) so projectRoot points at a folder without config.

Related errors


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