deepseek-ai/deepseek-harness · error · Error
invalid todo: `content` must be a non-empty string
Error message
invalid todo: `content` must be a non-empty string
What it means
Error "invalid todo: `content` must be a non-empty string" thrown in deepseek-ai/deepseek-harness.
Source
Thrown at packages/todo/tool-todo/src/index.ts:98
/**
* Validate the value constraints the ParameterSchemaSpec can't express and build the canonical {@link
* TodoItem}[]: trimmed non-empty unique content, and at most one `in_progress` item unless the
* deployment allows parallel work. The registry has already enforced the status enum and rejected
* unknown item keys (`additionalProperties: false` — the logged snapshot must equal what the model
* believes it wrote, so a nested/extended item shape fails loud at the schema boundary instead of
* silently flattening); the cast below records that guarantee.
* @param raw - the model-supplied list, already schema-checked.
* @param allowParallel - whether several items may be `in_progress` at once.
* @returns the canonical list.
*/
function toTodoList(raw: { content: string; status: string }[], allowParallel: boolean): TodoItem[] {
const todos: TodoItem[] = []
const seen = new Set<string>()
let active = 0
for (const item of raw) {
const content = item.content.trim()
if (content.length === 0) {
throw new Error('invalid todo: `content` must be a non-empty string')
}
if (seen.has(content)) {
throw new Error(`invalid todos: duplicate content ${JSON.stringify(content)}`)
}
seen.add(content)
if (item.status === 'in_progress') active++
todos.push({ content, status: item.status as TodoItem['status'] })
}
if (!allowParallel && active > 1) {
throw new Error(`invalid todos: at most one task may be in_progress (got ${active})`)
}
return todos
}
/** Wire payload schema of the `todos` projection (whole list or pre-first-write null). */
const todosProjectionSchema: ZodType<TodoItem[] | null> = zod.union([
zod.array(zod.object({
content: zod.string(),View on GitHub (pinned to b150a551b8)
Solutions
- Give every todo a non-empty content string.
When it happens
Trigger: Thrown at packages/todo/tool-todo/src/index.ts:98 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/1ea36a013cb7e414.
Report an issue: GitHub.