deepseek-ai/deepseek-harness · error · Error

${what} failed: HRESULT 0x${(hr >>> 0).toString(16)}

Error message

${what} failed: HRESULT 0x${(hr >>> 0).toString(16)}

What it means

Error "${what} failed: HRESULT 0x${(hr >>> 0).toString(16)}" thrown in deepseek-ai/deepseek-harness.

Source

Thrown at packages/host/directory-picker-native/src/win32-dialog-logic.ts:91

   * @returns the created dialog surface; throws when creation fails.
   */
  createFolderDialog(): Win32FolderDialog
  /**
   * `GetCurrentThreadId` — the native id a driver needs to close this
   * thread's windows from outside.
   * @returns the calling thread's native id.
   */
  currentThreadId(): number
}

/**
 * Throw when an HRESULT signals failure.
 * @param hr - the HRESULT to check.
 * @param what - the failing call's name for the error message.
 * @returns the (successful) HRESULT unchanged.
 */
function check(hr: number, what: string): number {
  if (hr < 0) throw new Error(`${what} failed: HRESULT 0x${(hr >>> 0).toString(16)}`)
  return hr
}

/**
 * Run one modal folder-picker conversation on the calling thread: DPI opt-in,
 * STA init, dialog creation, `Show`, and result extraction, releasing the
 * dialog on every path.
 * @param bindings - the native surface (koffi-backed in production, fakes in tests).
 * @param title - the dialog title text.
 * @param onShowing - called with the native thread id immediately before the
 *   blocking `Show`, so a driver on another thread can close the dialog.
 * @returns the selected filesystem path, or null when the user cancels.
 */
export function runFolderDialog(
  bindings: Win32DialogBindings,
  title: string,
  onShowing: (threadId: number) => void,
): string | null {

View on GitHub (pinned to b150a551b8)

When it happens

Trigger: Thrown at packages/host/directory-picker-native/src/win32-dialog-logic.ts:91 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/497b89533e8f0e55. Report an issue: GitHub.