{"record":{"id":"1edfd4fe28625f13","repo":"deepseek-ai/deepseek-harness","slug":"agent-entry-id-was-already-announced","errorCode":null,"errorMessage":"agent \"${entry.id}\" was already announced","messagePattern":"agent \"(.+?)\" was already announced","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/core/agent/src/index.ts","lineNumber":555,"sourceCode":"        this.ctx.logger.warn(`agent \"${entry.id}\": agent/disposed listener threw: ${String(error)}`)\n      }\n    }\n  }\n\n  /**\n   * Announce an agent previously inserted with {@link enter}.\n   * @param agent - the live inserted agent to announce.\n   * @throws if `agent` is not the exact live registry entry for its id, or its\n   *   creation announcement already began (including a reentrant call from a\n   *   creation listener).\n   */\n  announce(agent: Agent): void {\n    const entry = this.store.get(agent.id)\n    if (entry === undefined || entry.agent !== agent) {\n      throw new Error(`agent \"${agent.id}\" is not live in this registry`)\n    }\n    if (entry.announced || entry.announcing) {\n      throw new Error(`agent \"${entry.id}\" was already announced`)\n    }\n    // Mark before dispatch so a listener cannot recursively create a second\n    // lifecycle edge; detach still pairs a partially delivered first edge.\n    entry.announcing = true\n    entry.announced = true\n    const args: unknown[] = [entry.carrier, 'agent/created', { agent: entry.agent }]\n    try {\n      for (const callback of this.ctx.events.dispatch('emit', args)) {\n        // A synchronous creation failure vetoes publication and rolls back.\n        // Returned-promise rejection happens after this synchronous boundary, so\n        // observe and report it instead of leaking an unhandled rejection.\n        const returned: unknown = callback(...args)\n        void Promise.resolve(returned).catch((error: unknown) => {\n          this.ctx.logger.warn(`agent \"${entry.id}\": agent/created listener rejected: ${String(error)}`)\n        })\n      }\n    } finally {\n      entry.announcing = false","sourceCodeStart":537,"sourceCodeEnd":573,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/core/agent/src/index.ts#L537-L573","documentation":"Error \"agent \"${entry.id}\" was already announced\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/core/agent/src/index.ts:555 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Announce each agent only once."],"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"}