deepseek-ai/deepseek-harness · error · AuthorizationError
ALREADY_IN_FLIGHT
ALREADY_IN_FLIGHT
Error message
an authorization attempt for "${key}" is already running What it means
Error "an authorization attempt for "${key}" is already running" thrown in deepseek-ai/deepseek-harness.
Source
Thrown at packages/credentials/authorization/src/index.ts:287
* @throws {AuthorizationError} code `NO_FLOW` when nothing claims the key,
* `UNKNOWN_METHOD` when the named method is not one the flow offers,
* `ALREADY_IN_FLIGHT` when an attempt is already running for the key, or
* `NOT_COMMITTED` when the flow resolved without committing a record
* during the attempt.
*/
async begin(request: AuthorizationRequest): Promise<AuthorizationOutcome> {
const { key } = request
const flow = this.flows.get(key)
if (flow === undefined) {
throw new AuthorizationError(`no authorization flow is registered for "${key}"`, 'NO_FLOW')
}
const method = request.method ?? flow.methods[0].id
if (!flow.methods.some(candidate => candidate.id === method)) {
throw new AuthorizationError(
`authorization flow for "${key}" offers no method "${method}"`, 'UNKNOWN_METHOD')
}
if (this.running.has(key)) {
throw new AuthorizationError(
`an authorization attempt for "${key}" is already running`, 'ALREADY_IN_FLIGHT')
}
// Withdrawn before it began: never claim the slot and never run the flow.
// Handing an aborted signal to `run()` would rely on every flow checking it
// before its first await, and one that does not would hang holding the key.
// Validation still runs first, so a caller naming a key or method that does
// not exist hears about it whether or not it also gave up.
if (request.signal?.aborted === true) return { status: 'cancelled' }
const controller = new AbortController()
const withdraw = (): void => { controller.abort(request.signal?.reason) }
request.signal?.addEventListener('abort', withdraw, { once: true })
this.running.set(key, { controller })
let settlement: AuthorizationSettlement = 'failed'
try {
const outcome = await this.attempt(flow, method, controller.signal, request.interaction)
settlement = outcome.status
return outcome
} finally {View on GitHub (pinned to b150a551b8)
When it happens
Trigger: Thrown at packages/credentials/authorization/src/index.ts:287 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/f0dc2d5096ef2631.
Report an issue: GitHub.