different-ai/openwork · error

app.error_session_name_required

Error message

app.error_session_name_required

What it means

renameSessionTitle validates that the new session title is non-empty after trimming whitespace. An empty or whitespace-only title cannot identify the session in the sidebar, so the localized message 'app.error_session_name_required' is thrown before calling options.renameSession.

Source

Thrown at apps/app/src/react-app/domains/session/sync/actions-store.ts:775

      const id = options.messageIdFromInfo(candidate);
      if (id && id < messageID) {
        prior = candidate;
        break;
      }
    }

    if (prior) {
      options.restorePromptFromUserMessage(prior);
      return;
    }

    options.setPrompt("");
  }

  async function renameSessionTitle(sessionID: string, title: string) {
    const trimmed = title.trim();
    if (!trimmed) {
      throw new Error(t("app.error_session_name_required"));
    }

    await options.renameSession(sessionID, trimmed);
    await options.refreshSidebarWorkspaceSessions(options.selectedWorkspaceId()).catch(() => undefined);
  }

  async function deleteSessionById(sessionID: string) {
    const trimmed = sessionID.trim();
    if (!trimmed) return;
    const c = options.client();
    if (!c) {
      throw new Error(t("app.error_not_connected"));
    }

    const root = options.selectedWorkspaceRoot().trim();
    const directory = toSessionTransportDirectory(root);
    const params = directory ? { sessionID: trimmed, directory } : { sessionID: trimmed };
    unwrap(await c.session.delete(params));

View on GitHub (pinned to 2b7df46e8a)

Solutions

  1. Trim and validate the title in the UI before calling renameSessionTitle; disable the confirm button while trimmed title is empty.
  2. Pass a fallback title (e.g. 'Untitled session') when input is blank.
  3. Catch the error and show the localized validation message in the rename dialog.

Example fix

// before: await store.renameSessionTitle(id, input.value) | // after: const title = input.value.trim(); if (title) await store.renameSessionTitle(id, title)
Defensive patterns

Strategy: validation

Validate before calling

const title = newTitle.trim(); if (!title) { showToast(t('app.error_session_name_required')); return; } await store.renameSessionTitle(sessionID, title);

Try / catch

try { await store.renameSessionTitle(sessionID, title); } catch (e) { if (e.message.includes('error_session_name_required')) { setRenameError(t('app.error_session_name_required')); } else { throw e; } }

Prevention

When it happens

Trigger: Calling renameSessionTitle(sessionID, title) with title = '' or a string of only whitespace (e.g. the user cleared the rename input and pressed Enter).

Common situations: Rename dialog allowing an empty submit; programmatic rename from an automation with an unset title variable; pasting only spaces or invisible characters into the rename field.

Understand the failure class

Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.

Related errors


AI-assisted analysis of different-ai/openwork@2b7df46e8a (2026-09-01). Data as JSON: /api/errors/90cd00c7866b2f83. Report an issue: GitHub.