{"record":{"id":"74eba4eb1be2c469","repo":"deepseek-ai/deepseek-harness","slug":"goal-not-found","errorCode":"GOAL_NOT_FOUND","errorMessage":"no current goal","messagePattern":"no current goal","errorType":"exception","errorClass":"GoalError","httpStatus":null,"severity":"error","filePath":"packages/goal/goal/src/index.ts","lineNumber":403,"sourceCode":"      cleared: tombstone,\n      clearedAt: this.nextMutationTime(cache),\n    }\n    this.commit(agent, cache, change, 'disarmed')\n    return { ...tombstone }\n  }\n\n  /** Resolve and validate the cache used by a mutation. */\n  private prepareMutation(agent: Agent): GoalCache {\n    this.assertLive(agent)\n    const cache = this.cache(agent.session)\n    this.sync(agent.session, cache)\n    return cache\n  }\n\n  /** Reject stale or missing current-state refs. */\n  private expectCurrent(cache: GoalCache, ref: GoalRef): GoalSnapshot {\n    const current = cache.state.goal\n    if (current === undefined) throw new GoalError('no current goal', 'GOAL_NOT_FOUND')\n    if (ref.id !== current.id || ref.revision !== current.revision) {\n      throw new GoalError(\n        `stale goal ref \"${ref.id}\" revision ${ref.revision}; current is \"${current.id}\" revision ${current.revision}`,\n        'GOAL_STALE_REVISION',\n      )\n    }\n    return current\n  }\n\n  /** Enforce exact live-agent identity rather than trusting a matching id. */\n  private assertLive(agent: Agent): void {\n    if (this.ctx.agents.get(agent.id) !== agent) {\n      throw new GoalError(`agent \"${agent.id}\" is not live in this registry`, 'GOAL_AGENT_NOT_LIVE')\n    }\n  }\n\n  /** Return the per-session cache, folding a seed once with activation disarmed. */\n  private cache(session: Session): GoalCache {","sourceCodeStart":385,"sourceCodeEnd":421,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/goal/goal/src/index.ts#L385-L421","documentation":"Error \"no current goal\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/goal/goal/src/index.ts:403 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"}