今日已更新 55 条资讯 | 累计 24714 条内容
关于我们

From GitHub Issue to Pull Request: Running Claude Code Unattended

Serghei Iakovlev 2026年07月27日 23:42 0 次阅读 来源:Dev.to

You already run Claude Code by hand: copy issues into a prompt, watch it work, check the diff, and if something breaks halfway through, you restart it. This works fine for one task at a time, but it falls apart when you have 10 tasks simultaneously. Claude Code is good at handling routine engineering tasks: bug fixes, dependency bumps, and small features, when the prompt is clear and the task is scoped. But when it comes to scaling, you need an infrastructure with isolated workspaces, retry logic, state that survives a restart, and tracker integration, not to waste time on babysitting. Sortie removes the manual work. You label an issue, Sortie picks it up, creates an isolated workspace, runs the agent, retries it if it stalls, and opens a pull request when it's done. This article describes how to set the entire process from an empty directory to a GitHub issue turning into a PR without you touching the keyboard in between. What you need A GitHub repository you control Export two environment variables: ANTHROPIC_API_KEY - authenticates Claude Code GITHUB_TOKEN - it's read by tracker.api_key: $GITHUB_TOKEN for polling/updating issues, and it's the same token gh pr create inside the after_run hook uses to open the PR, so it needs Issues: read/write, Contents: read, and Pull requests: read/write scopes on that repository, all on one fine-grained PAT. Push access to the repository over SSH. The after_create hook below clones with git@github.com:... , so git authenticates with your SSH key, not with GITHUB_TOKEN . Verify with ssh -T git@github.com . If you'd rather stay on one credential, swap the clone URL for https://${GITHUB_TOKEN}@github.com/yourorg/yourrepo.git and give the token Contents: read/write. In your repository, create the agent-ready label — you need it to exist before you can put it on an issue, and query_filter finds nothing without it. Creating in-progress , review , and done up front is also worth doing: GitHub does create a missing label when Sortie ap

本文内容来源于互联网,版权归原作者所有
查看原文