stablyai/orca · error · RuntimeClientError
invalid_argument
invalid_argument
Error message
--priority must be between 0 and 4
What it means
Thrown by the linear list-issues handler when --priority is provided and is a non-negative integer greater than 4. Priority is parsed via getOptionalNonNegativeIntegerFlag (which already rejects negatives and non-integers), then an upper-bound check rejects anything above 4. Linear priorities are 0 (lowest) through 4 (highest).
Source
Thrown at src/cli/handlers/linear-list-issues.ts:18
import type {
LinearMcpIssueListRequest,
LinearMcpIssueListResult
} from '../../shared/linear-agent-access'
import type { CommandHandler } from '../dispatch'
import {
getOptionalNonNegativeIntegerFlag,
getOptionalPositiveIntegerFlag,
getOptionalStringFlag
} from '../flags'
import { printResult } from '../format'
import { formatLinearMcpIssueList, printLinearMcpIssueListWarnings } from '../linear-format'
import { RuntimeClientError } from '../runtime-client'
export const runLinearListIssues: CommandHandler = async ({ flags, client, json }) => {
const priority = getOptionalNonNegativeIntegerFlag(flags, 'priority')
if (priority !== undefined && priority > 4) {
throw new RuntimeClientError('invalid_argument', '--priority must be between 0 and 4')
}
const request: LinearMcpIssueListRequest = {
team: getOptionalStringFlag(flags, 'team'),
cycle: getOptionalStringFlag(flags, 'cycle'),
label: getOptionalStringFlag(flags, 'label'),
limit: getOptionalPositiveIntegerFlag(flags, 'limit'),
query: getOptionalStringFlag(flags, 'query'),
state: getOptionalStringFlag(flags, 'state'),
cursor: getOptionalStringFlag(flags, 'cursor'),
orderBy: getOrderBy(flags),
project: getOptionalStringFlag(flags, 'project'),
release: getOptionalStringFlag(flags, 'release'),
assignee: getOptionalStringFlag(flags, 'assignee'),
delegate: getOptionalStringFlag(flags, 'delegate'),
parentId: getOptionalStringFlag(flags, 'parent-id'),
priority,
createdAt: getOptionalStringFlag(flags, 'created-at'),
updatedAt: getOptionalStringFlag(flags, 'updated-at'),View on GitHub (pinned to 1136503c6a)
Solutions
- Use a priority value between 0 and 4 inclusive.
- Map any higher-scale priority down to Linear's 0-4 range before passing it.
- Omit --priority to list issues across all priorities.
Example fix
// before orca linear list-issues --priority 9 // after orca linear list-issues --priority 4
Defensive patterns
Strategy: validation
Validate before calling
function priorityInRange(p: number | undefined): boolean {
return p === undefined || (Number.isInteger(p) && p >= 0 && p <= 4);
} Type guard
function isLinearPriority(value: unknown): value is number {
return typeof value === 'number' && Number.isInteger(value) && value >= 0 && value <= 4;
} Prevention
- Remember Linear priorities run 0 (low) to 4 (high).
- Omit --priority to list issues across all priorities.
When it happens
Trigger: Passing --priority 5, --priority 9, or any integer > 4. The check is `priority !== undefined && priority > 4` after the non-negative-integer parse.
Common situations: Assuming a 1-10 priority scale; treating higher numbers as valid because the non-negative parser accepted them; migrating from a system with a wider priority range.
Related errors
- invalid_argument
- invalid_argument
- --baseline requires a path
- --candidate requires a path
- --title requires a value
AI-assisted analysis of stablyai/orca@1136503c6a (2026-08-12).
Data as JSON: /api/errors/1933c9df772ac761.
Report an issue: GitHub.