{"record":{"id":"626e490f8736497a","repo":"eyaltoledano/claude-task-master","slug":"write-error","errorCode":"WRITE_ERROR","errorMessage":"Error writing updated configuration to configuration file","messagePattern":"Error writing updated configuration to configuration file","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"scripts/modules/task-manager/response-language.js","lineNumber":62,"sourceCode":"\t\treturn {\n\t\t\tsuccess: false,\n\t\t\terror: {\n\t\t\t\tcode: 'INVALID_RESPONSE_LANGUAGE',\n\t\t\t\tmessage: `Invalid response language: ${lang}. Must be a non-empty string.`\n\t\t\t}\n\t\t};\n\t}\n\n\ttry {\n\t\tconst currentConfig = getConfig(projectRoot);\n\t\tcurrentConfig.global.responseLanguage = lang;\n\t\tconst writeResult = writeConfig(currentConfig, projectRoot);\n\n\t\tif (!writeResult) {\n\t\t\treturn {\n\t\t\t\tsuccess: false,\n\t\t\t\terror: {\n\t\t\t\t\tcode: 'WRITE_ERROR',\n\t\t\t\t\tmessage: 'Error writing updated configuration to configuration file'\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\n\t\treturn {\n\t\t\tsuccess: true,\n\t\t\tdata: {\n\t\t\t\tresponseLanguage: lang,\n\t\t\t\tmessage: successMessage\n\t\t\t}\n\t\t};\n\t} catch (error) {\n\t\treport('error', `Error setting response language: ${error.message}`);\n\t\treturn {\n\t\t\tsuccess: false,\n\t\t\terror: {\n\t\t\t\tcode: 'SET_RESPONSE_LANGUAGE_ERROR',","sourceCodeStart":44,"sourceCodeEnd":80,"githubUrl":"https://github.com/eyaltoledano/claude-task-master/blob/c0c98d367c55296bfe69e65680625b6db437af02/scripts/modules/task-manager/response-language.js#L44-L80","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"// before\n$ task-master response-language --set spanish // WRITE_ERROR (file owned by root)\n// after\n$ sudo chown $(whoami) .taskmaster/config.json\n$ task-master response-language --set spanish","handlingStrategy":"validation","validationCode":"const fs = require('fs');\nconst cfgPath = require('path').join(projectRoot, '.taskmaster', 'config.json');\nfs.accessSync(cfgPath, fs.constants.W_OK); // throws EACCES early if not writable\nawait setResponseLanguage(lang, projectRoot);","typeGuard":null,"tryCatchPattern":"const res = await setResponseLanguage(lang, projectRoot);\nif (!res.success && res.error?.code === 'WRITE_ERROR') {\n  console.error(`Failed to persist config in ${projectRoot} — check file permissions and disk space`);\n  process.exitCode = 1;\n}","preventionTips":["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."],"tags":["filesystem","configuration","permissions"],"backgroundTag":"config-write-failed","analyzedSha":"c0c98d367c55296bfe69e65680625b6db437af02","analyzedAt":"2026-08-29T02:56:26.071Z","schemaVersion":2},"datasetVersion":"2026-08-29T07:17:48.351Z"}