eyaltoledano/claude-task-master · error
WRITE_ERROR
WRITE_ERROR
Error message
Error writing updated configuration to configuration file
What it means
The language value was valid and the in-memory config was updated, but writeConfig(currentConfig, projectRoot) returned falsy when persisting to disk, so the response-language change was NOT saved. Like CONFIG_WRITE_ERROR but from the response-language module, it indicates a filesystem-level persistence failure.
Source
Thrown at scripts/modules/task-manager/response-language.js:62
return {
success: false,
error: {
code: 'INVALID_RESPONSE_LANGUAGE',
message: `Invalid response language: ${lang}. Must be a non-empty string.`
}
};
}
try {
const currentConfig = getConfig(projectRoot);
currentConfig.global.responseLanguage = lang;
const writeResult = writeConfig(currentConfig, projectRoot);
if (!writeResult) {
return {
success: false,
error: {
code: 'WRITE_ERROR',
message: 'Error writing updated configuration to configuration file'
}
};
}
return {
success: true,
data: {
responseLanguage: lang,
message: successMessage
}
};
} catch (error) {
report('error', `Error setting response language: ${error.message}`);
return {
success: false,
error: {
code: 'SET_RESPONSE_LANGUAGE_ERROR',View on GitHub (pinned to c0c98d367c)
Solutions
- Fix permissions: `sudo chown $(whoami) .taskmaster/config.json && chmod u+w .taskmaster/config.json`, then retry.
- Verify free disk space / quota (`df -h .`) and clean up if the volume is full.
- If the environment is read-only (Docker/CI artifact checkout), mount it writable or run the command in a writable environment.
- Ensure .taskmaster/ still exists (`task-master init` to recreate) and that no other process holds the file open.
Example fix
// before $ task-master response-language --set spanish // WRITE_ERROR (file owned by root) // after $ sudo chown $(whoami) .taskmaster/config.json $ task-master response-language --set spanish
Defensive patterns
Strategy: validation
Validate before calling
const fs = require('fs');
const cfgPath = require('path').join(projectRoot, '.taskmaster', 'config.json');
fs.accessSync(cfgPath, fs.constants.W_OK); // throws EACCES early if not writable
await setResponseLanguage(lang, projectRoot); Try / catch
const res = await setResponseLanguage(lang, projectRoot);
if (!res.success && res.error?.code === 'WRITE_ERROR') {
console.error(`Failed to persist config in ${projectRoot} — check file permissions and disk space`);
process.exitCode = 1;
} Prevention
- Pre-flight check writability of .taskmaster/config.json before scripted language changes.
- Avoid running config-mutating commands in read-only containers/CI checkouts.
- Keep disk space monitored where task-master runs unattended.
- Restore ownership after sudo operations: chown $(whoami) .taskmaster/config.json.
When it happens
Trigger: writeConfig fails while saving the updated config: read-only filesystem or file (EACCES), missing .taskmaster directory, disk full, immutable file attribute, or the file being locked by another process/editor.
Common situations: Containers/CI mounts that are read-only; config file owned by root or another user; SELinux/sandbox policies blocking writes; disk quota exceeded; .taskmaster deleted between the existence check and the write.
Related errors
- CONFIG_WRITE_ERROR
- CONFIG_ERROR
- Failed to read file ${filePath}: ${error.message}
- Failed to read ${filePath} for modification: ${err.message}
- Failed to create directory ${dirPath}: ${error.message}
AI-assisted analysis of eyaltoledano/claude-task-master@c0c98d367c (2026-08-29).
Data as JSON: /api/errors/626e490f8736497a.
Report an issue: GitHub.