deepseek-ai/deepseek-harness · error · AuthorizationError
DUPLICATE_FLOW
DUPLICATE_FLOW
Error message
an authorization flow for "${flow.key}" is already registered What it means
Error "an authorization flow for "${flow.key}" is already registered" thrown in deepseek-ai/deepseek-harness.
Source
Thrown at packages/credentials/authorization/src/index.ts:205
private readonly running = new Map<CredentialKey, InFlight>()
constructor(ctx: Context) {
super(ctx, 'authorization')
}
/**
* Offer a way to obtain one credential. One flow per key: two plugins
* claiming the same key would each write a record in their own format, and
* whichever ran last would leave the other reading a payload it cannot parse.
*
* @param flow - the key it writes, its label, its methods, and its runner.
* @returns Disposer that withdraws this flow.
* @throws {AuthorizationError} code `DUPLICATE_FLOW` when the key is already claimed.
*/
registerFlow(flow: AuthorizationFlow): () => void {
const dispose = this.ctx.effect(function* (this: AuthorizationService) {
if (this.flows.has(flow.key)) {
throw new AuthorizationError(
`an authorization flow for "${flow.key}" is already registered`, 'DUPLICATE_FLOW')
}
this.flows.set(flow.key, flow)
yield () => {
this.flows.delete(flow.key)
// A flow leaving mid-attempt takes its attempt with it: the runner
// belongs to a plugin that is going away, so letting it keep prompting
// would outlive the fiber that can answer for it.
this.running.get(flow.key)?.controller.abort()
}
}.bind(this), 'authorization.registerFlow()')
return () => void dispose()
}
/**
* Every registered flow, for a surface listing what can be authorized.
* @returns one entry per flow, in registration order.
*/View on GitHub (pinned to b150a551b8)
When it happens
Trigger: Thrown at packages/credentials/authorization/src/index.ts:205 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/0f5ded7c5234230d.
Report an issue: GitHub.