Est.

Slack Thread to Pull Request the Exact Handoff Architecture Managed Agent Platforms Use Under the Hood

How three connected layers make Slack-to-PR handoffs reliable.

· 8 min read
Cover illustration for “Slack Thread to Pull Request the Exact Handoff Architecture Managed Agent Platforms Use Under the Hood”
Cloud Agent Environments · November 2, 2026 · 8 min read · 1,892 words

A bring-your-own API key cloud coding agent runner needs more than a hosted model connection. Running Claude Code or Codex without managing infrastructure needs a managed execution environment, and using an Anthropic or OpenAI API key needs its own setup. For Slack-thread-to-pull-request work, reliable delegation depends on three connected layers, which are intent capture, isolated orchestration, and delivery of a reviewable artifact.

Why most Slack-to-PR workflows break before they ship anything

daily.dev fixed the drop in agent quality by restoring session continuity at the orchestration layer. What looked like a model problem disappeared once continuity was restored. The failure was between stages. That distinction explains why adding a better chat trigger does not necessarily produce better implementation work.

With a chat trigger but no orchestration, someone still has to start the agent, and with an environment but no structured delivery, the team gets work it cannot easily review. Slack’s infrastructure lead describes the intended shift from co-authoring to “actual handoffs of work”. An engineering manager can ask one agent to triage PRs and another to open sandboxes for review, but that chain needs an integration point connecting intent, agents, and tools.

The three-layer architecture that makes the handoff reliable

The intent capture layer turns conversation into a contextual work request. The orchestration layer translates that request into a running agent with an isolated environment, memory, and task decomposition. The delivery layer returns a PR, recording, or reply that a person can inspect. Each boundary needs a defined contract. Context must survive the first handoff, and inspectable output must survive the last.

The execution sequence gives that stack a concrete shape. Work arrives through chat or an issue, after which the agent researches the repository, plans the change, creates a branch, writes commits, and runs tests and linters in its own environment. Anthropic names the phases Explore, Plan, Implement, Commit. Human review remains between the resulting diff and a merge. The architecture applies whether Claude Code, Codex, Cursor, or Opencode performs the implementation.

Diagram: The Agent's Execution Sequence. Visualizes: Visualize the linear execution sequence Anthropic names explicitly for Claude Code: Explore → Plan → Implement → Commit, followed by Human Review before merge.

Layer one: how Slack captures intent without losing context

Slack contributes more than a convenient place to type. Past conversations, who is in a channel, and discussions in threads give an agent context that an issue title alone cannot give. That context includes what the team decided, why a project changed direction, and which edge cases came up earlier. Without it, a technically plausible response can still miss the intended work.

Slack’s Real-Time Search API and MCP provide secure, permissioned access to that context at thread, channel, or workspace granularity. The appropriate scope depends on the task. A bug fix needs the thread where the problem was described, while a refactor needs the architectural decisions discussed in the relevant channel. Documentation work may require synthesis across channels and periods. Broader access is not automatically better context.

The Slackbot MCP Client connects applications and agents to Slackbot so that it can route requests, manage multi-step workflows, and return the final handoff. Linear’s MCP server lets Claude, Cursor, and other tools read from and write to Linear directly. In the Linear and Cursor workflow, a developer using Cursor pulls discussion context from Slack while a Linear agent summarizes the thread into an actionable ticket.

For teams building intake agents, the Bolt SDK’s Assistant class provides the working abstraction. The assistant_thread_started event fires when someone opens the agent panel, and the agent responds through chat.postMessage. The thread becomes the agent’s working memory. Context persists across messages, allowing pauses, resumptions, and redirection when the goal changes. That continuity makes the surface more useful than a webhook that merely launches a job.

Layer two: orchestration — spawning isolated environments and managing the agent loop

A structured request becomes executable only when the orchestration layer provides the tools needed to work on it. Those include a persistent repository, a real shell, language servers, package managers, build tools, and test runners. A stripped-down sandbox cannot substitute for that working environment. An agent must be able to build and test its change rather than describe what those operations might show.

Isolation constrains what model-generated code can affect. MicroVMs are the standard choice among hosted agent sandboxes for untrusted code, while the agent loop stays outside the sandbox and calls it as a tool. That boundary separates execution from the host environment. A sandbox design described in the notes mounts the host repository read-only at /run/sandbox/source, lets the agent clone from it, and provides no writable path back. Reconciliation happens through a manual git fetch on the host rather than a direct agent push to the authoritative repository.

Environment lifetime introduces a separate trade-off. Re-cloning repositories and reinstalling dependencies make per-run setup expensive, so persistent sandboxes or snapshots can avoid repeating that work. Cursor’s Builds feature, shipped August 13, starts cloud agents in pre-configured environments so they can skip setup from scratch. Cursor reports roughly three times faster time to first token. Isolation and persistence address different needs, so choosing one does not settle the other.

Long-running work also needs decomposition even with a larger context window. A 30-minute debugging session can consume hundreds of thousands of tokens through tool inputs and outputs alone. Parallel shorter tasks give each sub-agent a fresh, focused context window, while the lead agent tracks high-level status. Cursor’s parallel sub-agents work this way. The AWS DevOps Agent pattern extends orchestration to specialized work, using a CloudWatch alarm and telemetry to diagnose a problem, connect it to a recent deployment, and suggest remediation.

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

The managed environment needs to be stable and the harness configurable inside it. Harness choice then becomes an orchestration setting rather than a commitment to rebuild the stack around one agent. The same distinction applies to model credentials. For a bring-your-own API key cloud coding agent runner, support for the intended Anthropic or OpenAI key is a requirement distinct from environment provisioning, session continuity, and delivery. The named harness features alone do not establish a platform’s support for that requirement.

Claude Code has harness features that can still shape the choice. Cloud Routines and /loop address scheduled and continuous work, while Auto memory supports cross-session continuity. Remote Control serves a different purpose. It lets someone monitor and control a local session from a phone or browser, rather than making that session a cloud execution environment. These distinctions prevent remote access, memory, and hosted execution from being treated as interchangeable features.

Model selection also depends on task type and existing foundation-model relationships. Teams already using Claude often default to Claude Code or Cursor with Claude, while Cursor Router makes model routing a per-request decision. Claude Opus 4.7 adds an extended context window, an xhigh effort level, and task budgets for extended agentic coding. Harness-agnosticism does introduce operational complexity. A stable environment and defined contracts handle that complexity so teams can switch to a model they prefer without rebuilding the environment.

Layer three: delivery — what makes a PR a reviewable artifact rather than a dump of diffs

A pull request gives agent output a human decision point before merge. Familiarity is not its defining advantage here. The artifact must hold work the agent has already checked, including by running tests and linters inside its environment. Without those checks, the reviewer has to find failures that should have shown up when the agent ran the code.

Enterprise delivery also depends on infrastructure beyond the diff. Per-PR preview environments support end-to-end validation, with CI/CD pipelines and managed databases forming part of that deployment path. Attribution needs comparable precision at the commit level. Cursor Blame distinguishes code from tab completions, agent runs, and human edits, while Claude Code exports merged PRs with Claude Code as a discrete metric.

The artifact must also point back to its origin. A PR, recording, or reply that references the Slack thread or Linear issue lets the team trace the result to the request without reconstructing the conversation. That reference preserves intent at the review boundary. Ramp reports that a large majority of merged PRs now come from its Inspect agent, with engineers focused on reviewing and steering. The handoff changes who implements the work without removing the human decision.

Where governance lives in a three-layer stack

A reviewable PR can still be the wrong change to merge. Governance helps guard against that risk by placing controls in specific layers and putting policy into the pipeline. The control framework covers scope, review, exceptions, evidence, and recovery. Each needs a defined place in execution. Named human owners remain responsible for decisions that the agent must not make.

At intake, scope sets out which data is approved, which systems are connected, and what the agent may do before it starts. Exception handling establishes stop conditions, a fallback owner, and the context required for escalation. Confirmation requirements belong at this boundary as well. Customer commitments, access changes, production writes, security exceptions, and final incident decisions remain with named human owners. The agent does not infer authority from the fact that a request appeared in Slack.

Orchestration enforces those boundaries through sandbox isolation and, where data residency requires it, BYOC. Keeping the agent loop outside the sandbox separates coordination from untrusted execution. Delivery then supplies the evidence needed for review, including sources, responses, actions taken, approvals, and corrections. Retention rules and review access define how that evidence remains available. Recovery rules govern failed writes or delivery errors so that dependent actions do not continue after a prerequisite fails.

Measurement belongs within this framework because activity can conceal poor delivery. DORA suggests pairing core delivery metrics with efficiency indicators such as cost per accepted change, without designating that indicator as the authoritative measure of agent contribution. Token volume is not a substitute. The DORA research team at Google Cloud identified raw token counts, or “tokenmaxxing,” as a vanity metric that does not correlate with delivery performance in June 2026. Commit-level attribution and agent-associated merged PR metrics provide evidence, but neither removes the need to assess delivery outcomes.

What reliable delegation actually looks like once all three layers are in place

Reliable delegation changes the work reaching engineers. Bounded, testable implementation tasks move to agents, including adding tests, upgrading dependencies, fixing lint errors, mechanical refactors, and small bugs. Engineers spend more time steering, inspecting, and deciding. This is a shift in responsibility with continued human involvement.

An enterprise SaaS team that made GitHub Copilot Enterprise its standard and adopted Claude Code at the team level saw deployment frequency rise, lead time fall, and change failure rate stay steady over a long period. Developer satisfaction also rose. However, higher individual output does not by itself produce faster delivery, because additional PRs can accumulate in review. The evidence also shows that developers completed more epics each while time in PR review rose sharply.

That tension distinguishes asynchronous cloud agents from interactive copilots. A copilot suggests lines while a person directs the immediate work, whereas a cloud agent returns a pull request after doing implementation work autonomously. The latter needs an explicit handoff architecture. Its operational test is whether a bounded request can become tested, attributable work that reaches the right human decision point without repeated intervention between stages. More generated code is insufficient if engineers still have to reconstruct what was requested, restart execution, or recover the evidence needed to judge the result.

Sources

  1. Slack AI Agents with Agentforce & Agentic AI

More in Cloud Agent Environments