stablyai/orca · error · RuntimeClientError

invalid_argument

invalid_argument

Error message

Use either --parent or --parent-current, not both

What it means

Thrown by the 'linear create' handler when both --parent and --parent-current are supplied. These are two mutually exclusive ways to specify a parent issue: --parent takes an explicit issue id, while --parent-current uses the currently focused issue. Supplying both is ambiguous, so the CLI rejects the combination before building the request.

Source

Thrown at src/cli/handlers/linear.ts:246

  },
  'linear attach': async ({ flags, client, cwd, json }) => {
    const request: LinearAttachRequest = {
      ...buildWriteTargetRequest(flags, cwd, client.isRemote),
      url: getHttpUrlFlag(flags, 'url'),
      title: getOptionalStringFlag(flags, 'title'),
      writeId: getOptionalWriteId(flags)
    }
    const response = await client.call<LinearAttachResult>('linear.issueAttachLink', request, {
      timeoutMs: LINEAR_WRITE_TIMEOUT_MS
    })
    printResult(response, json, formatLinearAttach)
  },
  'linear create': async ({ flags, client, cwd, json }) => {
    rejectAllWorkspaceForWrite(flags)
    const parentInput = getOptionalStringFlag(flags, 'parent')
    const parentCurrent = flags.get('parent-current') === true
    if (parentInput && parentCurrent) {
      throw new RuntimeClientError(
        'invalid_argument',
        'Use either --parent or --parent-current, not both'
      )
    }
    const body = await readLinearBody(flags, cwd, { required: false })
    const request: LinearCreateRequest = {
      title: getRequiredStringFlag(flags, 'title'),
      ...(body !== undefined ? { body } : {}),
      teamInput: getOptionalStringFlag(flags, 'team'),
      projectInput: getOptionalStringFlag(flags, 'project'),
      state: getOptionalStringFlag(flags, 'state'),
      assignee: getOptionalStringFlag(flags, 'assignee'),
      priority: flags.has('priority') ? getPriorityFlag(flags, 'priority') : undefined,
      estimate: flags.has('estimate')
        ? getRequiredNonNegativeIntegerFlag(flags, 'estimate')
        : undefined,
      dueDate: flags.has('due-date') ? getDueDateFlag(flags, 'due-date') : undefined,
      labels: getRepeatedStringFlag(flags, 'label'),

View on GitHub (pinned to 1136503c6a)

Solutions

  1. Use only one: either --parent <issue-id> or --parent-current, never both.
  2. In scripts, make the two mutually exclusive with an if/else so only one flag is appended.
  3. If you want explicit control, prefer --parent <id> and drop --parent-current.

Example fix

// before
orca linear create --title "Sub" --parent XYZ-1 --parent-current
// after
orca linear create --title "Sub" --parent XYZ-1
// or
orca linear create --title "Sub" --parent-current
Defensive patterns

Strategy: validation

Validate before calling

const parentInput = typeof flags.get('parent') === 'string' ? flags.get('parent') as string : null;
const parentCurrent = flags.get('parent-current') === true;
if (parentInput && parentCurrent) {
  throw new Error('Use either --parent or --parent-current, not both');
}

Prevention

When it happens

Trigger: Passing both `--parent XYZ-1` and `--parent-current` on the same `linear create` invocation. The check is `if (parentInput && parentCurrent)` where parentInput comes from getOptionalStringFlag and parentCurrent from flags.get('parent-current') === true.

Common situations: Copy-pasting a command that had --parent and adding --parent-current (or vice versa); a script that always sets --parent and conditionally adds --parent-current without clearing the other; UI/wrapper that defaults both.

Related errors


AI-assisted analysis of stablyai/orca@1136503c6a (2026-08-12). Data as JSON: /api/errors/0b3b272921542984. Report an issue: GitHub.