Est.

Wiring Linear and GitHub Issues to Claude Code so Every Closed Ticket Becomes a Pull Request

Three architectures turn tickets into reviewable PRs without laptops.

· 9 min read
Cover illustration for “Wiring Linear and GitHub Issues to Claude Code so Every Closed Ticket Becomes a Pull Request”
Cloud Agent Environments · November 12, 2026 · 9 min read · 1,943 words

Running Claude Code in the cloud turns ticket-to-PR work into an engineering loop. GitHub-hosted runners support event-driven execution without infrastructure management, while Linear coding sessions provide a native route for eligible teams with GitHub connected. Both routes need a defined trigger, an isolated session for each issue, and a pull request that a human can review and approve before merge.

Why wiring a ticket to a pull request is an engineering problem, not a prompt problem

Teams already using Linear and GitHub have the ticket and the repository, but not necessarily the mechanism connecting them. An agent may make a change without getting that work ready for review. A stronger prompt cannot make a laptop session available when nobody is at the keyboard, separate two issues sharing a session, or turn an abandoned diff into a pull request.

These are three distinct failure modes. The trigger starts work without a developer present, isolation keeps one issue’s work from contaminating another, and the output contract makes the result reviewable. Solving them in that order produces a loop that can support parallel work instead of a sequence of manually supervised coding sessions.

How Linear and GitHub each expose a trigger Claude Code can act on

Linear exposes coding sessions using Claude Code or Codex on Business and Enterprise plans once GitHub is connected. Those sessions draw from AI credits. Automation rules on those plans can respond to an issue moving to a specified status with a specified label. An agent-labelled issue moving into Todo, for example, can trigger workspace creation. That gives ticket state a direct role in starting execution.

GitHub exposes a different set of events through the Claude GitHub Action. Mention-based triggers can respond to @claude in an issue or PR comment, a pull request review, or the title or body of a newly opened issue. Assignment to a configured user and application of an issue label provide the other trigger patterns. These events need not mean that implementation is finished. They identify when work should begin.

The Action requires the Claude GitHub App, an authentication secret, and a committed workflow file. Setup is per repository by default. However, the App and authentication secret can be configured at organization level, and an organization-level Actions secret can serve repositories without separate credential management. Authentication can use an API key or a long-lived OAuth token created with claude setup-token, which bills the subscription.

Three architectures for the ticket-to-PR loop, and when each one fits

The architectural choice depends on who starts the agent, where execution happens, and who needs to watch it. A difficult ticket requiring continuous developer steering has different needs from a triage queue that a product manager should be able to dispatch. Three architectures address those differences.

The MCP connector with a local session is the supervised, developer-initiated option. A developer opens Claude Code and asks it to read SIN-412 and implement it through the Linear MCP connector. Claude works in the developer’s checkout and branch, where the developer can see and check uncommitted changes before commit. With the appropriate session configuration, it can also comment on the issue or change its status through the connector. Work stops when the laptop closes, and a product manager cannot start the session on their own.

The Claude GitHub Action is the event-driven, cloud-runner option. A repository workflow listens for mentions, labels, or assignment events and runs Claude on a GitHub-hosted runner without a developer present. A second workflow can start a review pass when a new PR opens. This fits GitHub-first teams that want to automate work without managing the infrastructure it runs on. The maintenance cost is repository workflow files that must stay synchronized as the Action version changes, although an organization-level secret reduces credential sprawl.

The webhook → Lambda → Scheduled Task API path is the fully automated, Linear-initiated option. It offers the most hands-off operation and requires the most setup, including cloud infrastructure for the intermediary function. Before calling the agent API, the function must perform the idempotency step of swapping the triggering label to claude-building. The agent then comments with its session URL, implements on claude/<ISSUE-ID>, follows CLAUDE.md, runs tests, and posts a summary. Ambiguity stops the work with needs-info rather than a guess, making this architecture suitable for product-manager or triage-rule initiation without developer action.

Isolation requirements that keep parallel agent runs from colliding

Parallel execution requires one branch and one agent session per issue. A conversation about issue 142 must not leak into issue 143. The branch convention claude/<ISSUE-ID> provides traceability, while separate sessions keep issue context distinct. Neither protection substitutes for the other. Branch isolation separates changes, whereas session isolation separates the instructions and discussion guiding them.

Git worktrees provide separate branches and directories on one machine, but they do not prevent overlapping edits. If issues 142 and 143 both modify export.ts, the second PR to merge will have a conflict to resolve, just as with two developers. Before dispatch, teams should filter issues by area or assignee and keep parallel batches to non-overlapping file scopes. Separate workspaces do not eliminate coordination.

Cloud VM isolation adds a boundary around execution itself. Each session runs in its own Linux VM, preventing a crashed or runaway session from affecting a sibling’s filesystem, credentials, or network state. Duplicate dispatch needs its own protection, however. Webhook delivery is at-least-once, so the label swap must guard against concurrent starts for the same issue, and the task instructions must be safe to run twice. Linear status automation then makes the work visible by moving the issue to In Progress when execution starts and In Review when the PR opens.

Guardrails that make every agent output a reviewable pull request

A pull request is the output contract. An uncommitted diff leaves the loop unfinished, while a direct change to the default branch bypasses its control point. The agent must commit to a named branch and open a PR before the session ends. Its description must explain the change and identify unresolved questions. When ambiguity prevents safe implementation, the agent must stop and surface needs-info rather than invent an answer to satisfy the output requirement.

Standing instructions make that contract repeatable across tickets. CLAUDE.md should hold team conventions, test-run requirements, and style rules so each session starts with the same constraints. Turn limits bound the execution time in agent steps. A session reaching its limit must surface for human review.

CI supplies a second gate after generation. The Action’s review workflow can inspect each new PR, and Claude Code’s web variant can respond automatically to CI failures and review comments when auto-fix is enabled. A named human reviewer must check the work before merge.

How to run Claude Code in the cloud instead of on developer laptops

Moving execution off laptops makes the loop available to the team, automation, and scheduled runs. Cloud sessions can persist through local network interruptions and machine sleep. A product manager or triage rule can start work without a developer present, and credentials and model keys stay in the cloud environment. Parallel sessions also run without fighting for the resources of one developer’s machine. Execution no longer depends on an open laptop.

For teams that do not want to manage infrastructure, the GitHub Action places execution on GitHub-hosted runners. Linear’s native coding sessions offer another route for eligible workspaces with GitHub connected. The choice is between consuming hosted execution and taking responsibility for the machines or containers where the agent runs.

Claude Code 2.1.224, shipped August 7, 2026, added self-hosted runners through claude self-hosted-runner on Team and Enterprise plans. These runners execute sessions on a team’s own machines or containers, an alternative to Anthropic’s hosted infrastructure. George Jacob, senior engineering manager at Faire, described self-hosted environments generating PRs, fixing CI issues, and responding to developer workflow events with compute that scales on demand. With this model, the team keeps security controls and control over how sessions run in its own environment. It also leaves infrastructure ownership with the team.

Security and credential controls the loop requires before it touches production code

An agent opening PRs against production repositories has write access to production code, even when humans control merging. Its credentials must reflect that responsibility. The GitHub token should have only the permissions needed to open a PR against the target repository. It belongs in an Actions secret or the cloud environment, never in a prompt. Centralized secret management does not justify broader permissions.

Repository configuration introduces a separate trust boundary. CVE-2025-59536, rated CVSS 8.7, concerns code injection through malicious project configuration files using pre-trust hook or MCP execution. Validating the sources of CLAUDE.md and project configuration before a session starts addresses that entry point. Instructions are not automatically trustworthy because they accompany code.

CVE-2026-21852 concerns traffic redirection through a malicious .claude/settings.json file that sets ANTHROPIC_BASE_URL to an attacker-controlled endpoint. Cloud VM environment variables should thus be locked so users cannot set them through inputs they control. Per-session VM isolation limits the damage a compromised session can do by keeping it apart from other sessions and the host filesystem. It does not replace configuration controls. The platform should also have audit logs and SCIM, and teams should check that their intended plan includes them before giving it repository access.

What the review queue looks like when agents are shipping PRs in parallel

More agents can produce more PRs without increasing the team’s capacity to verify them. The queue therefore needs triage, contextual review, and clear ownership. Each PR an agent opens needs a named human reviewer before it enters that queue.

Automated review can provide the first pass. CodeRabbit launched code graph analysis in 2025, combining dependency graphs with semantic search and MCP integration. It can pull context from Slack threads, Confluence pages, Datadog dashboards, and Sentry error reports. That context allows review to connect a code change with information beyond the diff, such as an incident affecting the payment retry path. It helps humans check the work, and they still have to approve it.

Linear’s GitHub integration also changes where reviewers work. Its native diff view and guided reviews organize changes semantically, while comments, checks, and review activity synchronize bi-directionally with GitHub. A reviewer can approve without leaving Linear. This keeps ticket context and code review in the same workflow, but it does not remove the need to judge the change. The operational task is to keep generated work moving through verification at a pace reviewers can sustain.

Choosing where to start: the decision that determines how much you build

The starting point should close the loop with the least infrastructure the team must build and maintain. For Linear Business or Enterprise teams with GitHub connected, that means enabling native coding sessions in Linear settings. This route does not require the team to create a workflow file, Lambda function, or cloud VM. Usage draws from AI credits.

For a GitHub-first team, the starting configuration is the Claude GitHub App, an organization-level Actions secret, and committed claude.yml and claude-code-review.yml files. Label or mention triggers then dispatch work on GitHub-hosted runners. Teams that need work to start fully automatically through a Linear webhook need the intermediary function and agent API path instead. That choice includes responsibility for idempotency, at-least-once delivery, and hosting the function.

Rakuten reported that time to market for new features fell from many weeks to days. Max Charas, Senior Staff Engineer, attributed the change to agents executing at a pace that had not previously been possible. The starting architecture can vary, but its acceptance criteria cannot. Each issue needs its own branch and session, each completed implementation needs a reviewable PR, and every merge needs a named human reviewer.

Sources

  1. GitHub Integration

More in Cloud Agent Environments