Hands Off Development

Wiring Linear Tickets and Slack Threads Into a Cloud Agent Dispatch Loop That Returns Pull Requests

A scoped ticket, an isolated session, and a verified Draft PR.

· 9 min read
Cover illustration for “Wiring Linear Tickets and Slack Threads Into a Cloud Agent Dispatch Loop That Returns Pull Requests”
Cloud Agent Environments · November 9, 2026 · 9 min read · 1,966 words

A cloud coding agent runner with a bring-your-own API key needs both an execution environment and a dispatch loop that brings back reviewable pull requests. Managed cloud execution alone does not establish support for a team’s own OpenAI API key or one from another model provider. For Linear tickets and Slack threads, the engineering requirement is a closed path from a scoped work item to an isolated session, a verified Draft PR, and a result posted back to its origin.

Why the ticket-to-PR path is an engineering problem, not an integration one

Without an explicit completion path, an agent can leave its output in a chat thread, an abandoned branch, or a session that times out. Connectivity is not completion. The dispatch design must account for the work after the agent starts.

That design has four mandatory joints. A ticket or thread enters, an isolated agent session starts, a PR opens against the right branch, and the originating work item receives the result. A reviewable PR is the only valid delivery exit, while blocked or failing work remains unfinished. Background job-queue agents make this architecture practical because queuing a task and returning to a finished PR is now a normal interaction model.

Diagram: The Four Mandatory Joints of a Ticket-to-PR Dispatch Loop. Visualizes: Visualize the four-stage closed path that the article identifies as mandatory for a coding agent dispatch loop: (1) a ticket or thread enters, (2) an isolated agent…

What belongs in a Linear ticket before an agent can act on it

A ticket without a testable specification uses up an agent session before it is clear what counts as success. The missing information is usually concrete. The agent needs a scoped acceptance criterion, the files or modules it may change, and the branch or environment to target. Without those boundaries, it can overreach, deliver too little, or open a PR against the wrong base.

The practical response is to add these requirements to the ticket template. Its goal should fit in one sentence, followed by a reproducible failing test or observable behavior. The acceptance criterion should state what a passing test proves. Allowed paths define the change boundary. A pointer to the target branch completes the context needed for dispatch.

The same specification also serves as an admission gate. A ticket with an unresolved upstream dependency should be held, as should a database migration without a migration strategy or work in an off-limits area. The Coding Worker pattern reflects this distinction by reading dependencies and deciding implementability before opening any PR.

Turning a Slack thread into a dispatchable work item without creating a new workflow

An agent mention should first create a Linear ticket or select an existing one, then validate its specification against the same template. Once a session starts, the thread should receive the ticket URL and session ID. The thread becomes the status surface. The ticket remains the specification that reviewers can follow back from the PR.

Without that routing, a thread can produce code whose purpose is difficult to reconstruct. A PR may exist, but reviewers lack a linked work item and a clear account of why the change was requested. Ticket creation prevents that split at the entrance. It also makes chat-originated work subject to the same dependency and scope checks as planned work.

Cursor cloud agents support dispatch through an @cursor mention in Slack, with resulting PRs reviewable from mobile. Claude Code supports @Claude in Slack, while its routines can also start on schedules or GitHub events. These surfaces make chat dispatch practical, but they do not replace the specification gate. The added friction is deliberate. A thread that cannot become a scoped ticket is unlikely to lead to a reviewable PR.

How do you run Claude Code or Codex in the cloud without managing your own infrastructure?

Claude Code cloud sessions run in isolated Ubuntu 24.04 VMs managed by the provider and keep running after a laptop closes. They include GitHub tools through a built-in proxy, common toolchains, Docker, PostgreSQL 16, and Redis 7. Sessions can start from the web, mobile or desktop app, the terminal with claude --cloud, or routines. There is no separate compute charge, but sessions share plan rate limits. Team and Enterprise organizations can route execution to a self-hosted environment.

Codex cloud instead gives each task an isolated OpenAI-managed container preloaded with the repository. Its runtime separates preparation from agent execution. Setup can access the network to install dependencies, while the agent phase runs offline by default unless internet access is enabled for that environment. Tasks can start from the web interface, IDE extension, or an @codex tag on a GitHub issue or PR.

Cursor clones the repository into an isolated cloud environment, works on its own branch, and opens a PR. OpenCode offers a different trade-off. It is model-agnostic, supports 200+ providers, and runs headless as a self-hostable server for teams that want to control the environment without harness lock-in. Those capabilities do not, by themselves, establish a managed bring-your-own-key service. Managed compute, model choice, and credential ownership are separate buying criteria.

Running on a laptop makes finishing the work depend on a local machine, makes sessions compete for resources, and mixes agent credentials with the developer’s environment. Cloud execution separates those concerns. The choices then come down to network access during the agent phase, whether a live session can be inspected, and whether credentials stay on the team’s infrastructure.

Wiring the hand-offs from Linear event to agent session to PR back to Linear

First, a Linear webhook fires when a ticket enters a dispatch status such as “In Progress” or “Agent Ready.” The payload must include the ticket ID, specification fields, target branch, and repository. Those fields become the session’s initial context. Dispatch begins with a defined work item. The input gate admits only implementable work before execution proceeds.

Next, the session creates a branch named deterministically from the ticket ID, such as agent/LIN-1234. The name provides a direct link to the origin without requiring anyone to read commit messages. The agent then implements the change and runs its verification. Passing verification is the delivery gate. Under the Coding Worker pattern, a run that fails verification cannot open a PR, and a run that passes opens the PR as a Draft.

Then a GitHub webhook on PR open writes the PR URL back to the Linear ticket and moves it to “Review.” Reviewers can now navigate in either direction. The Draft state means the agent has finished its implementation attempt and human review is required.

Finally, merge, close, or review-requested events post back to the originating Slack thread. The dispatcher receives the outcome without polling Linear or GitHub. The most consequential guard remains the verification-passing Draft gate, because unconditional PR creation transfers unfinished agent work directly into the human review queue.

Running multiple tickets in parallel without overwhelming the review queue

Review capacity constrains useful concurrency more than agent capacity does. A loop that works for one ticket can stall when several sessions return PRs together. Opening a PR finishes delivery. A reviewer still needs to merge, comment, or send the work back, so dispatch throughput must reflect that capacity.

A practical policy has two controls. The concurrency cap sets how many sessions can run at once based on how much work people can review, while the priority queue puts bug fixes and production regressions ahead of feature work. These controls belong in dispatch design. Otherwise, increasing execution capacity simply accumulates waiting PRs.

Coinbase’s Forge illustrates the value of validation within the agent path. After an issue is identified, Forge retrieves repository context, generates code, and produces a mobile build for review while automated agents validate changes in the background. That validation absorbs work before it reaches reviewers.

Vendors also address the bottleneck through Codex PR review, Claude Code’s auto-fix, and Cursor’s Bugbot. Auto-fix adds a loop to handle CI failures. The agent returns to the session, reads the failure, patches the code, and pushes another commit without a person having to dispatch it again. This cuts down on back-and-forth over fixes, but teams still need to allow time for human review.

Extending the loop to production alerts from Sentry issue to agent session to PR

A Sentry issue already has much of the context that someone writing a ticket must gather. Its trace, stack, and affected code path give the agent a concrete starting point. The trigger changes, but the delivery boundary does not. Work that starts from an alert still needs a set scope and must return a PR for review.

Sentry’s Seer scores new issues for actionability before attempting a fix. It can generate code and open a PR when confidence is high and the configured automation stop-point permits it, with tests included when requested. A “Fix with Seer” button appears directly in the Slack alert thread. This keeps initiation and the returned result on the same status surface.

Seer’s scope stops at code change and PR creation. It does not perform rollbacks, restarts, feature-flag toggles, or database queries, so operational response remains outside this dispatch loop. Bolt (StackBlitz) demonstrates a complementary hand-off. Seer’s root-cause analysis becomes starting context for a coding agent, which implements the fix and returns a PR for human review.

Sentry also uses Seer to open PRs across its own GitHub repositories and notify engineers through Slack. A Claude routine prompts Seer to identify a reviewer using commit history. The selection follows who has worked most closely with the relevant code.

What keeps the loop closed at the governance layer

The work identifiers already needed for dispatch also support auditability. The ticket ID connects the specification to a deterministically named branch, the PR links back to the ticket, and outcome messages return to the originating thread. These artifacts make the work reconstructible. Governance begins with that continuity rather than a separate account of what the agent supposedly did.

Execution controls still require their own scrutiny. SOC 2 Type II, SAML SSO, granular admin controls, and deployment options that keep code off vendor training sets concern the execution environment. Self-hosting or routing sessions through the team’s infrastructure changes where those controls apply, while the hand-offs stay the same. Hosting location alone is not a substitute for the required controls.

The corresponding access policy should grant each session only the permissions needed for its ticket. Repository read/write access does not come with production database access or deployment keys, and session credentials should be revoked when the session ends. Shared local credentials blur that boundary. The Draft PR gate provides a separate human checkpoint, with an explicit human action to mark the work ready for review before agent-written code proceeds toward merge.

What a working dispatch loop looks like after the first month

The useful outcome measure is reviewable PRs merged per engineer per week. After the first month, progress should be visible as completed implementations move through review.

Coinbase reports a 55% increase in PRs merged per engineer, with some teams dramatically reducing time from idea to production under an agent-first model. Shopify’s River participates in roughly one in eight merged pull requests. Ramp’s Inspect has run a million sessions and produces the majority of its PRs, including contributions from non-engineers. These are scale examples.

All three companies kept Claude Code as well as their own agent harnesses. Their approach puts more weight on execution environments and how hand-offs work than on using just one agent interface. The harness organizes delivery around the agent. That is the architectural distinction between adopting a coding tool and building a dispatch system.

PR abandonment rate can give an early sign of trouble in that system. It measures agent-opened PRs closed without merge and without a follow-up dispatch. A high rate is a reason to check the input specification, though it does not by itself prove that the agent does poor work. The first-month test is therefore not whether Linear and Slack can start agents, but whether scoped requests consistently become changes that engineers can review and accept.

Sources

  1. GitHub Integration

More in Cloud Agent Environments