sipeed/picoclaw · warning

Workspace path is required.

Error message

Workspace path is required.

What it means

Validation error thrown in handleSave (web/frontend/src/components/config/config-page.tsx:317) when the config section is dirty and the workspace path trims to empty. The workspace is a required field of the gateway config PATCH built by handleSave, so an empty value aborts the save before any network call.

Source

Thrown at web/frontend/src/components/config/config-page.tsx:317

      const confirm = launcherForm.dashboardPasswordConfirm.trim()
      if (launcherPasswordDirty) {
        if (!password) {
          throw new Error(t("pages.config.dashboard_password_required"))
        }
        if (password !== confirm) {
          throw new Error(t("pages.config.dashboard_password_mismatch"))
        }
        if (Array.from(password).length < 8) {
          throw new Error(t("pages.config.dashboard_password_min_length"))
        }
      }

      if (configDirty) {
        const workspace = form.workspace.trim()
        const dmScope = form.dmScope.trim()

        if (!workspace) {
          throw new Error("Workspace path is required.")
        }
        if (!dmScope) {
          throw new Error("Session scope is required.")
        }

        if (
          form.mcpEnabled &&
          form.mcpDiscoveryEnabled &&
          !form.mcpDiscoveryUseBM25 &&
          !form.mcpDiscoveryUseRegex
        ) {
          throw new Error(
            "MCP discovery requires at least one search method (BM25 or regex).",
          )
        }

        const maxTokens = parseIntField(form.maxTokens, "Max tokens", {
          min: 1,

View on GitHub (pinned to 49183d7e8d)

Solutions

  1. Enter an absolute directory path for the workspace, e.g. /home/user/projects or C:\work
  2. If unsure of the expected default, check the raw config page or backend docs for the default workspace value and re-enter it
  3. Verify the field is not just whitespace — the value is trimmed before the check
Defensive patterns

Strategy: validation

Validate before calling

const workspace = form.workspace.trim()
if (configDirty && !workspace) {
  setFieldError("Workspace path is required.")
  return
}

Try / catch

try {
  await handleSave()
} catch (err) {
  if (err instanceof Error) setError(err.message)
}

Prevention

When it happens

Trigger: Clearing the workspace input (or filling it with whitespace) and saving while configDirty; also if form state was initialized empty because /api/config returned a config without a workspace value.

Common situations: User clears the field intending to reset to a default; config loaded from a fresh install has no workspace set; user pastes only spaces.

Related errors


AI-assisted analysis of sipeed/picoclaw@49183d7e8d (2026-08-15). Data as JSON: /api/errors/3aceb500dfb62905. Report an issue: GitHub.