stablyai/orca · error · RuntimeClientError
invalid_argument
invalid_argument
Error message
--type must be blocks, blocked-by, related, or duplicate-of
What it means
Thrown by parseRelationship in linear-relation-write.ts when --type is not one of the four supported relationship kinds. The handler maps the CLI token to Linear's internal relationship enum: blocks->blocks, blocked-by->blockedBy, related->relatedTo, duplicate-of->duplicateOf. Any token not in that map yields invalid_argument.
Source
Thrown at src/cli/handlers/linear-relation-write.ts:40
}
const response = await client.call<LinearIssueRelationWriteResult>(
'linear.issueRelationWrite',
request,
{ timeoutMs: LINEAR_WRITE_TIMEOUT_MS }
)
printResult(response, json, formatLinearRelationWrite)
}
}
function parseRelationship(value: string): LinearIssueRelationship {
const relationship = {
blocks: 'blocks',
'blocked-by': 'blockedBy',
related: 'relatedTo',
'duplicate-of': 'duplicateOf'
}[value]
if (!relationship) {
throw new RuntimeClientError(
'invalid_argument',
'--type must be blocks, blocked-by, related, or duplicate-of'
)
}
return relationship as LinearIssueRelationship
}
View on GitHub (pinned to 1136503c6a)
Solutions
- Use one of the exact CLI tokens: blocks, blocked-by, related, or duplicate-of.
- Remember the CLI uses kebab-case tokens, not the camelCase Linear API enum names.
- Check the command help for the accepted --type values.
Example fix
// before orca linear relation create --type blockedBy --from XYZ-1 --to XYZ-2 // after orca linear relation create --type blocked-by --from XYZ-1 --to XYZ-2
Defensive patterns
Strategy: validation
Validate before calling
const RELATIONSHIP_TOKENS = new Set(['blocks', 'blocked-by', 'related', 'duplicate-of']);
if (!RELATIONSHIP_TOKENS.has(typeToken)) {
throw new Error(`--type '${typeToken}' is invalid; use blocks, blocked-by, related, or duplicate-of`);
} Type guard
function isLinearRelationType(value: unknown): value is 'blocks' | 'blocked-by' | 'related' | 'duplicate-of' {
return value === 'blocks' || value === 'blocked-by' || value === 'related' || value === 'duplicate-of';
} Prevention
- Use the kebab-case CLI tokens, not the camelCase Linear enum names.
- Cross-check the accepted tokens against the command help.
When it happens
Trigger: Passing --type with a value like 'blocks-by', 'related-to', 'duplicate', 'parent', 'subtask', or any token not exactly matching blocks/blocked-by/related/duplicate-of.
Common situations: Using the internal Linear enum name (e.g. 'blockedBy') instead of the CLI token; using a synonym ('duplicates'); typos; hyphen placement mistakes.
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/60bcc688954bc7be.
Report an issue: GitHub.