{"record":{"id":"aa269261f8db7e50","repo":"deepseek-ai/deepseek-harness","slug":"goal-invalid-edit","errorCode":"GOAL_INVALID_EDIT","errorMessage":"goal edit requires objective and/or maxGoalRounds","messagePattern":"goal edit requires objective and/or maxGoalRounds","errorType":"exception","errorClass":"GoalError","httpStatus":null,"severity":"error","filePath":"packages/goal/goal/src/index.ts","lineNumber":281,"sourceCode":"      phase: 'active',\n      maxGoalRounds: spec.maxGoalRounds,\n    }\n    return this.commitSnapshot(agent, cache, 'create', goal, 0, now, now, 'armed')\n  }\n\n  /**\n   * Edit objective and/or round cap without changing phase.\n   * @param agent - owning live agent.\n   * @param ref - expected current revision.\n   * @param request - at least one replacement field.\n   * @returns the edited view.\n   */\n  @Remote('edit')\n  edit(agent: Agent, ref: GoalRef, request: EditGoalRequest): GoalView {\n    const cache = this.prepareMutation(agent)\n    const current = this.expectCurrent(cache, ref)\n    if (request.objective === undefined && request.maxGoalRounds === undefined) {\n      throw new GoalError('goal edit requires objective and/or maxGoalRounds', 'GOAL_INVALID_EDIT')\n    }\n    const goal: GoalSnapshot = {\n      ...current,\n      revision: current.revision + 1,\n      ...request.objective === undefined ? {} : { objective: resolveObjective(request.objective) },\n      ...request.maxGoalRounds === undefined ? {} : { maxGoalRounds: resolveMaxGoalRounds(request.maxGoalRounds) },\n    }\n    return this.commitCurrent(agent, cache, 'edit', goal, cache.activation)\n  }\n\n  /**\n   * Pause an active goal and disarm automatic continuation.\n   * @param agent - owning live agent.\n   * @param ref - expected current revision.\n   * @returns the paused view.\n   */\n  @Remote('pause')\n  pause(agent: Agent, ref: GoalRef): GoalView {","sourceCodeStart":263,"sourceCodeEnd":299,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/goal/goal/src/index.ts#L263-L299","documentation":"Error \"goal edit requires objective and/or maxGoalRounds\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/goal/goal/src/index.ts:281 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"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"}