deepseek-ai/deepseek-harness · error · TypeError
credentials-local: ${where} is cyclic
Error message
credentials-local: ${where} is cyclic What it means
Error "credentials-local: ${where} is cyclic" thrown in deepseek-ai/deepseek-harness.
Source
Thrown at packages/credentials/credentials-local/src/index.ts:407
* Reject a payload that cannot survive a JSON round trip, on the way in and on
* the way out. The seam promises owners their payload comes back exactly as
* written, and both directions can break that: a document may spell `.inf` or
* an alias cycle, and an owner may hand over a `Date`, a class instance, or a
* `bigint` that this document has no faithful spelling for. Neither the value
* nor any nested value is quoted in a diagnostic.
* @param where - the subject named in a diagnostic, already free of any value.
* @param value - the payload or nested value to admit.
* @param seen - objects on the current path, for cycle detection.
* @throws TypeError naming `where` when the value cannot round-trip.
*/
function assertJsonValue(where: string, value: unknown, seen: Set<object>): void {
if (value === null || typeof value === 'string' || typeof value === 'boolean') return
if (typeof value === 'number') {
if (Number.isFinite(value)) return
throw new TypeError(`credentials-local: ${where} holds a non-finite number`)
}
if (typeof value === 'object') {
if (seen.has(value)) throw new TypeError(`credentials-local: ${where} is cyclic`)
if (Object.getPrototypeOf(value) === Object.prototype || Array.isArray(value)) {
seen.add(value)
for (const nested of Object.values(value)) assertJsonValue(where, nested, seen)
seen.delete(value)
return
}
}
throw new TypeError(`credentials-local: ${where} holds a value JSON cannot represent`)
}
/**
* The comment-preserving mutable tree one edit renders from. Editing the
* parsed document rather than rebuilding it keeps comments and the formatting
* of every untouched entry; an absent document starts a fresh one.
* @param text - the current document text, `undefined` while the file is absent.
* @returns the tree to edit, carrying this build's version stamp.
*/
function mutableDocument(text: string | undefined): Document {View on GitHub (pinned to b150a551b8)
When it happens
Trigger: Thrown at packages/credentials/credentials-local/src/index.ts:407 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/ef52e15fb3e12189.
Report an issue: GitHub.