deepseek-ai/deepseek-harness · error · TypeError

settings ${verb} for "${ns}" must contain only JSON-compatib

Error message

settings ${verb} for "${ns}" must contain only JSON-compatible data (found ${label} at ${path})

What it means

Error "settings ${verb} for "${ns}" must contain only JSON-compatible data (found ${label} at ${path})" thrown in deepseek-ai/deepseek-harness.

Source

Thrown at packages/settings/settings/src/index.ts:285

      const entries = value.map((entry, index) => clone(entry, `${path}[${index}]`))
      // Un-mark on exit so one object referenced twice without a cycle passes.
      visiting.delete(value)
      return entries
    }
    if (isPlainObject(value)) {
      if (visiting.has(value)) throw reject('a circular reference', path)
      visiting.add(value)
      // TODO(settings-json-properties): Use property-safe construction here and
      // in mergeLayers so valid JSON keys such as "__proto__" remain own data.
      const out: Record<string, unknown> = {}
      for (const [key, entry] of Object.entries(value)) {
        if (entry === undefined) continue
        out[key] = clone(entry, `${path}.${key}`)
      }
      visiting.delete(value)
      return out
    }
    throw reject(describeRejected(value), path)
  }
  return clone(root, '$') as Record<string, unknown>
}

/**
 * Layer `over` onto `under`: plain objects merge recursively, every other
 * value (arrays included) replaces the lower layer wholesale. `over` never
 * carries `undefined` entries — sections come from parsed documents and write
 * snapshots pass {@link cloneJsonShaped}, which strips them so a sparse patch
 * cannot erase lower keys.
 */
function mergeLayers(under: unknown, over: unknown): unknown {
  if (over === undefined) return under
  if (!isPlainObject(under) || !isPlainObject(over)) return over
  const merged: Record<string, unknown> = { ...under }
  for (const [key, value] of Object.entries(over)) {
    merged[key] = key in merged ? mergeLayers(merged[key], value) : value
  }

View on GitHub (pinned to b150a551b8)

Solutions

  1. Convert the value at the reported path to JSON-compatible data before writing settings.

When it happens

Trigger: Thrown at packages/settings/settings/src/index.ts:285 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/b62e03d7c9b51ba5. Report an issue: GitHub.