deepseek-ai/deepseek-harness · error · Error
credentials-local was disposed before the queued "${ref}" ${
Error message
credentials-local was disposed before the queued "${ref}" ${verb} ran What it means
Error "credentials-local was disposed before the queued "${ref}" ${verb} ran" thrown in deepseek-ai/deepseek-harness.
Source
Thrown at packages/credentials/credentials-local/src/index.ts:761
// Only an invariant violation escaping the update fan-out can reject a
// refresh; keep the operation queue alive and surface it as an error so
// one poisoned commit cannot silently end hot reloading forever.
this.ctx.logger.error('credentials-local: reload commit failed at %s', this.spec.filename)
this.ctx.logger.error(error)
})
}
/* jscpd:ignore-end */
/** Queue one line edit; entry checks reject early, the queue re-judges them at run time. */
private async write(ref: CredentialRef, value: string | undefined): Promise<void> {
const verb = value === undefined ? 'unset' : 'set'
if (this.isClosed()) {
throw new Error(`credentials-local is disposed: cannot ${verb} "${ref}"`)
}
this.assertUnshadowed(ref, verb)
return this.enqueue(async () => {
if (this.isClosed()) {
throw new Error(`credentials-local was disposed before the queued "${ref}" ${verb} ran`)
}
// Re-judged at run time: the environment may have changed while queued.
this.assertUnshadowed(ref, verb)
// The writer lock's exclusive create needs the parent to exist; 0700
// because the harness home holds user-private data.
await mkdir(dirname(this.spec.filename), { recursive: true, mode: 0o700 })
await withFileLock(this.spec.filename, async () => {
// Read-modify-write: fold in any on-disk state this process has not
// observed yet — an external edit still inside the watcher debounce
// window, a change the watcher missed, or another process's write —
// so the line edit below can never resurrect a stale document.
await this.reconcileFromDisk()
const existing = this.values.get(ref)
if (value === undefined && existing === undefined) return
const nextText = renderRef(this.text, ref, value)
// 0600: a document holding secrets is never world-readable.
await writeFileAtomic(this.spec.filename, nextText, { mode: 0o600, dirMode: 0o700 })
this.text = nextTextView on GitHub (pinned to b150a551b8)
When it happens
Trigger: Thrown at packages/credentials/credentials-local/src/index.ts:761 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/c1b2ec7cce1dd849.
Report an issue: GitHub.