{"record":{"id":"ca2ff6f3c6601f55","repo":"deepseek-ai/deepseek-harness","slug":"goal-invalid-transition","errorCode":"GOAL_INVALID_TRANSITION","errorMessage":"goal \"${current.id}\" is already active and armed","messagePattern":"goal \"(.+?)\" is already active and armed","errorType":"exception","errorClass":"GoalError","httpStatus":null,"severity":"error","filePath":"packages/goal/goal/src/index.ts","lineNumber":319,"sourceCode":"  }\n\n  /**\n   * Resume and arm a stopped goal, or rearm an active goal after a\n   * session-start edge, while its round budget still has capacity.\n   * @param agent - owning live agent.\n   * @param ref - expected current revision.\n   * @returns the active view.\n   */\n  @Remote('resume')\n  resume(agent: Agent, ref: GoalRef): GoalView {\n    const cache = this.prepareMutation(agent)\n    const current = this.expectCurrent(cache, ref)\n    const resumable: readonly GoalPhase[] = ['active', 'paused', 'blocked']\n    if (!resumable.includes(current.phase)) {\n      throw this.transitionError(current, 'resume', resumable)\n    }\n    if (current.phase === 'active' && cache.activation === 'armed') {\n      throw new GoalError(`goal \"${current.id}\" is already active and armed`, 'GOAL_INVALID_TRANSITION')\n    }\n    if (cache.state.roundsStarted >= current.maxGoalRounds) {\n      throw new GoalError(\n        `goal \"${current.id}\" exhausted ${current.maxGoalRounds} goal rounds; increase maxGoalRounds before resuming`,\n        'GOAL_INVALID_TRANSITION',\n      )\n    }\n    return this.commitCurrent(agent, cache, 'resume', this.withPhase(current, 'active'), 'armed')\n  }\n\n  /**\n   * Mark a current non-complete goal complete and disarm it.\n   * @param agent - owning live agent.\n   * @param ref - expected current revision.\n   * @returns the completed view.\n   */\n  @Remote('complete')\n  complete(agent: Agent, ref: GoalRef): GoalView {","sourceCodeStart":301,"sourceCodeEnd":337,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/goal/goal/src/index.ts#L301-L337","documentation":"Error \"goal \"${current.id}\" is already active and armed\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/goal/goal/src/index.ts:319 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"}