{"record":{"id":"09393873d0c8e7d6","repo":"deepseek-ai/deepseek-harness","slug":"agent-presets-preset-presetid-cannot-be-writ","errorCode":null,"errorMessage":"agent-presets: preset \"${presetId}\" cannot be written: this deployment configures no user-writable preset root","messagePattern":"agent-presets: preset \"(.+?)\" cannot be written: this deployment configures no user-writable preset root","errorType":"exception","errorClass":"PresetNotWritableError","httpStatus":null,"severity":"error","filePath":"packages/preset/agent-presets/src/authoring.ts","lineNumber":68,"sourceCode":"  constructor(\n    /** What the caller tried to change, for the diagnostic. */\n    readonly presetId: string,\n    reason: string,\n  ) {\n    super(`agent-presets: preset \"${presetId}\" cannot be written: ${reason}`)\n  }\n}\n\n/**\n * The root locally authored presets are written to.\n * @param roots - the configured roots in precedence order.\n * @returns the absolute path of the first `user` root.\n * @throws when the deployment configured no writable root.\n */\nexport function writableRoot(roots: readonly PresetRoot[]): string {\n  const root = roots.find(candidate => candidate.trust === 'user')\n  if (root === undefined) {\n    throw new PresetNotWritableError('', 'this deployment configures no user-writable preset root')\n  }\n  return resolve(expandHomePath(root.path))\n}\n\n/**\n * Read one preset's composition text.\n * @param preset - the resolved preset.\n * @returns the file's contents.\n */\nexport async function readComposition(preset: AgentPreset): Promise<string> {\n  return await readFile(preset.path, 'utf8')\n}\n\n/** Whether anything occupies the path (cp's own errorOnExist backstops races). */\nasync function occupied(path: string): Promise<boolean> {\n  let present = true\n  try {\n    await stat(path)","sourceCodeStart":50,"sourceCodeEnd":86,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/preset/agent-presets/src/authoring.ts#L50-L86","documentation":"Error \"agent-presets: preset \"${presetId}\" cannot be written: this deployment configures no user-writable preset root\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/preset/agent-presets/src/authoring.ts:68 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Configure a user-writable preset root for the deployment."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b150a551b8d465e31e418e1b2eaf5e79bbb7d28e","analyzedAt":"2026-08-24T18:12:29.105Z","schemaVersion":2},"datasetVersion":"2026-08-24T22:17:12.610Z"}