[{"data":1,"prerenderedAt":768},["ShallowReactive",2],{"blog-background-agents-async-pr-workflow-en":3},{"slug":4,"published":5,"minutes":6,"category":7,"tags":8,"keywords":14,"about":26,"sources":36,"cover":73,"og":74,"expertise":75,"locales":76,"lang":77,"title":80,"description":81,"coverAlt":82,"metaTitle":83,"takeaways":84,"faq":90,"toc":109,"blocks":143,"others":524},"background-agents-async-pr-workflow","2026-10-17",12,"agents",[9,10,11,12,13],"Coding agents","Pull requests","CI","Code review","Automation",[15,16,17,18,19,20,21,22,23,24,25],"background coding agent","async coding agent","cloud coding agent pull request","copilot coding agent limits","codex cloud tasks","claude code cloud sessions","jules coding agent limits","agent pull request review","coding agent sandbox","agent CI gating","cost per merged pull request",[27,30,33],{"name":28,"url":29},"Software agent","https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FSoftware_agent",{"name":31,"url":32},"Pull request","https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FDistributed_version_control",{"name":34,"url":35},"Continuous integration","https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FContinuous_integration",[37,40,43,46,49,52,55,58,61,64,67,70],{"title":38,"url":39},"GitHub Docs: About GitHub Copilot cloud agent","https:\u002F\u002Fdocs.github.com\u002Fen\u002Fcopilot\u002Fconcepts\u002Fagents\u002Fcoding-agent\u002Fabout-coding-agent",{"title":41,"url":42},"GitHub Docs: Risks and mitigations for Copilot cloud agent","https:\u002F\u002Fdocs.github.com\u002Fen\u002Fcopilot\u002Fconcepts\u002Fagents\u002Fcloud-agent\u002Frisks-and-mitigations",{"title":44,"url":45},"OpenAI Developers: Codex cloud environments","https:\u002F\u002Fdevelopers.openai.com\u002Fcodex\u002Fcloud\u002Fenvironments",{"title":47,"url":48},"Anthropic: Use Claude Code in the cloud","https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fclaude-code-on-the-web",{"title":50,"url":51},"Google Jules: Limits and plans","https:\u002F\u002Fjules.google\u002Fdocs\u002Fusage-limits\u002F",{"title":53,"url":54},"Google Jules: Getting started","https:\u002F\u002Fjules.google\u002Fdocs\u002F",{"title":56,"url":57},"GitHub Docs: About protected branches","https:\u002F\u002Fdocs.github.com\u002Fen\u002Frepositories\u002Fconfiguring-branches-and-merges-in-your-repository\u002Fmanaging-protected-branches\u002Fabout-protected-branches",{"title":59,"url":60},"GitHub Docs: Models and pricing for GitHub Copilot","https:\u002F\u002Fdocs.github.com\u002Fen\u002Fcopilot\u002Freference\u002Fcopilot-billing\u002Fmodels-and-pricing",{"title":62,"url":63},"OpenAI Developers: Codex pricing","https:\u002F\u002Fdevelopers.openai.com\u002Fcodex\u002Fpricing",{"title":65,"url":66},"Ehsani et al.: Where Do AI Coding Agents Fail? An Empirical Study of Failed Agentic Pull Requests in GitHub (MSR 2026, arXiv 2601.15195)","https:\u002F\u002Farxiv.org\u002Fabs\u002F2601.15195",{"title":68,"url":69},"Peralta et al.: Why Are Agentic Pull Requests Merged or Rejected? An Empirical Study (MSR 2026, arXiv 2605.22534)","https:\u002F\u002Farxiv.org\u002Fabs\u002F2605.22534",{"title":71,"url":72},"DORA: State of AI-assisted Software Development 2025","https:\u002F\u002Fdora.dev\u002Fdora-report-2025","\u002Fimages\u002Fblog\u002Fbackground-agents-async-pr-workflow\u002Fcover.webp","\u002Fimages\u002Fblog\u002Fbackground-agents-async-pr-workflow\u002Fog.jpg","ai-engineer",[77,78,79],"en","de","hu","Background coding agents that open PRs: a practical async workflow","How async coding agents queue tasks, run in sandboxes, open draft PRs and pass CI. Provider limits, cost controls, review design and failure modes.","One card in a tray fanning out to five pads, all arrows leading to one page behind a gate.","Async coding agents that open pull requests · Balázs Csorba",[85,86,87,88,89],"An async coding agent moves the bottleneck from writing code to defining the task, running CI and reviewing the result.","The queue entry is the specification: one observable goal, a test command, allowed paths and explicit non-goals.","Sandbox, branch protection, workflow approval and required checks are separate controls; a sandbox alone protects the host, not the repository.","Time-box every run and budget every task; the useful cost metric is cost per merged pull request, not cost per session.","Most rejected agent PRs fail on coordination, CI and review capacity rather than on model capability.",[91,94,97,100,103,106],{"q":92,"a":93},"What is a background coding agent?","A coding agent that runs asynchronously on remote infrastructure instead of in your editor. You submit a task, it works in its own sandbox, pushes a branch and usually opens a pull request. Codex cloud, Copilot cloud agent, Claude Code cloud sessions and Jules all work this way.",{"q":95,"a":96},"Can an agent merge its own pull request?","Not on the hosted products described here. Copilot cloud agent cannot mark a pull request ready for review, approve it or merge it, and the person who asked for the change cannot approve it either. Branch protection should enforce the same rule for any other agent.",{"q":98,"a":99},"How long should a background task run?","Short enough that a failed run is cheap. Copilot enforces a hard 59-minute session limit. Claude Code reclaims idle cloud sessions and caches a setup script only when it finishes in roughly five minutes. If a task needs longer than an hour, split it into stages with a commit or a plan file between them.",{"q":101,"a":102},"How do I prevent duplicate agent pull requests?","Deduplicate before enqueueing. Use a key built from repository, issue and base commit, search open and recently closed pull requests for the same change, and give the task a claim label. In one sample of rejected agent PRs, 23% were duplicates of existing work.",{"q":104,"a":105},"Do I need self-hosted runners for background agents?","Not necessarily. The hosted products provide managed VMs or GitHub Actions environments. Self-hosted runners and self-hosted environments matter when the agent needs private network access, a specific hardware profile, or a data boundary your compliance team requires.",{"q":107,"a":108},"Why do so many agent pull requests get closed without review?","Because review capacity, not agent capacity, is the constraint. In a study of 600 rejected agent PRs, 38% were abandoned without meaningful human engagement. Assigning a reviewer when the PR opens and limiting work in progress matters more than another prompt tweak.",[110,113,116,119,122,125,128,131,134,137,140],{"id":111,"title":112},"why-async-agents","Why asynchronous changes the unit of work",{"id":114,"title":115},"anatomy","Anatomy of an async PR pipeline",{"id":117,"title":118},"task-queue","The queue is the product",{"id":120,"title":121},"sandbox","Sandboxes: what the agent can touch",{"id":123,"title":124},"long-runs","Long runs, timeouts and resumability",{"id":126,"title":127},"ci-gating","CI is the first reviewer",{"id":129,"title":130},"human-review","Human review is the bottleneck",{"id":132,"title":133},"cost-control","Cost control per task, not per token",{"id":135,"title":136},"failure-modes","Failure modes and the guardrail for each",{"id":138,"title":139},"rollout","Rolling it out without drowning in PRs",{"id":141,"title":142},"sources","Sources",[144,148,151,154,157,158,161,170,179,243,246,247,250,253,255,258,259,262,269,276,292,293,296,299,301,304,305,308,310,322,325,326,329,332,344,357,358,361,398,401,404,405,408,459,462,463,466,481,484,485],{"type":145,"content":146},"paragraph",[147],"A coding agent used to be something you watched. You typed a request, approved each command, and waited for the diff. The current generation of cloud agents changed that interaction: you hand a task to a queue, close the laptop, and come back to a branch or a pull request. OpenAI Codex cloud, GitHub Copilot cloud agent, Claude Code cloud sessions and Google Jules all follow the same pattern, with different limits and different ideas about what the agent may touch.",{"type":145,"content":149},[150],"That sounds like a convenience feature. It is really a change in the unit of work. An asynchronous agent produces artefacts that other people have to review, and every weak point in your repository workflow becomes visible at machine speed: vague issues, slow CI, missing branch protection, an unreviewed backlog. This post is about the workflow around the agent — the queue, the sandbox, the CI gate, the human review, the cost meter and the failure modes I design for.",{"type":152,"level":153,"id":111,"text":112},"heading",2,{"type":145,"content":155},[156],"A synchronous agent waits for you, so its throughput is your attention. An asynchronous agent runs unattended, consumes a budget and produces work that enters the same review pipeline as a colleague's branch. DORA's 2025 survey found that 90% of technology professionals use AI at work and 30% report little or no trust in AI-generated code, with higher adoption linked to both throughput and instability. The trade is parallel attempts in exchange for verification work — and only tasks with a machine-checkable definition of done belong in that trade.",{"type":152,"level":153,"id":114,"text":115},{"type":145,"content":159},[160],"Strip away the branding and the pipeline is the same everywhere. A task enters a queue; a worker provisions an environment; the agent edits and runs commands; the result becomes a branch and a pull request; CI runs; a human reviews; the merge either happens or sends the task back. The interesting differences are in the limits at each stage, not in the diagram.",{"type":162,"attrs":163,"inner":167,"caption":168},"diagram",{"viewBox":164,"role":165,"aria-labelledby":166},"0 0 720 190","img","bga1-t bga1-d","\u003Ctitle id=\"bga1-t\">Async agent pull request pipeline\u003C\u002Ftitle>\u003Cdesc id=\"bga1-d\">A task moves from a queue into a scoped sandbox, runs tests, opens a draft pull request, passes required CI checks and reaches human review. CI or review feedback can send it back for another run.\u003C\u002Fdesc>\u003Cdefs>\u003Cmarker id=\"bga1-ah\" viewBox=\"0 0 10 10\" refX=\"9\" refY=\"5\" markerWidth=\"7\" markerHeight=\"7\" orient=\"auto-start-reverse\">\u003Cpath d=\"M0 0L10 5L0 10z\" class=\"d-head\" \u002F>\u003C\u002Fmarker>\u003C\u002Fdefs>\u003Crect x=\"12\" y=\"47\" width=\"96\" height=\"76\" rx=\"10\" class=\"d-box\" \u002F>\u003Ctext x=\"60\" y=\"81\" text-anchor=\"middle\" class=\"d-text\">Queue\u003C\u002Ftext>\u003Ctext x=\"60\" y=\"103\" text-anchor=\"middle\" class=\"d-small\">one task\u003C\u002Ftext>\u003Cpath d=\"M108 85H132\" class=\"d-line\" marker-end=\"url(#bga1-ah)\" \u002F>\u003Crect x=\"132\" y=\"47\" width=\"96\" height=\"76\" rx=\"10\" class=\"d-sky\" \u002F>\u003Ctext x=\"180\" y=\"81\" text-anchor=\"middle\" class=\"d-text\">Sandbox\u003C\u002Ftext>\u003Ctext x=\"180\" y=\"103\" text-anchor=\"middle\" class=\"d-small\">scoped VM\u003C\u002Ftext>\u003Cpath d=\"M228 85H252\" class=\"d-line\" marker-end=\"url(#bga1-ah)\" \u002F>\u003Crect x=\"252\" y=\"47\" width=\"96\" height=\"76\" rx=\"10\" class=\"d-gold\" \u002F>\u003Ctext x=\"300\" y=\"81\" text-anchor=\"middle\" class=\"d-text\">Run\u003C\u002Ftext>\u003Ctext x=\"300\" y=\"103\" text-anchor=\"middle\" class=\"d-small\">tests first\u003C\u002Ftext>\u003Cpath d=\"M348 85H372\" class=\"d-line\" marker-end=\"url(#bga1-ah)\" \u002F>\u003Crect x=\"372\" y=\"47\" width=\"96\" height=\"76\" rx=\"10\" class=\"d-accent\" \u002F>\u003Ctext x=\"420\" y=\"81\" text-anchor=\"middle\" class=\"d-text\">Draft PR\u003C\u002Ftext>\u003Ctext x=\"420\" y=\"103\" text-anchor=\"middle\" class=\"d-small\">branch\u003C\u002Ftext>\u003Cpath d=\"M468 85H492\" class=\"d-line\" marker-end=\"url(#bga1-ah)\" \u002F>\u003Crect x=\"492\" y=\"47\" width=\"96\" height=\"76\" rx=\"10\" class=\"d-mint\" \u002F>\u003Ctext x=\"540\" y=\"81\" text-anchor=\"middle\" class=\"d-text\">CI\u003C\u002Ftext>\u003Ctext x=\"540\" y=\"103\" text-anchor=\"middle\" class=\"d-small\">required\u003C\u002Ftext>\u003Cpath d=\"M588 85H612\" class=\"d-line\" marker-end=\"url(#bga1-ah)\" \u002F>\u003Crect x=\"612\" y=\"47\" width=\"96\" height=\"76\" rx=\"10\" class=\"d-box\" \u002F>\u003Ctext x=\"660\" y=\"81\" text-anchor=\"middle\" class=\"d-text\">Review\u003C\u002Ftext>\u003Ctext x=\"660\" y=\"103\" text-anchor=\"middle\" class=\"d-small\">human merge\u003C\u002Ftext>\u003Cpath d=\"M660 123V150H180V123\" class=\"d-line-accent d-dash\" marker-end=\"url(#bga1-ah)\" \u002F>\u003Ctext x=\"420\" y=\"168\" text-anchor=\"middle\" class=\"d-small\">feedback: fix, re-run, push\u003C\u002Ftext>",[169],"The loop is the important part. A pipeline that cannot send a failed run back with context turns every CI failure into a new task.",{"type":145,"content":171},[172,173,178],"Two properties separate a task from a chat: the agent needs a definition of done it can check, and the environment must be reproducible enough that a green run means something. An agent that cannot run your tests is guessing, and a PR full of guesses is worse than no PR. The loop mechanics are covered in ",{"tag":174,"to":175,"children":176},"link","\u002Fblog\u002Fagent-loop-explained",[177],"the agent loop, explained",".",{"type":180,"head":181,"rows":190},"table",[182,184,186,188],[183],"System",[185],"How a task enters",[187],"Isolation and network",[189],"Published limits",[191,205,214,230],[192,194,201,203],[193],"GitHub Copilot cloud agent",[195,196,200],"Assign an issue, mention ",{"tag":197,"children":198},"code",[199],"@copilot",", or start from the agents panel",[202],"Ephemeral environment powered by GitHub Actions; firewall on by default",[204],"59-minute session; one branch and one pull request per task; cannot approve or merge",[206,208,210,212],[207],"OpenAI Codex cloud",[209],"Task in Codex cloud, GitHub, Linear or Slack",[211],"Per-task container; agent internet off by default; setup secrets removed",[213],"Container cached up to 12 hours; PR opened on request",[215,217,226,228],[216],"Claude Code cloud",[218,221,222,225],{"tag":197,"children":219},[220],"claude.ai\u002Fcode",", ",{"tag":197,"children":223},[224],"claude --cloud",", or a routine",[227],"Anthropic-managed VM; limited network; git credentials outside the sandbox",[229],"Counts toward plan limits; idle sessions expire",[231,233,239,241],[232],"Google Jules",[234,235,238],"Prompt, ",{"tag":197,"children":236},[237],"jules"," label, or API session",[240],"Google Cloud VM with internet access",[242],"15, 100 or 300 tasks per day; 3, 15 or 60 concurrent",{"type":145,"content":244},[245],"These are defaults, not ceilings. Self-hosted runners, custom environments and larger runners move some of them. What does not move is the shape: a queue, a scoped execution environment, a branch, a gate and a reviewer.",{"type":152,"level":153,"id":117,"text":118},{"type":145,"content":248},[249],"An async agent cannot ask what you meant, or the answer arrives hours later. The queue entry is the specification: one observable goal, the command that proves it, the paths in scope and the non-goals. If the issue template cannot express that, the task is not ready.",{"type":145,"content":251},[252],"Duplicates are the clearest sign of a queue problem. In a manually coded sample of 600 rejected agent pull requests, 142 — 23% — were closed because the work already existed elsewhere. The agent did not write bad code; it wrote code nobody needed. Deduplicate before enqueueing, not after the pull request opens.",{"type":197,"code":254},"type AgentTask = {\n  id: string;                 \u002F\u002F dedupe key: repo + issue + base commit\n  repo: string;\n  base: string;\n  goal: string;               \u002F\u002F one sentence, testable\n  acceptance: string[];       \u002F\u002F observable outcomes\n  testCommand: string;        \u002F\u002F the agent must run this\n  allowedPaths: string[];     \u002F\u002F everything else is out of scope\n  maxMinutes: number;\n  maxCiRetries: number;\n};",{"type":145,"content":256},[257],"Store the envelope with the task and make the id the dedupe key: repository, issue and base commit. When the base branch moves, re-run against it instead of opening a second pull request. A queue without a work-in-progress limit is a pull request generator; I cap tasks per reviewer, not per agent.",{"type":152,"level":153,"id":120,"text":121},{"type":145,"content":260},[261],"Three boundaries decide the blast radius: what the agent can write, what it can reach on the network, and which credentials it can spend. The hosted products make different choices, and the differences matter more than the model name in the task envelope.",{"type":145,"content":263},[264,265,268],"GitHub's Copilot cloud agent runs in an ephemeral GitHub Actions environment with a firewall enabled by default, can push only to a single branch, and cannot run ",{"tag":197,"children":266},[267],"git push"," directly. Codex cloud runs setup scripts with internet access, then turns agent internet off by default; secrets are available only during setup and removed before the agent phase. Claude Code cloud keeps git credentials and signing keys outside the sandbox and attaches them through a proxy.",{"type":145,"content":270},[271,272,275],"The mistake is treating the sandbox as the whole security model. A branch that CI runs with repository secrets is an execution path, and an agent that can edit ",{"tag":197,"children":273},[274],".github\u002Fworkflows"," can change that path. Copilot's default is instructive: workflows from its pull requests do not run until a write-access user approves them. That is separate from the firewall, and you need both.",{"type":277,"variant":278,"title":279,"body":280},"callout","warn","A sandbox protects the host, not the repository",[281],[282,283,286,287,291],"Isolation stops an agent from reading your laptop or your neighbours' data. It does not stop a bad commit, a weakened test, or an edited workflow that later receives secrets. Treat every agent branch as untrusted: protect the default branch, require checks and review, restrict who approves workflow runs, and put ",{"tag":197,"children":284},[285],"CODEOWNERS"," on CI and test files. The checklist in ",{"tag":174,"to":288,"children":289},"\u002Fblog\u002Fsandboxing-coding-agents-ci-checklist",[290],"AI agent sandbox checklist"," goes through the layers in order.",{"type":152,"level":153,"id":123,"text":124},{"type":145,"content":294},[295],"Async does not mean unbounded. Copilot caps each session at 59 minutes and does not let you extend it. Claude Code caches a setup script only when it finishes in roughly five minutes, and idle cloud sessions are reclaimed. Codex caches container state for up to 12 hours, a performance feature rather than a promise that a task can run that long.",{"type":145,"content":297},[298],"Design for interruption: commit checkpoints to the branch, write the plan to a file in the repository, and start the next run from the last green commit. A task that cannot survive a timeout leaves a half-finished PR and a second task to clean it up.",{"type":197,"code":300},"\u002F\u002F Lease longer than the longest allowed run; heartbeat while the agent works.\nconst lease = await queue.claim({ visibilityTimeout: 90 * 60 });\ntry {\n  const run = await sandbox.start({\n    task: lease.task,\n    network: \"allowlist\",\n  });\n  const result = await run.wait({ timeoutMs: lease.task.maxMinutes * 60_000 });\n  if (result.exitCode !== 0) throw new Error(result.summary);\n  await git.pushBranch(result.branch);\n  await github.openDraftPr({ branch: result.branch, task: lease.task });\n  await queue.ack(lease.id);\n} catch (error) {\n  await queue.nack(lease.id, { reason: String(error) });\n}",{"type":145,"content":302},[303],"The queue semantics matter more than the product: a visibility timeout longer than the maximum run, a heartbeat, an acknowledgement only after the PR exists, and a dead-letter path. GitHub Actions, SQS or Temporal can express that; a cron job without a lease cannot.",{"type":152,"level":153,"id":126,"text":127},{"type":145,"content":306},[307],"Branch protection turns the pull request into a gate. Required checks can be strict (the branch must be up to date) or loose (merge now, risk a broken base). A merge queue tests the PR against the latest base and the PRs ahead of it, so green means green on what will actually merge.",{"type":197,"code":309},"name: ci\non:\n  pull_request:\n  merge_group:\n\nconcurrency:\n  group: ci-${{ github.ref }}\n  cancel-in-progress: true\n\npermissions:\n  contents: read\n\njobs:\n  test:\n    runs-on: ubuntu-latest\n    timeout-minutes: 20\n    steps:\n      - uses: actions\u002Fcheckout@v5\n      - uses: actions\u002Fsetup-node@v4\n        with: { node-version: 22, cache: npm }\n      - run: npm ci\n      - run: npm test -- --run",{"type":145,"content":311},[312,313,316,317,321],"An agent pull request is an untrusted contribution with a trusted-looking author name. That is why workflow approval, least-privilege ",{"tag":197,"children":314},[315],"permissions"," and branch protection belong in the design, not in a cleanup task afterwards. The same principle is the subject of ",{"tag":174,"to":318,"children":319},"\u002Fblog\u002Fharness-engineering-coding-agents",[320],"harness engineering for coding agents",": guides tell the agent what good looks like, sensors tell it — and you — when it missed.",{"type":145,"content":323},[324],"The cost of a red pipeline is not only the re-run. In the 33,596-PR study, each additional failed CI check was associated with roughly 15% lower odds of merge. A failing check is a rejection signal that compounds. Make the suite fast and deterministic before scaling agents; otherwise you are buying retries, not throughput.",{"type":152,"level":153,"id":129,"text":130},{"type":145,"content":327},[328],"The empirical picture is more interesting than the anecdote. Ehsani and colleagues analysed 33,596 agent-authored pull requests from five coding agents: 71.48% were merged. In a manually coded sample of 600 rejected PRs, reviewer abandonment was the largest category at 38%, followed by duplicate PRs at 23% and CI or test failure at 17%. Only 2% were classified as agent-level issues. Peralta and colleagues looked at 11,048 closed agent PRs and found that only 35.7% of rejections were clear agent failures; 31.2% were workflow constraints and 33.1% had no observable rationale.",{"type":145,"content":330},[331],"The conclusion is not that agents are good or bad. It is that merge outcomes measure the workflow as much as the model. A duplicate PR and an abandoned PR are queue failures. A red CI run is often an environment failure. If you instrument only the agent's code, you will misread all three as model quality.",{"type":333,"ordered":334,"items":335},"list",false,[336,338,340,342],[337],"Open the pull request as a draft, with the task, the test command and a short summary of what changed. Do not make the reviewer reconstruct the request from the diff.",[339],"Require green required checks before the PR can be marked ready. A draft that turns green is a signal; a draft that is green because CI never ran is a trap.",[341],"Review the tests as a separate change. Ask whether a test would fail without the production change, and whether any assertion was weakened.",[343],"Keep one reviewer accountable per task, cap that person's drafts, and never let the requester be the only approver. Copilot enforces the last rule; branch protection can enforce it for every other agent.",{"type":145,"content":345},[346,347,351,352,356],"This is the same capacity problem described in ",{"tag":174,"to":348,"children":349},"\u002Fblog\u002Fai-generated-pr-review-bottleneck",[350],"AI code review is the bottleneck now",", and the same design question as ",{"tag":174,"to":353,"children":354},"\u002Fblog\u002Fhuman-in-the-loop-ai-agents",[355],"human in the loop for AI agents",": where does a person have to look, and what are they accountable for? For an agent PR the answer is the diff, the tests and the rollout risk — not the agent's summary.",{"type":152,"level":153,"id":132,"text":133},{"type":145,"content":359},[360],"An async agent has four meters: model tokens, CI minutes, sandbox time and human review. The first three are visible on an invoice. The fourth is the one that decides whether the workflow pays for itself.",{"type":180,"head":362,"rows":369},[363,365,367],[364],"Meter",[366],"What consumes it",[368],"Lever",[370,377,384,391],[371,373,375],[372],"Model tokens",[374],"Input context, thinking, tool calls and output on every turn",[376],"Tighter task scope, smaller model where it holds, max turns",[378,380,382],[379],"CI minutes",[381],"Every push, every re-run and the merge queue",[383],"Fail fast, cancel superseded runs, fix flaky tests",[385,387,389],[386],"Sandbox time",[388],"VM or container minutes, including setup",[390],"Cache dependencies, cap wall clock, stop idle sessions",[392,394,396],[393],"Human review",[395],"The scarcest and least instrumented resource",[397],"Small diffs, WIP limit per reviewer, draft first",{"type":145,"content":399},[400],"The vendors meter differently. GitHub moved Copilot to usage-based billing on 1 June 2026: model usage is billed in AI credits and the agent's infrastructure consumes Actions minutes. Codex cloud tasks share the plan allowance with local messages, and OpenAI estimates a typical GPT-5.6 Sol task at 2 to 15 credits. Claude Code cloud sessions count toward plan limits with no separate VM charge. Jules sells task counts and concurrency: 15\u002F3 on entry, 100\u002F15 on Pro, 300\u002F60 on Ultra.",{"type":145,"content":402},[403],"Track cost per merged pull request, not per session: tokens plus CI plus sandbox plus review minutes, divided by merged PRs. A cheap task that never merges is expensive; a costly task that removes a week of work is cheap. Cap concurrency before optimising prompts.",{"type":152,"level":153,"id":135,"text":136},{"type":145,"content":406},[407],"The failure modes are predictable enough to design against. The percentages below come from the manually coded sample of rejected agent PRs, so they describe what rejection looks like, not the base rate across all tasks.",{"type":180,"head":409,"rows":416},[410,412,414],[411],"Failure",[413],"Symptom",[415],"Guardrail",[417,424,431,438,445,452],[418,420,422],[419],"Duplicate work",[421],"Two PRs for the same issue; one is closed as superseded (23% of the rejected sample)",[423],"Dedupe key, claim label, search open and recently closed PRs before enqueueing",[425,427,429],[426],"Red on arrival",[428],"The agent opens a PR that fails CI immediately (17%)",[430],"Run the test command in the sandbox; block ready-for-review until checks pass",[432,434,436],[433],"Reviewer abandonment",[435],"The PR receives no meaningful human review and is closed stale (38%)",[437],"Assign a reviewer at open, set an SLA, close stale drafts automatically",[439,441,443],[440],"Test weakening",[442],"The diff makes the test pass by deleting or loosening assertions",[444],"CODEOWNERS on tests, review the test diff separately, require a failing test first",[446,448,450],[447],"Prompt injection",[449],"Hidden instructions in an issue, README or dependency page steer the agent",[451],"Treat issue text as untrusted, strip hidden characters, no secrets in the agent phase, network allowlist",[453,455,457],[454],"Scope creep",[456],"A small task becomes a multi-file rewrite that nobody can review",[458],"Path allowlist and a diff budget; split the task instead of expanding it",{"type":145,"content":460},[461],"One more failure is easy to miss because it looks like success: the agent fixes the CI failure by changing the test. A green pipeline is evidence only if the test would have caught the bug. Review the test diff before the production diff, and require a failing test that reproduces the issue when the task is a bug fix.",{"type":152,"level":153,"id":138,"text":139},{"type":145,"content":464},[465],"Start with work where success is machine-checkable and the blast radius is small. The 33k-PR study found the highest merge rates for documentation (84%), CI (79%) and build (74%) tasks, and the lowest for performance (55%) and bug fixes (64%). That ordering is a sensible rollout order.",{"type":333,"ordered":467,"items":468},true,[469,471,473,475,477,479],[470],"Pick one repository and two task types: documentation and test coverage are the safest start.",[472],"Write the task template with a goal, acceptance criteria, a test command, allowed paths and non-goals.",[474],"Require a draft PR, green checks and one human approval before merge. Turn on branch protection first.",[476],"Cap work in progress per reviewer and per agent. Measure the queue, not the agent's token usage.",[478],"Track merge rate, time to review, CI failure rate and cost per merged PR for four weeks before expanding.",[480],"Add bug fixes only after the test suite is trustworthy enough that a green run means something.",{"type":145,"content":482},[483],"An async agent is a multiplier on whatever workflow it enters. With fast CI, clear ownership and small PRs, it removes routine work. With flaky tests and no reviewer capacity, it manufactures a backlog with better commit messages.",{"type":152,"level":153,"id":141,"text":142},{"type":333,"ordered":467,"items":486},[487,491,494,497,500,503,506,509,512,515,518,521],[488],{"tag":489,"href":39,"children":490},"a",[38],[492],{"tag":489,"href":42,"children":493},[41],[495],{"tag":489,"href":45,"children":496},[44],[498],{"tag":489,"href":48,"children":499},[47],[501],{"tag":489,"href":51,"children":502},[50],[504],{"tag":489,"href":54,"children":505},[53],[507],{"tag":489,"href":57,"children":508},[56],[510],{"tag":489,"href":60,"children":511},[59],[513],{"tag":489,"href":63,"children":514},[62],[516],{"tag":489,"href":66,"children":517},[65],[519],{"tag":489,"href":69,"children":520},[68],[522],{"tag":489,"href":72,"children":523},[71],[525,583,652,721],{"slug":526,"published":5,"minutes":527,"category":7,"tags":528,"keywords":534,"about":545,"sources":555,"cover":577,"og":578,"expertise":75,"locales":579,"lang":77,"title":580,"description":581,"coverAlt":582},"agent-tool-design-descriptions-errors",11,[529,530,531,532,533],"AI agents","Tool use","Function calling","MCP","Agent design",[535,536,537,538,539,540,541,542,543,544],"agent tool design","writing tool descriptions for llm","function calling best practices","tool use error handling","mcp tool design","tool calling is_error","how many tools should an agent have","tool search defer_loading","agent computer interface","llm tool schema design",[546,549,552],{"name":547,"url":548},"Intelligent agent","https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FIntelligent_agent",{"name":550,"url":551},"Model Context Protocol","https:\u002F\u002Fmodelcontextprotocol.io\u002F",{"name":553,"url":554},"Poka-yoke","https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FPoka-yoke",[556,559,562,565,568,571,574],{"title":557,"url":558},"Anthropic Engineering: Writing effective tools for agents, with agents (Sep 2025)","https:\u002F\u002Fwww.anthropic.com\u002Fengineering\u002Fwriting-tools-for-agents",{"title":560,"url":561},"Anthropic Engineering: Building effective agents (Dec 2024)","https:\u002F\u002Fwww.anthropic.com\u002Fengineering\u002Fbuilding-effective-agents",{"title":563,"url":564},"Claude Platform Docs: Define tools","https:\u002F\u002Fplatform.claude.com\u002Fdocs\u002Fen\u002Fagents-and-tools\u002Ftool-use\u002Fdefine-tools",{"title":566,"url":567},"Claude Platform Docs: Handle tool calls","https:\u002F\u002Fplatform.claude.com\u002Fdocs\u002Fen\u002Fagents-and-tools\u002Ftool-use\u002Fhandle-tool-calls",{"title":569,"url":570},"Claude Platform Docs: Tool search tool","https:\u002F\u002Fplatform.claude.com\u002Fdocs\u002Fen\u002Fagents-and-tools\u002Ftool-use\u002Ftool-search-tool",{"title":572,"url":573},"Model Context Protocol specification 2025-11-25: Tools","https:\u002F\u002Fmodelcontextprotocol.io\u002Fspecification\u002F2025-11-25\u002Fserver\u002Ftools",{"title":575,"url":576},"OpenAI API Docs: Function calling","https:\u002F\u002Fdevelopers.openai.com\u002Fapi\u002Fdocs\u002Fguides\u002Ffunction-calling","\u002Fimages\u002Fblog\u002Fagent-tool-design-descriptions-errors\u002Fcover.webp","\u002Fimages\u002Fblog\u002Fagent-tool-design-descriptions-errors\u002Fog.jpg",[77,78,79],"Designing tools for AI agents: names, descriptions, schemas and error messages","How to design agent tools that get picked and called correctly: task-shaped tools, descriptions, schemas, compact responses and errors a model can act on.","Three rectangular slots in a base, with a block of matching width lined up over the middle slot and two wrong-width blocks beside it.",{"slug":584,"published":5,"minutes":527,"category":7,"tags":585,"keywords":589,"about":602,"sources":612,"cover":646,"og":647,"expertise":75,"locales":648,"lang":77,"title":649,"description":650,"coverAlt":651},"coding-agents-legacy-codebase-migration",[586,9,587,588,12],"Legacy migration","Strangler fig","Testing",[590,591,592,593,594,595,596,597,598,599,600,601],"legacy code migration ai","coding agent legacy codebase","strangler fig pattern ai","characterization tests legacy code","ai code migration review","agent assisted refactoring","legacy modernization coding agent","differential testing migration","shadow traffic migration","ai code review gate","test harness before migration","llm code migration",[603,606,609],{"name":604,"url":605},"Legacy code","https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FLegacy_code",{"name":607,"url":608},"Characterization test","https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FCharacterization_test",{"name":610,"url":611},"Strangler fig pattern","https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FStrangler_fig_pattern",[613,616,618,621,624,627,630,633,636,639,642,645],{"title":614,"url":615},"Martin Fowler: Strangler Fig (2024)","https:\u002F\u002Fmartinfowler.com\u002Fbliki\u002FStranglerFigApplication.html",{"title":617,"url":608},"Wikipedia: Characterization test",{"title":619,"url":620},"Google Research: Accelerating code migrations with AI (2024)","https:\u002F\u002Fresearch.google\u002Fblog\u002Faccelerating-code-migrations-with-ai\u002F",{"title":622,"url":623},"Ziftci et al.: Migrating Code At Scale With LLMs At Google (arXiv 2504.09691)","https:\u002F\u002Farxiv.org\u002Fabs\u002F2504.09691",{"title":625,"url":626},"Anthropic: Effective harnesses for long-running agents (2025)","https:\u002F\u002Fwww.anthropic.com\u002Fengineering\u002Feffective-harnesses-for-long-running-agents",{"title":628,"url":629},"Anthropic: Redesigning source control at Anthropic (2026)","https:\u002F\u002Fwww.anthropic.com\u002Fengineering\u002Fredesigning-source-control",{"title":631,"url":632},"METR: Measuring the Impact of Early-2025 AI on Experienced Open-Source Developer Productivity","https:\u002F\u002Fmetr.org\u002Fblog\u002F2025-07-10-early-2025-ai-experienced-os-dev-study\u002F",{"title":634,"url":635},"Chand et al.: Why Industry Migrates and When It Trusts LLMs (ESEM 2026)","https:\u002F\u002Fdrops.dagstuhl.de\u002Fentities\u002Fdocument\u002F10.4230\u002FLIPIcs.ESEM.2026.85",{"title":637,"url":638},"Li et al.: Environment-in-the-Loop: Rethinking Code Migration with LLM-based Agents (arXiv 2602.09944)","https:\u002F\u002Farxiv.org\u002Fabs\u002F2602.09944",{"title":640,"url":641},"AWS: Amazon Q Developer just reached a $260 million dollar milestone (2024)","https:\u002F\u002Faws.amazon.com\u002Fblogs\u002Fdevops\u002Famazon-q-developer-just-reached-a-260-million-dollar-milestone\u002F",{"title":643,"url":644},"OpenAI: Why SWE-bench Verified no longer measures frontier coding capabilities (2026)","https:\u002F\u002Fopenai.com\u002Findex\u002Fwhy-we-no-longer-evaluate-swe-bench-verified\u002F",{"title":38,"url":39},"\u002Fimages\u002Fblog\u002Fcoding-agents-legacy-codebase-migration\u002Fcover.webp","\u002Fimages\u002Fblog\u002Fcoding-agents-legacy-codebase-migration\u002Fog.jpg",[77,78,79],"Migrating a legacy codebase with coding agents: a strangler fig playbook","How to use coding agents on a legacy migration: characterization tests first, one seam per task, review gates and differential verification.","A stack of slabs with the top two replaced by fresh ones beside a seam and a check.",{"slug":653,"published":654,"minutes":655,"category":7,"tags":656,"keywords":662,"about":674,"sources":682,"cover":715,"og":716,"expertise":75,"locales":717,"lang":77,"title":718,"description":719,"coverAlt":720},"context-rot-compaction-long-running-agents","2026-10-16",10,[657,658,659,660,661],"Context rot","Compaction","Context engineering","Long-running agents","Agent memory",[663,664,665,666,667,668,669,670,671,672,673],"context rot","context rot LLM","compaction AI agents","context engineering","long-running agents context window","Claude compaction API","context editing clear tool results","OpenAI responses compaction","lost in the middle LLM","agent context management","sub-agents context isolation",[675,678,681],{"name":676,"url":677},"Context window","https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FLarge_language_model#Context_window",{"name":679,"url":680},"Attention (machine learning)","https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FAttention_(machine_learning)",{"name":547,"url":548},[683,686,689,692,695,697,700,703,706,709,712],{"title":684,"url":685},"Chroma: Context Rot: How Increasing Input Tokens Impacts LLM Performance (Jul 2025)","https:\u002F\u002Fresearch.trychroma.com\u002Fcontext-rot",{"title":687,"url":688},"Liu et al.: Lost in the Middle: How Language Models Use Long Contexts (2023)","https:\u002F\u002Farxiv.org\u002Fabs\u002F2307.03172",{"title":690,"url":691},"Modarressi et al.: NoLiMa: Long-Context Evaluation Beyond Literal Matching (2025)","https:\u002F\u002Farxiv.org\u002Fabs\u002F2502.05167",{"title":693,"url":694},"Anthropic: Effective context engineering for AI agents (Sep 2025)","https:\u002F\u002Fwww.anthropic.com\u002Fengineering\u002Feffective-context-engineering-for-ai-agents",{"title":696,"url":626},"Anthropic: Effective harnesses for long-running agents (Nov 2025)",{"title":698,"url":699},"Claude API docs: Compaction at a token threshold","https:\u002F\u002Fplatform.claude.com\u002Fdocs\u002Fen\u002Fbuild-with-claude\u002Fcompaction-threshold",{"title":701,"url":702},"Claude API docs: Compaction on demand","https:\u002F\u002Fplatform.claude.com\u002Fdocs\u002Fen\u002Fbuild-with-claude\u002Fcompaction-on-demand",{"title":704,"url":705},"Claude API docs: Context editing","https:\u002F\u002Fplatform.claude.com\u002Fdocs\u002Fen\u002Fbuild-with-claude\u002Fcontext-editing",{"title":707,"url":708},"Claude API docs: Memory tool","https:\u002F\u002Fplatform.claude.com\u002Fdocs\u002Fen\u002Fagents-and-tools\u002Ftool-use\u002Fmemory-tool",{"title":710,"url":711},"OpenAI API docs: Compaction","https:\u002F\u002Fplatform.openai.com\u002Fdocs\u002Fguides\u002Fcompaction",{"title":713,"url":714},"Cognition: Don't Build Multi-Agents","https:\u002F\u002Fcognition.ai\u002Fblog\u002Fdont-build-multi-agents","\u002Fimages\u002Fblog\u002Fcontext-rot-compaction-long-running-agents\u002Fcover.webp","\u002Fimages\u002Fblog\u002Fcontext-rot-compaction-long-running-agents\u002Fog.jpg",[77,78,79],"Context rot in long-running agents: clearing, compaction, memory and sub-agents","Why LLM accuracy drops as context grows, and how clearing tool results, compaction, notes and sub-agents keep long-running agents on track.","A small square press squeezing a tall stack of sheets into a short one, two notes branching off.",{"slug":722,"published":654,"minutes":723,"category":7,"tags":724,"keywords":728,"about":739,"sources":746,"cover":762,"og":763,"expertise":75,"locales":764,"lang":77,"title":765,"description":766,"coverAlt":767},"browser-agents-e2e-testing-playwright",7,[725,726,9,532,727],"Playwright","E2E testing","Test automation",[729,730,731,732,733,734,735,736,737,738],"playwright test agents","playwright planner generator healer","ai e2e testing","playwright mcp","llm generated playwright tests","self-healing tests","browser agent testing","playwright init-agents","ai test automation 2026","playwright cli skills",[740,742,745],{"name":725,"url":741},"https:\u002F\u002Fplaywright.dev\u002F",{"name":743,"url":744},"End-to-end testing","https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FSystem_testing",{"name":550,"url":551},[747,750,753,756,759],{"title":748,"url":749},"Playwright docs: Test agents (planner, generator, healer)","https:\u002F\u002Fplaywright.dev\u002Fdocs\u002Ftest-agents",{"title":751,"url":752},"Microsoft: Playwright MCP README (MCP vs CLI, accessibility snapshots)","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fplaywright-mcp",{"title":754,"url":755},"Playwright docs: Best practices","https:\u002F\u002Fplaywright.dev\u002Fdocs\u002Fbest-practices",{"title":757,"url":758},"Playwright docs: Locators","https:\u002F\u002Fplaywright.dev\u002Fdocs\u002Flocators",{"title":760,"url":761},"Browserbase: Stagehand README (act, extract, observe)","https:\u002F\u002Fgithub.com\u002Fbrowserbase\u002Fstagehand","\u002Fimages\u002Fblog\u002Fbrowser-agents-e2e-testing-playwright\u002Fcover.webp","\u002Fimages\u002Fblog\u002Fbrowser-agents-e2e-testing-playwright\u002Fog.jpg",[77,78,79],"Browser agents for E2E testing: let agents write Playwright tests, not run them","Where AI agents help with end-to-end tests: Playwright planner, generator and healer, MCP or CLI, and the guardrails that keep healed tests honest.","Small square modules on the left handing a plain rectangle to a closed rectangular loop on the right.",1792245345477]