deepseek-ai/deepseek-harness · error · Error
todo_write requires an owning agent session
Error message
todo_write requires an owning agent session
What it means
Error "todo_write requires an owning agent session" thrown in deepseek-ai/deepseek-harness.
Source
Thrown at packages/todo/tool-todo/src/index.ts:211
properties: {
pending: { type: 'integer', required: true },
inProgress: { type: 'integer', required: true },
completed: { type: 'integer', required: true },
},
},
},
},
render: (_args, value) => [{
type: 'text',
text: `Updated todo list: ${value.counts.pending} pending, ${value.counts.inProgress} in progress, ${value.counts.completed} completed.`,
}],
},
execute(args, exec) {
const todos = toTodoList(args.todos, allowParallel)
if (!exec.agent) {
// The list is per-agent-session state; a non-agent caller (no owning
// session) has nowhere to write it. Reject rather than silently no-op.
throw new Error('todo_write requires an owning agent session')
}
exec.agent.session.append('todo/write', { todos })
const count = (status: TodoItem['status']): number => todos.filter(t => t.status === status).length
return Promise.resolve({
todos: todos.map(todo => ({ content: todo.content, status: todo.status })),
counts: {
pending: count('pending'),
inProgress: count('in_progress'),
completed: count('completed'),
},
})
},
presentCall: args => ({ card: 'generic', title: 'Update todo list', kind: 'other', rawInput: args.todos }),
}))
}
View on GitHub (pinned to b150a551b8)
Solutions
- Call todo_write within an owning agent session.
When it happens
Trigger: Thrown at packages/todo/tool-todo/src/index.ts:211 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/7e07b05b1a0247c3.
Report an issue: GitHub.