{"record":{"id":"0b3b272921542984","repo":"stablyai/orca","slug":"invalid-argument-0b3b27","errorCode":"invalid_argument","errorMessage":"Use either --parent or --parent-current, not both","messagePattern":"Use either --parent or --parent-current, not both","errorType":"exception","errorClass":"RuntimeClientError","httpStatus":null,"severity":"error","filePath":"src/cli/handlers/linear.ts","lineNumber":246,"sourceCode":"  },\n  'linear attach': async ({ flags, client, cwd, json }) => {\n    const request: LinearAttachRequest = {\n      ...buildWriteTargetRequest(flags, cwd, client.isRemote),\n      url: getHttpUrlFlag(flags, 'url'),\n      title: getOptionalStringFlag(flags, 'title'),\n      writeId: getOptionalWriteId(flags)\n    }\n    const response = await client.call<LinearAttachResult>('linear.issueAttachLink', request, {\n      timeoutMs: LINEAR_WRITE_TIMEOUT_MS\n    })\n    printResult(response, json, formatLinearAttach)\n  },\n  'linear create': async ({ flags, client, cwd, json }) => {\n    rejectAllWorkspaceForWrite(flags)\n    const parentInput = getOptionalStringFlag(flags, 'parent')\n    const parentCurrent = flags.get('parent-current') === true\n    if (parentInput && parentCurrent) {\n      throw new RuntimeClientError(\n        'invalid_argument',\n        'Use either --parent or --parent-current, not both'\n      )\n    }\n    const body = await readLinearBody(flags, cwd, { required: false })\n    const request: LinearCreateRequest = {\n      title: getRequiredStringFlag(flags, 'title'),\n      ...(body !== undefined ? { body } : {}),\n      teamInput: getOptionalStringFlag(flags, 'team'),\n      projectInput: getOptionalStringFlag(flags, 'project'),\n      state: getOptionalStringFlag(flags, 'state'),\n      assignee: getOptionalStringFlag(flags, 'assignee'),\n      priority: flags.has('priority') ? getPriorityFlag(flags, 'priority') : undefined,\n      estimate: flags.has('estimate')\n        ? getRequiredNonNegativeIntegerFlag(flags, 'estimate')\n        : undefined,\n      dueDate: flags.has('due-date') ? getDueDateFlag(flags, 'due-date') : undefined,\n      labels: getRepeatedStringFlag(flags, 'label'),","sourceCodeStart":228,"sourceCodeEnd":264,"githubUrl":"https://github.com/stablyai/orca/blob/1136503c6a231a16dce8f921f6fadb63d181e8db/src/cli/handlers/linear.ts#L228-L264","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Use only one: either --parent <issue-id> or --parent-current, never both.","In scripts, make the two mutually exclusive with an if/else so only one flag is appended.","If you want explicit control, prefer --parent <id> and drop --parent-current."],"exampleFix":"// before\norca linear create --title \"Sub\" --parent XYZ-1 --parent-current\n// after\norca linear create --title \"Sub\" --parent XYZ-1\n// or\norca linear create --title \"Sub\" --parent-current","handlingStrategy":"validation","validationCode":"const parentInput = typeof flags.get('parent') === 'string' ? flags.get('parent') as string : null;\nconst parentCurrent = flags.get('parent-current') === true;\nif (parentInput && parentCurrent) {\n  throw new Error('Use either --parent or --parent-current, not both');\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Make --parent and --parent-current mutually exclusive in wrapper scripts.","Prefer --parent <id> for explicit, deterministic parent selection."],"tags":["cli","linear","argument-validation","mutual-exclusion","parent"],"backgroundTag":null,"analyzedSha":"1136503c6a231a16dce8f921f6fadb63d181e8db","analyzedAt":"2026-08-12T23:15:58.167Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}