deepseek-ai/deepseek-harness · error · Error

message "${message.id}" is already pending

Error message

message "${message.id}" is already pending

What it means

Error "message "${message.id}" is already pending" thrown in deepseek-ai/deepseek-harness.

Source

Thrown at packages/core/agent/src/inbox.ts:216

    const inbox = this.state[splice.target]
    return inbox.splice(splice.start, splice.removedCount ?? 0, ...splice.inserted)
  }

  /** Validate one normalized splice against the current projection. */
  private validate(splice: SessionEventMap['agent/inbox/spliced']): void {
    const inbox = this.state[splice.target]
    const removedCount = splice.removedCount ?? 0
    if (!Number.isSafeInteger(splice.start) || splice.start < 0 || splice.start > inbox.length
      || !Number.isSafeInteger(removedCount) || removedCount < 0
      || splice.start + removedCount > inbox.length) {
      throw new Error('invalid inbox splice')
    }
    const candidate = inbox.toSpliced(splice.start, removedCount, ...splice.inserted)
    const ids = new Set<string>()
    for (const message of splice.target === 'next-turn'
      ? [...candidate, ...this.nextStep]
      : [...this.nextTurn, ...candidate]) {
      if (ids.has(message.id)) throw new Error(`message "${message.id}" is already pending`)
      ids.add(message.id)
    }
  }
}

View on GitHub (pinned to b150a551b8)

Solutions

  1. Wait for or cancel the pending message before sending another with the same id.

When it happens

Trigger: Thrown at packages/core/agent/src/inbox.ts:216 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/240fe428635fc1e1. Report an issue: GitHub.