different-ai/openwork · warning

extensions.add_instructions_required

extensions.add_instructions_required

Error message

extensions.add_instructions_required

What it means

For library kinds other than 'mcp' and 'plugin', createLibraryItem also requires instructions (usage/content). If input.instructions trims to empty, the localized message t('extensions.add_instructions_required') is thrown.

Source

Thrown at apps/app/src/react-app/domains/settings/state/extensions-store.ts:2257

    kind: LibraryAuthorableKind,
    input: CreateLibraryItemInput,
  ): Promise<string> {
    const description = input.description.trim();
    const instructions = input.instructions.trim();
    const drafts = input.components?.filter((component) => component.name.trim() && component.content.trim()) ?? [];
    if (!input.name.trim()) {
      throw new Error(t("extensions.add_name_required"));
    }
    if (kind === "mcp") {
      if (!instructions) {
        throw new Error(t("extensions.add_mcp_url_required"));
      }
    } else if (kind !== "plugin") {
      if (!description) {
        throw new Error(t("extensions.add_description_required"));
      }
      if (!instructions) {
        throw new Error(t("extensions.add_instructions_required"));
      }
    }
    if (kind === "plugin" && drafts.length === 0) {
      throw new Error(t("extensions.add_plugin_component_required"));
    }

    const settings = readDenSettings();
    const token = settings.authToken?.trim() ?? "";
    const orgId = settings.activeOrgId?.trim() ?? "";
    if (!token || !orgId) {
      throw new Error(t("extensions.add_sign_in_required"));
    }
    const client = createDenClient({
      baseUrl: settings.baseUrl,
      token,
    });
    const body = denLibraryPluginCreateRequest(kind, {
      ...input,

View on GitHub (pinned to 2b7df46e8a)

Solutions

  1. Provide non-empty input.instructions before calling.
  2. Validate the instructions field in the form layer before submit.
  3. Check ordering: description is validated first, so if you see this error the description was fine but the body is missing.

Example fix

// before
await createLibraryItem('agent', { name: 'a', description: 'd', instructions: '  ' });
// after
const instructions = form.instructions.trim();
if (!instructions) { showFieldError('instructions', t('extensions.add_instructions_required')); return; }
await createLibraryItem('agent', { ...form, instructions });
Defensive patterns

Strategy: validation

Validate before calling

if (kind !== 'mcp' && kind !== 'plugin' && !input.instructions.trim()) {
  showFieldError('instructions', t('extensions.add_instructions_required')); return;
}

Try / catch

try {
  await createLibraryItem(kind, input);
} catch (e) {
  if (e instanceof Error && e.message === t('extensions.add_instructions_required')) {
    showFieldError('instructions', e.message);
  } else throw e;
}

Prevention

When it happens

Trigger: Calling createLibraryItem(kind, input) where kind is neither 'mcp' nor 'plugin' and input.instructions is empty or whitespace-only (after description already passed validation).

Common situations: Submitting the add form without writing the body/instructions; programmatic creation of skill/command entries with metadata only; a form reset leaving the instructions textarea empty while other fields persisted.

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/b3365cfe56258a9e. Report an issue: GitHub.