feat: Add issue relations support (blocks, related, duplicate, similar)#24
Open
ralfschimmel wants to merge 1 commit intoczottmann:mainfrom
Open
feat: Add issue relations support (blocks, related, duplicate, similar)#24ralfschimmel wants to merge 1 commit intoczottmann:mainfrom
ralfschimmel wants to merge 1 commit intoczottmann:mainfrom
Conversation
Add support for managing issue relationships through a new `issues relations` subcommand group. This enables tracking dependencies between issues, which is essential for AI agents that need to understand task ordering and blockers. New commands: - `issues relations list <issueId>` - List all relations for an issue - `issues relations add <issueId> --blocks|--related|--duplicate|--similar <ids>` - `issues relations remove <relationId>` - Remove a relation by UUID Features: - Support for all Linear relation types: blocks, related, duplicate, similar - Comma-separated IDs for adding multiple relations at once - Human-friendly ID resolution (TEAM-123 format) - Relations included in `issues read` output - Both outgoing and inverse relations combined in output Technical details: - Optimized GraphQL queries with new ISSUE_RELATIONS_FRAGMENT - Proper validation for null/undefined nested relation data - UUID validation for relation removal - Partial success reporting when batch relation creation fails - Comprehensive unit tests (23 tests) and integration tests 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
iamfj
approved these changes
Feb 2, 2026
iamfj
left a comment
There was a problem hiding this comment.
This aligns well with the Linear GraphQL spec and keeps the CLI consistent with the underlying API—great call on streamlining the supported options!
Everything looks well-implemented and clean.
LGTM 🚀
Thanks for the thoughtful work on this!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why Issue Relations Matter for AI Agents
When AI agents work on complex projects, understanding task dependencies is critical. An agent needs to know:
Without visibility into these relationships, agents make suboptimal decisions—starting blocked work, missing related context, or duplicating effort. Linearis, being designed for LLM agents, should expose this relationship data to enable smarter task planning and execution.
Summary
This PR adds comprehensive issue relations support through a new
issues relationssubcommand group:linearis issues relations list ABC-123linearis issues relations add ABC-123 --blocks DEF-456,DEF-789linearis issues relations remove <relation-uuid>All four Linear relation types are supported:
--blocks- This issue blocks the specified issues--related- General relationship between issues--duplicate- This issue is a duplicate of another--similar- Similar issues (note: typically AI-generated by Linear)Relations are also now included in
issues readoutput, giving agents complete context when examining an issue.Example Usage
Output Format
{ "issueId": "550e8400-e29b-12d3-a456-426614174000", "identifier": "ABC-123", "relations": [ { "id": "660e8400-e29b-12d3-a456-426614174001", "type": "blocks", "issue": {"id": "...", "identifier": "ABC-123", "title": "Parent task"}, "relatedIssue": {"id": "...", "identifier": "DEF-456", "title": "Blocked task"}, "createdAt": "2025-01-15T10:30:00.000Z" } ] }Technical Implementation
ISSUE_RELATIONS_FRAGMENTin GraphQL queries fetching bothrelationsandinverseRelationsLinearIssueRelationTypeScript interface for type safety_options: unknownwith explanatory comments)Test Plan
🤖 Generated with Claude Code