The GitHub backend allows orch to use GitHub Issues as the source of tasks for agents. This is ideal for teams already using GitHub for issue tracking.
- Issues come from GitHub Issues
- No local issue files needed
- Integrates with your existing workflow
- Agents can reference and update GitHub issues
- Pull requests automatically link to issues
# .orch/config.yaml
issues:
backend: github
github:
owner: your-org
repo: your-repo
poll_interval: 300 # Check for updates every 5 minutesThe GitHub backend uses the gh CLI for authentication. Ensure you're logged in:
# Login to GitHub
gh auth login
# Verify authentication
gh auth statusAlternatively, set a personal access token:
export GITHUB_TOKEN=ghp_your_token_hereRequired token permissions:
repo- Full repository accessread:org- Read organization data (if using org repos)
# Use the issue number
orch run 42
# Or the full issue reference
orch run my-org/my-repo#42# List open issues
orch issue list
# Filter by label
orch issue list --label bug
# Filter by assignee
orch issue list --assignee @meorch run 42fetches issue #42 from GitHub- Creates a worktree and branch as usual
- Agent works on the issue
- When agent creates a PR, it references the issue
- Run status updates can optionally be posted as comments
You can use labels to organize and filter issues:
# Run issues with specific label
orch run --label orch-ready 42Configure auto-labels in config:
github:
owner: my-org
repo: my-repo
labels:
ready: "orch:ready" # Issues ready for agents
in_progress: "orch:wip" # Issue has active run
done: "orch:done" # Completed by agentWhen an agent creates a PR:
- PR description references the issue:
Closes #42 - Run status links to the PR
- Issue can be auto-closed when PR merges
Configure PR behavior:
github:
owner: my-org
repo: my-repo
pr:
auto_link: true # Link PR to issue
auto_close: true # Close issue on PR merge
target_branch: main # Default PR targetOptionally post run status as issue comments:
github:
owner: my-org
repo: my-repo
comments:
enabled: true
on_start: true # Comment when run starts
on_waiting: true # Comment when input needed
on_complete: true # Comment with resultsExample comment:
🤖 **orch run started**
- Run ID: `20260120-163045`
- Agent: claude
- Branch: `issue/42/run-20260120-163045`
Status: runninggithub:
owner: my-org
repo: my-repo
filter:
labels:
- bug
- enhancement
exclude_labels:
- wontfix
- duplicategithub:
filter:
milestone: "v2.0"github:
filter:
assignee: "@me" # Issues assigned to authenticated userEven with GitHub backend, run logs are stored locally:
.orch/
├── config.yaml
├── daemon.log
└── runs/
└── 42/
└── 20260120-163045.md
This ensures:
- Fast access to run history
- Offline access to logs
- No GitHub API limits for log access
Use GitHub for issues but local files for additional context:
issues:
backend: github
local_context: ./context/ # Additional local markdown files
github:
owner: my-org
repo: my-repoLocal context files can be referenced in issue prompts but aren't synced to GitHub.
Create GitHub issue templates that work well with agents:
<!-- .github/ISSUE_TEMPLATE/agent-task.md -->
---
name: Agent Task
about: Task for orch agents
labels: orch:ready
---
## Summary
<!-- Brief description -->
## Requirements
<!-- Specific requirements -->
## Acceptance Criteria
- [ ] Criterion 1
- [ ] Criterion 2
## Technical Notes
<!-- Implementation hints for the agent -->Configure branch protection to require:
- PR reviews before merge
- Status checks passing
- Up-to-date branches
This ensures agent PRs go through proper review.
Combine with Slack notifications:
github:
owner: my-org
repo: my-repo
slack:
enabled: true
webhook_url: ${SLACK_WEBHOOK}
notify_on:
- waiting- Requires network access to GitHub
- Subject to GitHub API rate limits
- Issue content limited to GitHub's format
- No offline issue creation
# Re-authenticate
gh auth login
# Check current status
gh auth statusIf you hit rate limits:
github:
poll_interval: 600 # Reduce polling frequencyEnsure:
- Issue number is correct
- You have access to the repository
- Issue is not a pull request (PRs have different IDs)
# Verify issue exists
gh issue view 42 --repo my-org/my-repo