deepseek-ai/deepseek-harness · error · Error
agent "${id}" is already registered
Error message
agent "${id}" is already registered What it means
Error "agent "${id}" is already registered" thrown in deepseek-ai/deepseek-harness.
Source
Thrown at packages/core/agent/src/index.ts:482
* calling {@link announce}. Ordinary callers use {@link register}.
* @param agent - the prepared, unpublished agent.
* @param owner - live agent whose scoped context created this agent, or
* undefined for a top-level runtime root. This is runtime ownership, not
* the resumed session's durable parent lineage.
* @returns an idempotent closure that removes this exact entry and emits
* `agent/disposed` with listener failures contained. When called from a
* synchronous `agent/created` listener, removal and disposal wait until
* that creation dispatch unwinds.
*/
enter(agent: Agent, owner: Agent | undefined): () => void {
const id = agent.id
if (id !== agent.session.id) {
throw new Error(`agent id "${id}" does not match session id "${agent.session.id}"`)
}
const carrier = scopeTarget(agent, agent)
// This is the authoritative collision boundary. Concurrent create/resume
// operations may both prepare, but only one exact entry can publish.
if (this.store.has(id)) throw new Error(`agent "${id}" is already registered`)
const entry: AgentEntry = {
id,
agent,
owner,
carrier,
announced: false,
announcing: false,
detachRequested: false,
}
this.store.set(id, entry)
let entered = true
const detach = (): void => {
if (!entered) return
entered = false
// Every callback reached by this creation dispatch must observe the same
// live entry, and disposal must follow creation. A listener may own
// the advanced detach capability, so make that ordering structural:
// visibility and the paired disposal are deferred until announce()'sView on GitHub (pinned to b150a551b8)
Solutions
- Use a unique agent id or unregister the existing agent first.
When it happens
Trigger: Thrown at packages/core/agent/src/index.ts:482 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of deepseek-ai/deepseek-harness@b150a551b8 (2026-08-24).
Data as JSON: /api/errors/60e738def85c9114.
Report an issue: GitHub.