Skip to main content

Gartner Says 40% of Agentic AI Projects Will Die by 2027 — the Deploy Target Is the Governance Gap

11 min readDora NodaDora Noda
Share
On this page

Over 40% of agentic AI projects will be canceled by the end of 2027. That is not a blogger's hot take — it is Gartner's June 2025 forecast, based on a poll of more than 3,400 organizations, and it names three killers: escalating costs, unclear business value, and inadequate risk controls. Here is the part most teams miss: two of those three are decided not by the model you pick, but by the deploy target your agents push to.

The models are not the bottleneck. Background coding agents — Devin, Cursor's background agents, Claude Code running headless — can already scaffold, migrate, and ship working code while you sleep. What they cannot do is answer the questions your security team asks on Monday morning: which agent changed production, under whose authority, inside what blast radius, and how do we roll it back? If your infrastructure cannot answer those questions, your agentic project is not a platform bet. It is an ungoverned experiment with production credentials — exactly the kind Gartner expects to get canceled.

So here is the checklist, up front. Before a background agent touches production, your deploy target must provide all five of these. Anything missing is a cancellation reason waiting for its incident.

#RequirementWithout it, you get…
1Scoped agent identity (not a shared API token)Every agent action is unattributable; one leaked token is full access
2An audit trail keyed to the agent, wired to your SIEM"Who deployed this?" becomes a forensics project
3Sandboxed build and execution, isolated per sessionPrompt injection becomes remote code execution on your infra
4PR and policy gates no agent can bypass45% of AI-written code ships its vulnerabilities straight to prod
5Cost and rollback guardrails on agent-driven deploysRunaway agents burn budget and leave no clean revert path

The rest of this post substantiates each line with 2026 field evidence — and shows what "good" already looks like.

Why governance, not models, kills agentic projects

Start with the code-quality numbers, because they set the stakes for everything downstream. Veracode's 2025–2026 research across more than 100 large language models found that AI-generated code introduces security vulnerabilities in 45% of development tasks — only 55% comes out free of known flaws. Aikido Security's 2026 report found 69% of organizations had discovered vulnerabilities in AI-generated code, even as AI-written code reached 24% of production code globally, and attributed roughly one in five security breaches to AI-written code. A March 2026 survey of 241 developers by Pentest-Tools.com found 51% had discovered security flaws in AI-assisted code after it was already in production.

Read those together and the conclusion is uncomfortable: nearly half of what your background agent writes needs a control to catch — a review gate, a scanner, a sandbox — before it earns production. Teams that bolted a chat interface onto infrastructure with no such controls are now discovering what "inadequate risk controls" means in practice. It means the agent that auto-merged at 3 a.m. shipped a SQL injection your scanner would have caught if the scanner had been in the loop. Gartner's forecast is, in that light, less a prediction than a scheduled audit.

Add "agent washing" — Gartner's term for vendors rebranding chatbots and assistants as agents — and the picture sharpens. Gartner estimates only about 130 of the thousands of self-described agentic AI vendors are real. Many canceled projects will turn out never to have been agentic at all: a demo that impressed, a pilot with no identity model, no audit story, and no path to production governance. The survivors will be the teams that treated the deploy target as part of the agent system from day one.

1. Scoped agent identity, not a shared API token

The most common governance failure is also the most basic: the agent acts with someone else's credentials. A background coding agent holding a shared deploy token — or worse, a human engineer's personal access token — collapses every action by every agent into one identity. When something breaks, the audit log says a trusted human did it. When the token leaks through a prompt-injection exfiltration, the attacker inherits everything the token could do.

The bar for 2026 is workload identity for agents: short-lived, cryptographically verifiable, scoped to the task. The building blocks are converging on open standards. SPIFFE/SPIRE issues X.509 and JWT SVIDs that attest which workload is calling, and Microsoft's Entra Agent ID plus the identity-spiffe project extend that to agent-to-agent authorization with cross-cloud federation. The Kagenti ecosystem guide puts the principle bluntly: workload identity via SPIFFE/SPIRE, not just API keys. On the product side, Devin's enterprise tier now ships SSO with just-in-time provisioning, SCIM group sync, and RBAC with named permissions — the boring enterprise controls that turn "an agent did something" into "this scoped identity, provisioned through our IdP, did exactly this."

If your deploy target still authenticates automation with one long-lived token per environment, your agents are flying without identity. Scope it, shorten its lifetime, and make the agent prove what it is on every call — or accept that your blast radius is "everything the token touches."

2. An audit trail keyed to the agent, wired to your SIEM

Identity without records is theater. The question your incident review will ask — "which agent did this, what tools did it call, with what parameters, and what came back?" — must be answerable from logs, not reconstructed from chat transcripts. That means every agent action lands in a tamper-evident trail keyed to the agent's identity, and that trail flows into the same SIEM your security team already watches. An audit log that lives only inside the agent vendor's dashboard, exportable by hand after the fact, is a souvenir, not a control.

The enterprise end of the market already expects this. Devin exports session transcripts to customer SIEMs and retains them for the customer relationship. Coder's AI governance story ships audit, connection, and provisioner logs to the customer's own log backend. The emerging pattern in open agent frameworks is a hash-chained audit entry per tool call — agent identity, tool name, parameters, result, timestamp — so the record is tamper-evident even if the agent's own host is compromised.

Ask your deploy target two questions: can I trace any production change back to the specific agent session that made it, and does that trace arrive in my SIEM without manual export? If either answer is no, your agents are operating outside your detection surface. Gartner's "inadequate risk controls" is, in concrete terms, exactly this gap.

3. Sandboxed execution, isolated per session

Background agents execute code — running builds, tests, migrations, shell commands — and every execution environment they touch is an attack surface. 2026 supplied the case studies. Cursor disclosed CVE-2026-26268 (CVSS 9.9): a sandbox escape via malicious .git configuration, where a prompt-injected agent could write git hooks that execute outside the sandbox on the next trigger. Two more sandbox-bypass flaws (CVE-2026-50548 and CVE-2026-50549) showed prompt injection achieving remote code execution through the IDE's command-execution sandbox.

Manifold Security reported pre-trust command execution in August 2026. Each case teaches the same lesson: the sandbox boundary around an agent is load-bearing, and it will be tested by adversarial input, not just buggy code.

The industry response points to where this is going: execution moving into customer-controlled sandboxes. In September 2026, Cloudflare announced Cursor Cloud Agents running on Cloudflare Sandboxes, with self-hosted worker pools as named routing targets — Cursor keeps the agent loop (planning, orchestration), while terminal, filesystem, repos, build caches, and secrets stay inside infrastructure the customer controls, with per-session isolation between agent workloads. Modal, Coder Workspaces, and GitHub-hosted environments offer the same shape: the agent's hands operate inside a disposable, isolated box you own, not on a shared runner with your production secrets mounted.

Your deploy target's build step deserves the same treatment. If agent-triggered builds run on persistent runners with ambient credentials and no per-session isolation, a single prompt injection can persist, pivot, and exfiltrate. Sandbox per session, destroy at session end, and keep the secrets on your side of the boundary.

4. PR and policy gates no agent can bypass

Recall the Veracode number: 45% of AI-generated code carries a known vulnerability. That statistic is not an argument against agents — it is the precise specification for the gate between the agent and production. Every agent-produced change must travel the same road as human code: pull request, required review, static analysis, secret scanning, policy checks — with no fast lane for automation. The moment agents get a "skip review" path because "it's just the bot," the 45% number becomes your incident rate.

This is also where least privilege meets the deploy pipeline. The agent's identity should be authorized to open PRs and trigger staging builds, not to merge to main or push to production. Human approval stays on the merge; automated policy (vulnerability thresholds, license checks, migration safety) stays mandatory. Teams running this well treat agent PRs like junior-engineer PRs: welcome, often good, always reviewed. Teams running it badly discover — like the 51% in the Pentest-Tools survey — that review-after-production is just incident response with extra steps.

Concretely: if your deploy target lets any credentialed caller push straight to production with no gate, it is not ready for agents. The gate is not bureaucracy; it is the control that converts a 45%-vulnerable input stream into a production-safe output stream.

5. Cost and rollback guardrails on agent-driven deploys

Gartner's first two killers — escalating costs and unclear business value — also land on the deploy target. An agent that can provision infrastructure, scale services, and trigger builds on every commit is an agent that can surprise you with a cloud bill. Background agents work while you sleep; without per-agent budgets, scaling caps, and spend alerts keyed to the agent identity from requirement #1, "autonomous" quietly becomes "unaccountable."

And when an agent ships something bad — not if — the rollback path must be as automated as the deploy path. Immutable releases, one-command revert, and database migrations that roll forward safely are table stakes for human teams; they are doubly so when the author is a process that cannot feel embarrassed at the postmortem. Every agent-driven deploy should record its provenance (which session, which commit, which gate approvals) alongside the artifact, so rollback is a decision, not an investigation.

What "good" already looks like in 2026

None of this is hypothetical tooling. Assemble the pieces above and the production-ready agent deploy target is describable today: SSO-provisioned agent identities with RBAC (Devin's enterprise model), session transcripts and audit events streaming to your SIEM, execution in per-session sandboxes on infrastructure you control (the Cloudflare–Cursor pattern), mandatory PR and policy gates between agent output and production, and per-agent cost caps with automated rollback. Open standards — SPIFFE for identity, OIDC for federation, hash-chained audit events — keep the design portable instead of locked to one vendor's dashboard.

Notice what that list is: it is a deploy target designed to answer "which agent did this and what could it have done" as a first-class query, not as archaeology. Teams building that target now — on machines they own, with logs they control — are buying the governance that keeps their agentic projects out of Gartner's 40%. Teams bolting agents onto infrastructure that cannot answer the question are scheduling their own cancellation review.


The 40% forecast is dated end of 2027. That is a budget cycle away — enough time to close the gap, and short enough that starting now matters. Pick one background agent workflow, run it against the five-line checklist above, and fix the first missing control this sprint. Your future incident review will thank you.

Bex.co is the open-source, AI-native Render alternative — push a git repo, get a running HTTPS service on machines you own, with deploy history and infrastructure state your agents can actually operate on. Star the repo on GitHub or deploy your first app today.

Related articles

Give your agents a chain backend

Autonomous agents hit RPC endpoints very differently than people do. See what bex router handles on their behalf.

Read the agents guide