{"record":{"id":"a214abd1738e7796","repo":"deepseek-ai/deepseek-harness","slug":"agent-id-sessionid-and-resumesessionid-are-m","errorCode":null,"errorMessage":"agent \"${id}\": sessionId and resumeSessionId are mutually exclusive","messagePattern":"agent \"(.+?)\": sessionId and resumeSessionId are mutually exclusive","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/core/agent-loop/src/index.ts","lineNumber":283,"sourceCode":"    /** Optional stable identity; remounts resume its materialized history, while first use creates it fresh. */\n    sessionId?: SessionId\n    /** Optional workspace for a fresh session. */\n    cwd?: string\n    /** Persisted session to resume instead of creating a fresh session. */\n    resumeSessionId?: SessionId\n  })[]\n}\n\n/** Agent-loop configuration after defaults and load-time validation. */\ntype ResolvedConfig = Config & { maxParallelToolCalls: number }\n\n/** Reject self-contained identity conflicts before any configured agent starts. */\nfunction validateConfiguredAgents(agents: Config['agents']): void {\n  const exactIdentities = new Map<SessionId, string>()\n  for (const { id, sessionId, resumeSessionId } of agents) {\n    const hasResumeId = resumeSessionId !== undefined && resumeSessionId !== ''\n    if (sessionId !== undefined && hasResumeId) {\n      throw new Error(`agent \"${id}\": sessionId and resumeSessionId are mutually exclusive`)\n    }\n    const exactIdentity = hasResumeId ? resumeSessionId : sessionId\n    if (exactIdentity === undefined) continue\n    const firstId = exactIdentities.get(exactIdentity)\n    if (firstId !== undefined) {\n      throw new Error(`agents \"${firstId}\" and \"${id}\" use duplicate exact session identity \"${exactIdentity}\"`)\n    }\n    exactIdentities.set(exactIdentity, id)\n  }\n}\n\n/** Concrete agent factory and driver service. */\nexport class AgentLoop extends Service implements AgentFactory {\n  static inject = ['agents', 'sessions', 'llm', 'tools', 'systemPrompt']\n\n  /** Runtime schema for declarative agents. */\n  static Config = z.object({\n    maxParallelToolCalls: z.number().step(1).min(1).default(DEFAULT_MAX_PARALLEL_TOOL_CALLS),","sourceCodeStart":265,"sourceCodeEnd":301,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/core/agent-loop/src/index.ts#L265-L301","documentation":"Error \"agent \"${id}\": sessionId and resumeSessionId are mutually exclusive\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/core/agent-loop/src/index.ts:283 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass only one of sessionId or resumeSessionId, not both."],"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"}