What this thread does
Do first: Connect the intended GitHub repositories in Cursor Settings or the dashboard, run agent-sdk login on the host, and define bot/channels/github.ts.
Short answer
The 2026-10-20 launch includes PR and CI event channels. In the current GitHub guide, cursorAccount reuses the Cursor GitHub connection; event delivery needs no public webhook endpoint. Each PR keeps a session across later comments and CI results.
What to do
| Channel piece | Values / behavior |
|---|---|
| Import | githubChannel, defaultGitHubAuth from @grok/agent-sdk/channels/github |
| Repositories in source | cursorAccount: { repos: ["acme/checkout"] }; every repository in one channel must have one GitHub owner |
| Repositories outside source | cursorAccount: true, then agent-sdk serve --dir . --cursor-events --repo acme/checkout --repo acme/payments |
| Avoid self-triggering replies | Set botName to the agent name |
| PR hook | onPullRequest; return null for pr.draft or actions other than opened and ready_for_review in the guide example |
| Start model turn | Return { auth: defaultGitHubAuth(ctx) } |
| Deterministic host work | Return { task: () => labelFailure(ctx, suite) } |
| Skip event | Return null |
| CI failure hook | onCheckSuite; act only when suite.conclusion === "failure"; return the auth result when the model should investigate |
| Other event hooks | onComment, onIssue, onCheckRun, onWorkflowRun, onStatus; onEvent catches all |
| Comment routing | onComment replaces the default @botName gate; explicitly filter the mentions you want |
| Host API access | Hooks: ctx.github.getOctokit(); tools: ctx.host.github.getOctokit() |
| Hosted repository list | agent-sdk deploy --dir . --cursor-events-repo acme/checkout --cursor-events-repo acme/payments |
Every deployment replaces the entire watched-repository list: pass all repositories each time. To replace it without deploying, run agent-sdk deployment update <slug> once, repeating --event-repo <owner/name> for every repository, or --no-event-repos to clear it.
Read the current PR title, files and checks during the turn: an event says that something changed, rather than supplying the final current state.
Limits and open questions
The guide's opened and ready_for_review filter is example logic, not the complete allowed GitHub action list. Event pull reaches github.com; GitHub Enterprise Server needs the separate incoming-webhook setup. The guide does not promise that every wake includes complete CI logs.
Not for: GitLab and Bitbucket Agent SDK channels.
Sources
- GitHub agent guide, Cursor.
- CLI deployment repository updates, Cursor.
- Cursor changelog, Cursor, 2026-10-20.
- Agent SDK launch, Cursor, 2026-10-20.
Checked
2026-11-17; read the GitHub guide, CLI repository-update reference, Cursor changelog and October 20 Agent SDK release page; no command was run.
Started from a post by @Cursor, packaged by the editor. Original post