{"record":{"id":"500f4e69cfd541c3","repo":"stablyai/orca","slug":"invalid-argument-500f4e","errorCode":"invalid_argument","errorMessage":"Pass either <id> or --current, not both","messagePattern":"Pass either <id> or --current, not both","errorType":"validation","errorClass":"RuntimeClientError","httpStatus":null,"severity":"error","filePath":"src/cli/linear-save-issue-request.ts","lineNumber":26,"sourceCode":"  buildLinearCurrentContext,\n  getDueDateFlag,\n  getOptionalWriteId,\n  getPriorityFlag,\n  readLinearBody,\n  rejectAllWorkspaceForWrite\n} from './linear-request-builders'\nimport { RuntimeClientError } from './runtime-client'\n\nexport async function buildSaveIssueRequest(\n  flags: Map<string, string | boolean>,\n  cwd: string,\n  remote: boolean\n): Promise<LinearSaveIssueRequest> {\n  rejectAllWorkspaceForWrite(flags)\n  const input = getOptionalStringFlag(flags, 'id')\n  const current = flags.get('current') === true\n  if (input && current) {\n    throw new RuntimeClientError('invalid_argument', 'Pass either <id> or --current, not both')\n  }\n  const body = await readLinearBody(flags, cwd, { required: false })\n  const description = getOptionalStringFlag(flags, 'description')\n  if (body !== undefined && description !== undefined) {\n    throw new RuntimeClientError('invalid_argument', 'Use either --description or --body, not both')\n  }\n  return {\n    input,\n    current,\n    workspaceId: getOptionalStringFlag(flags, 'workspace'),\n    context: buildLinearCurrentContext(cwd, remote),\n    team: getOptionalStringFlag(flags, 'team'),\n    title: getOptionalStringFlag(flags, 'title'),\n    description: description ?? body,\n    state: getOptionalStringFlag(flags, 'state'),\n    assignee: getNullableStringFlag(flags, 'assignee'),\n    priority: flags.has('priority') ? getPriorityFlag(flags, 'priority') : undefined,\n    estimate: getOptionalNullableNumberFlag(flags, 'estimate'),","sourceCodeStart":8,"sourceCodeEnd":44,"githubUrl":"https://github.com/stablyai/orca/blob/1136503c6a231a16dce8f921f6fadb63d181e8db/src/cli/linear-save-issue-request.ts#L8-L44","documentation":"Thrown by buildSaveIssueRequest (the save-issue-specific target resolver) when BOTH an explicit issue `<id>` AND `--current` are supplied. save-issue must target one issue; supplying both is ambiguous. This mirrors the buildWriteTargetRequest guard but lives in the save-issue builder because save-issue accepts additional fields (title, state, etc.).","triggerScenarios":"Running `linear save-issue LIN-123 --current ...` or any save-issue call where both `flags.get('id')` is truthy and `flags.get('current') === true`.","commonSituations":"Transitioning a script from id-based to context-based targeting and leaving the id in place. Aliases that inject `--current` unconditionally. Mistakenly believing `--current` is a modifier rather than an alternative target.","solutions":["Drop `--current` and keep `<id>` to update a known issue.","Or drop `<id>` and keep `--current` to save against the branch-linked issue.","Remove stray `--current` injection from aliases and wrapper scripts."],"exampleFix":"// before\nlinear save-issue LIN-123 --current --state \"In Progress\"\n// after\nlinear save-issue LIN-123 --state \"In Progress\"","handlingStrategy":"validation","validationCode":"const input = flags.get('id')\nconst current = flags.get('current') === true\nif (input && current) {\n  throw new Error('save-issue: pass either <id> or --current, not both')\n}","typeGuard":"function hasExactlyOneSaveIssueTarget(flags: Map<string, string | boolean>): boolean {\n  const hasId = Boolean(flags.get('id'))\n  const hasCurrent = flags.get('current') === true\n  return hasId !== hasCurrent\n}","tryCatchPattern":null,"preventionTips":["Standardize on one targeting mode per save-issue workflow.","Strip `--current` from aliases whenever an explicit id is passed."],"tags":["linear","cli","flag-validation","save-issue","write-target"],"backgroundTag":null,"analyzedSha":"1136503c6a231a16dce8f921f6fadb63d181e8db","analyzedAt":"2026-08-12T23:15:58.167Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}