deepseek-ai/deepseek-harness · error · PresetNotWritableError

agent-presets: preset "${presetId}" cannot be written: it do

Error message

agent-presets: preset "${presetId}" cannot be written: it does not live under the writable preset root

What it means

Error "agent-presets: preset "${presetId}" cannot be written: it does not live under the writable preset root" thrown in deepseek-ai/deepseek-harness.

Source

Thrown at packages/preset/agent-presets/src/authoring.ts:193

 * A shipped preset is refused: it belongs to the deployment. A preset a live
 * session mounted is NOT refused — the composition was read at creation and is
 * never re-read, so that session keeps running exactly as it was.
 * @param roots - the configured roots.
 * @param preset - the resolved preset to remove.
 * @throws when the preset ships with the deployment or lies outside the writable root.
 */
export async function deleteComposition(
  roots: readonly PresetRoot[],
  preset: AgentPreset,
): Promise<void> {
  if (preset.trust !== 'user') {
    throw new PresetNotWritableError(preset.id, 'it ships with the deployment')
  }
  const dir = join(writableRoot(roots), preset.id)
  // Belt and braces over the id pattern: the resolved directory must still be
  // the one the writable root owns, whatever discovery reported.
  if (!isAbsolute(preset.path) || !preset.path.startsWith(dir)) {
    throw new PresetNotWritableError(preset.id, 'it does not live under the writable preset root')
  }
  await rm(dir, { recursive: true, force: true })
}

View on GitHub (pinned to b150a551b8)

Solutions

  1. Write only presets that live under the writable preset root.

When it happens

Trigger: Thrown at packages/preset/agent-presets/src/authoring.ts:193 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of deepseek-ai/deepseek-harness@b150a551b8 (2026-08-24). Data as JSON: /api/errors/c94a7ad9481a6372. Report an issue: GitHub.