deepseek-ai/deepseek-harness · error · Error

tool-str-replace-editor: description must be non-empty

Error message

tool-str-replace-editor: description must be non-empty

What it means

Error "tool-str-replace-editor: description must be non-empty" thrown in deepseek-ai/deepseek-harness.

Source

Thrown at packages/fs/tool-str-replace-editor/src/index.ts:520

}

/** Runtime configuration schema for the string-replacement editor tool. */
export const Config: z<Config> = z.object({
  maxOutputChars: z.number().default(16_000),
  description: z.string().default(DEFAULT_DESCRIPTION),
})

/** Register one `str_replace_editor` tool over `ctx.fs`. */
export function apply(ctx: Context, config: Config): void {
  const resolved: ResolvedConfig = {
    maxOutputChars: config.maxOutputChars ?? 16_000,
    description: config.description ?? DEFAULT_DESCRIPTION,
  }
  if (!Number.isSafeInteger(resolved.maxOutputChars) || resolved.maxOutputChars <= 0) {
    throw new Error('tool-str-replace-editor: maxOutputChars must be a positive safe integer')
  }
  if (resolved.description.trim().length === 0) {
    throw new Error('tool-str-replace-editor: description must be non-empty')
  }
  registerStrReplaceEditor(ctx, resolved)
}

View on GitHub (pinned to b150a551b8)

When it happens

Trigger: Thrown at packages/fs/tool-str-replace-editor/src/index.ts:520 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/e4dd9aa2d440c9d2. Report an issue: GitHub.