{"record":{"id":"7e07b05b1a0247c3","repo":"deepseek-ai/deepseek-harness","slug":"todo-write-requires-an-owning-agent-session","errorCode":null,"errorMessage":"todo_write requires an owning agent session","messagePattern":"todo_write requires an owning agent session","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/todo/tool-todo/src/index.ts","lineNumber":211,"sourceCode":"            properties: {\n              pending: { type: 'integer', required: true },\n              inProgress: { type: 'integer', required: true },\n              completed: { type: 'integer', required: true },\n            },\n          },\n        },\n      },\n      render: (_args, value) => [{\n        type: 'text',\n        text: `Updated todo list: ${value.counts.pending} pending, ${value.counts.inProgress} in progress, ${value.counts.completed} completed.`,\n      }],\n    },\n    execute(args, exec) {\n      const todos = toTodoList(args.todos, allowParallel)\n      if (!exec.agent) {\n        // The list is per-agent-session state; a non-agent caller (no owning\n        // session) has nowhere to write it. Reject rather than silently no-op.\n        throw new Error('todo_write requires an owning agent session')\n      }\n      exec.agent.session.append('todo/write', { todos })\n      const count = (status: TodoItem['status']): number => todos.filter(t => t.status === status).length\n      return Promise.resolve({\n        todos: todos.map(todo => ({ content: todo.content, status: todo.status })),\n        counts: {\n          pending: count('pending'),\n          inProgress: count('in_progress'),\n          completed: count('completed'),\n        },\n      })\n    },\n    presentCall: args => ({ card: 'generic', title: 'Update todo list', kind: 'other', rawInput: args.todos }),\n  }))\n}\n","sourceCodeStart":193,"sourceCodeEnd":227,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/todo/tool-todo/src/index.ts#L193-L227","documentation":"Error \"todo_write requires an owning agent session\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/todo/tool-todo/src/index.ts:211 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Call todo_write within an owning agent session."],"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"}