{"record":{"id":"4bab9f45ebab4189","repo":"deepseek-ai/deepseek-harness","slug":"job-job-id-belongs-to-another-session","errorCode":null,"errorMessage":"job ${job.id} belongs to another session","messagePattern":"job (.+?) belongs to another session","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/jobs/jobs-local/src/index.ts","lineNumber":358,"sourceCode":"    const scope = owner === undefined ? undefined : scopeOf(owner.ctx)\n    for (const layer of this.layers.chainLayers(scope)) yield* layer.listeners.values()\n  }\n\n  /** Look up a job or fail loud. */\n  private expect(id: JobId): TrackedTask {\n    const job = this.store.get(id)\n    if (job === undefined) throw new Error(`unknown job ${id}`)\n    return job\n  }\n\n  /**\n   * The isolation fence: a job with an owner is reachable only by callers\n   * whose session id matches (`!== undefined` semantics — an unowned job is\n   * open, and a no-agent caller can never match an owned one).\n   */\n  private assertAccess(job: TrackedTask, caller?: Agent): void {\n    if (job.owner !== undefined && job.owner.id !== caller?.id) {\n      throw new Error(`job ${job.id} belongs to another session`)\n    }\n  }\n\n  /** Project a fresh read-only snapshot from the mutable record. */\n  private snapshot(job: TrackedTask): JobSnapshot {\n    const ownerSession = job.owner?.id\n    return {\n      id: job.id,\n      kind: job.kind,\n      label: job.label,\n      ...job.outputLimitBytes !== undefined ? { outputLimitBytes: job.outputLimitBytes } : {},\n      ...ownerSession !== undefined ? { ownerSession } : {},\n      status: job.status,\n      ...job.detail !== undefined ? { detail: job.detail } : {},\n      startedAt: job.startedAt,\n      ...job.finishedAt !== undefined ? { finishedAt: job.finishedAt } : {},\n      reported: job.reported,\n    }","sourceCodeStart":340,"sourceCodeEnd":376,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/jobs/jobs-local/src/index.ts#L340-L376","documentation":"Error \"job ${job.id} belongs to another session\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/jobs/jobs-local/src/index.ts:358 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Query or control the job only from the session that started it."],"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"}