deepseek-ai/deepseek-harness · error · SettingsConflictError

settings-conflict

settings-conflict

Error message

error.message

What it means

settingsWrite rejects a write and surfaces the settings seam's own message (unknown/invalid namespace, read-only provider, schema validation, or storage failure) in one settings-rejected error carrying the seam's wording.

Solutions

  1. Read the forwarded error message in the response or logs and fix the underlying failure it names.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at packages/host/apiproxy/src/api-proxy.ts:1902 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/7bd29c9e12962cba. Report an issue: GitHub.

Appendix: source

Thrown at packages/host/apiproxy/src/api-proxy.ts:1902

   * Run one settings write (merge or wholesale replace) and acknowledge with
   * the namespace's new redacted view. Every seam refusal — unknown or invalid
   * namespace, read-only provider, schema validation, storage — becomes one
   * `settings-rejected` carrying the seam's own message.
   */
  async function settingsWrite(
    request: RpcRequest<unknown>,
    ns: string,
    mode: 'update' | 'replace' | 'mutate',
    section: object,
    expectedRevision?: number,
  ): Promise<RpcResponse<SettingsNamespaceView>> {
    const settings = ctx.get('settings')
    if (settings === undefined) return err(request, settingsAbsent())
    const rejected = (error: unknown): RpcResponse<SettingsNamespaceView> => {
      // A stale writer is its own outcome, not a malformed request: the client
      // must re-read and re-apply rather than treat the write as invalid.
      if (error instanceof SettingsConflictError) {
        return err(request, {
          code: 'settings-conflict',
          message: error.message,
          details: { ns, expected: error.expected, actual: error.actual },
        })
      }
      return err(request, {
        code: 'settings-rejected',
        message: error instanceof Error ? error.message : String(error),
        details: { ns },
      })
    }
    let branded: SettingsNamespace
    try {
      branded = settingsNamespace(ns)
    } catch (error: unknown) {
      // A malformed name can address no registration, so it fails exactly as
      // an unregistered one does.
      return rejected(error)

View on GitHub (pinned to b150a551b8)