{"record":{"id":"fa25b73eef41022b","repo":"deepseek-ai/deepseek-harness","slug":"agent-presets-preset-presetid-cannot-be-writ-fa25b7","errorCode":null,"errorMessage":"agent-presets: preset \"${presetId}\" cannot be written: it ships with the deployment","messagePattern":"agent-presets: preset \"(.+?)\" cannot be written: it ships with the deployment","errorType":"exception","errorClass":"PresetNotWritableError","httpStatus":null,"severity":"error","filePath":"packages/preset/agent-presets/src/authoring.ts","lineNumber":187,"sourceCode":"  return dir\n}\n\n/**\n * Delete a locally authored preset.\n *\n * A shipped preset is refused: it belongs to the deployment. A preset a live\n * session mounted is NOT refused — the composition was read at creation and is\n * never re-read, so that session keeps running exactly as it was.\n * @param roots - the configured roots.\n * @param preset - the resolved preset to remove.\n * @throws when the preset ships with the deployment or lies outside the writable root.\n */\nexport async function deleteComposition(\n  roots: readonly PresetRoot[],\n  preset: AgentPreset,\n): Promise<void> {\n  if (preset.trust !== 'user') {\n    throw new PresetNotWritableError(preset.id, 'it ships with the deployment')\n  }\n  const dir = join(writableRoot(roots), preset.id)\n  // Belt and braces over the id pattern: the resolved directory must still be\n  // the one the writable root owns, whatever discovery reported.\n  if (!isAbsolute(preset.path) || !preset.path.startsWith(dir)) {\n    throw new PresetNotWritableError(preset.id, 'it does not live under the writable preset root')\n  }\n  await rm(dir, { recursive: true, force: true })\n}\n","sourceCodeStart":169,"sourceCodeEnd":197,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/preset/agent-presets/src/authoring.ts#L169-L197","documentation":"Error \"agent-presets: preset \"${presetId}\" cannot be written: it ships with the deployment\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/preset/agent-presets/src/authoring.ts:187 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Copy the deployment preset to a user preset id and edit the copy."],"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"}