The Linear backend allows orch to use Linear issues as the source of tasks for agents. This is ideal for teams using Linear for project management.
- Issues come from Linear
- Integrates with Linear's workflow states
- Supports Linear's rich issue format
- Agents can update issue status automatically
- Links PRs to Linear issues
Note: The Linear backend is currently in development. Some features described here may not be fully implemented yet.
# .orch/config.yaml
issues:
backend: linear
linear:
team_id: YOUR_TEAM_ID
api_key: ${LINEAR_API_KEY}Set your Linear API key:
export LINEAR_API_KEY=lin_api_xxxxxxxxxxxxxTo get an API key:
- Go to Linear Settings → API
- Create a new Personal API Key
- Copy the key
# Use the issue identifier (e.g., ENG-123)
orch run ENG-123
# Or use the issue UUID
orch run 550e8400-e29b-41d4-a716-446655440000# List issues from your team
orch issue list
# Filter by state
orch issue list --status "In Progress"
# Filter by label
orch issue list --label bugMap Linear states to orch statuses:
linear:
team_id: YOUR_TEAM_ID
states:
# Linear state → orch behavior
"Backlog": ignore # Don't show in orch issue list
"Todo": ready # Ready for agents
"In Progress": running # Has active run
"In Review": pr_open # PR created
"Done": done # Completedlinear:
team_id: YOUR_TEAM_ID
auto_update_state: true
state_transitions:
on_run_start: "In Progress"
on_pr_created: "In Review"
on_done: "Done"Linear issues are converted to a standard format for agents:
# ENG-123: Fix authentication bug
## Description
Users can't log in after password reset.
## Labels
- bug
- auth
## Priority
High
## Acceptance Criteria
(From Linear sub-issues or checklist)
- [ ] Fix password reset flow
- [ ] Add testsFilter issues by project or cycle:
linear:
team_id: YOUR_TEAM_ID
filter:
project: "Q1 Goals"
cycle: current # "current", "next", or specific cycle IDPost updates to Linear issues:
linear:
team_id: YOUR_TEAM_ID
comments:
enabled: true
on_start: true
on_waiting: true
on_complete: true
include_run_link: trueExample comment:
🤖 orch run started
Run ID: 20260120-163045
Agent: claude
Branch: issue/ENG-123/run-20260120-163045
View run: [link to local run file]
Linear attachments are downloaded and included in the agent context:
linear:
team_id: YOUR_TEAM_ID
attachments:
download: true
max_size_mb: 10
include_images: trueHandle Linear sub-issues:
linear:
team_id: YOUR_TEAM_ID
sub_issues:
include_in_prompt: true # Add sub-issues to agent prompt
mark_complete: true # Mark sub-issues done when checkedUse Linear labels to control which issues agents can work on:
linear:
team_id: YOUR_TEAM_ID
filter:
labels:
include:
- "agent-ready"
exclude:
- "manual-only"
- "blocked"Run logs are stored locally (same as file backend):
.orch/
├── config.yaml
├── daemon.log
└── runs/
└── ENG-123/
└── 20260120-163045.md
Create Linear issue templates with agent-friendly structure:
- Clear description
- Explicit acceptance criteria
- Technical context in description
- Appropriate labels
Configure your Linear workflow to include agent-specific states:
Backlog → Ready for Agent → In Progress → In Review → Done
Use consistent labels:
agent-ready- Issue is ready for agentsagent-blocked- Agent needs helpagent-complete- Agent finished work
- Requires network access to Linear
- Subject to Linear API rate limits
- Some Linear features (relations, SLA) not fully supported
- No offline access to issues
# Verify API key is set
echo $LINEAR_API_KEY
# Test API access
curl -H "Authorization: $LINEAR_API_KEY" \
https://api.linear.app/graphql \
-d '{"query": "{ viewer { id } }"}'Ensure the team ID is correct:
# List your teams
curl -H "Authorization: $LINEAR_API_KEY" \
https://api.linear.app/graphql \
-d '{"query": "{ teams { nodes { id name } } }"}'Check:
- Issue identifier is correct (e.g.,
ENG-123not123) - Issue belongs to configured team
- Issue is not archived