Community Article
Community articles are authored by SitePoint Premium contributors. Content is screened before publication, and SitePoint reserves the right to moderate or remove articles that violate our guidelines. Views expressed are those of the authors and do not necessarily reflect those of SitePoint.
Why the Agent Isn’t the Hard Part: Where Developers Go Wrong With Agentic Workflows
DJDiv JohnPublished inAI·Developer Tools·
November 23, 2026
·Updated:November 23, 2026
The AI briefing for Developers
Stay up to date with AI tools, model releases, and developer workflows that matter.
Weekly. Free. One click to leave.
SitePoint Premium
Stay Relevant and Grow Your Career in Tech
- Premium Results
- Publish articles on SitePoint
- Daily curated jobs
- Learning Paths
- Discounts to dev tools
7 Day Free Trial. Cancel Anytime.
You can build an AI agent in an afternoon now. Pick a model, write a loop, hand it a few tools and watch it book a meeting or open a pull request. The demo works, and everyone in the room is impressed.
Then it meets a real system with real permissions and real customers, and things get quiet. Gartner has predicted that over 40% of agentic AI projects will be canceled by the end of 2027, citing rising costs, unclear business value and inadequate risk controls. Its analyst Anushree Verma described most current projects as early-stage experiments that are driven by hype and often misapplied. A forecast is not a measurement, but the pattern it describes matches what many teams report: the agent is rarely what breaks. The workflow around it is.
This article covers where that workflow tends to fail, with a focus on permissions, tool connections and human approval. It includes a small, runnable policy gate in JavaScript, compares the main safeguards and notes their limits. Standards and guidance change quickly in this area, so check the linked
Key Takeaways
- The model is rarely the differentiator. Teams often have access to similar frontier models, so reliability depends on the system around them.
- Permissions come before prompts. Narrow tool scopes and downstream authorization limit damage when a model makes a mistake.
- Connecting tools is easy and risky. Treat every tool server like a dependency running with real credentials.
- Gate on reversibility, not on volume. Approving every step trains people to stop reading.
- Log what happened. A replayable trail turns an odd result into something you can debug.
The Model Is Not the Whole System
A year or two ago the model was often the differentiator. Today many teams can reach the same frontier models through the same kinds of APIs, so if the intelligence is similar, the advantage has to come from somewhere else.
Anthropic’s guide to building effective agents reached a similar conclusion after working with teams building agents. It reports that the most successful implementations were not using complex frameworks or specialized libraries, and were building with simple, composable patterns instead. It also separates workflows, where code paths are predefined, from agents, where the model chooses its own steps, and advises using the simplest approach that works and adding complexity only when measurement shows it helps.
That should change where developers spend their time. Frameworks matter, but three less glamorous questions matter more: what can the agent touch, when does it stop, and who checks its work?
Design the Permissions Before the Prompt
The OWASP guidance on Excessive Agency names what goes wrong here. It covers agents that can do more than they need to, and it traces the problem to three root causes: excessive functionality, excessive permissions and excessive autonomy.
In practice this looks familiar. An agent that only needs to read tickets is given a token that can also close them. A summarization tool connects with an admin account because that was quicker to set up. A generic “run shell command” tool is exposed when the agent only ever needs to write one file.
The fix is ordinary engineering discipline applied to a new kind of caller. OWASP’s recommendations include giving each tool only the functions and permissions it needs, preferring narrow tools over open-ended ones, running actions under the user’s own scoped identity, requiring human approval for high-impact actions and enforcing authorization in the downstream system rather than letting the model decide. The last point is the important one: a model can be talked out of a rule written in a prompt, but an API that checks scopes cannot.
Make the risky properties of a tool explicit in its definition so your orchestration layer can act on them:
const tools =[{name:"read_ticket",scope:"tickets:read",reversible:true},{name:"draft_reply",scope:"drafts:write",reversible:true},{name:"send_reply",scope:"email:send",reversible:false,requiresApproval:true},];Nothing clever is happening there, which is the point. The decision about what needs a human is made by a developer at design time, not by a model at runtime.
A Small Policy Gate You Can Run
The definitions above only help if something enforces them. The sketch below is a policy gate that sits between the model and your tools. It checks that the tool exists, that the caller was granted the scope, and whether the action is reversible, and it records each decision. It runs on Node.js 18 or later with no dependencies.
constTOOLS={read_ticket:{scope:"tickets:read",reversible:true,requiresApproval:false},draft_reply:{scope:"drafts:write",reversible:true,requiresApproval:false},send_reply:{scope:"email:send",reversible:false,requiresApproval:true},};exportfunctiondecide(call, grantedScopes){const tool =TOOLS[call.name];if(!tool)return{action:"deny",reason:"unknown tool"};if(!grantedScopes.includes(tool.scope)){return{action:"deny",reason:`missing scope${tool.scope}`};}if(tool.requiresApproval||!tool.reversible){return{action:"wait_for_human",reason:"irreversible action"};}return{action:"run",reason:"reversible and in scope"};}exportfunctionaudit(log, call, decision){log.push({at:newDate().toISOString(),tool: call.name,args: call.args,...decision });}A short test file shows the behavior. Unknown tools and missing scopes are denied, reads run, and the irreversible send waits for a person:
import{ decide, audit }from"./gate.mjs";importassertfrom"node:assert/strict";const scopes =["tickets:read","drafts:write","email:send"];assert.equal(decide({name:"read_ticket"}, scopes).action,"run");assert.equal(decide({name:"send_reply"}, scopes).action,"wait_for_human");assert.equal(decide({name:"send_reply"},["tickets:read"]).action,"deny");assert.equal(decide({name:"run_shell"}, scopes).action,"deny");const log =[];audit(log,{name:"read_ticket",args:{id:7}},decide({name:"read_ticket"}, scopes));assert.equal(log.length,1);console.log("ok", log[0].action);This is deliberately minimal. A real system would load scopes from the user’s actual session, enforce the same scopes again in the downstream API, and store the audit log somewhere durable. The gate is a second line of defense, not a replacement for authorization in the systems the agent calls.
MCP Makes Connection Easy, and That Is the Problem
The Model Context Protocol has become a common way to connect agents to tools. Anthropic donated MCP to the Agentic AI Foundation, a directed fund under the Linux Foundation, in December 2025. Block contributed goose and OpenAI contributed AGENTS.md as founding projects, which shows how central the ecosystem has become.
A standard protocol is good news. It also means you can install a tool server in minutes and expose every endpoint of your issue tracker, repository or CRM to your agent, whether it needs them or not. Easy connection quietly pushes more power to the agent.
The protocol’s own security best practices document covers several relevant risks, including confused deputy problems in proxy servers, token passthrough, local server compromise and scope minimization. For scopes, it recommends starting with a minimal set and elevating only when a privileged operation is first attempted, and it lists wildcard or omnibus scopes as a common mistake.
A sensible rule is to treat every tool server like a third-party dependency running with production credentials. Review the tools it exposes, switch off the ones the workflow does not use, pin versions and log every call. If you would not let a new contractor do it on day one, the agent should not do it either.
Put the Human Where the Risk Is
Human-in-the-loop design is often implemented as “approve everything”. That fails in a predictable way: people click approve forty times a day and stop reading by lunchtime.
A better rule is to gate on reversibility. Reads run freely, reversible writes run and get logged, and irreversible actions such as sending, paying or deleting wait for a person. Everything leaves a trace that a developer can replay when something looks odd. The gate above implements exactly this split.
Some teams build these pieces themselves, and others buy them. Elsewhen, a London-based consultancy that works on agentic operations for enterprise teams, describes its own service in similar terms. Its page lists approval gates where people sign off consequential decisions, an audit trail of what each agent read and which systems it touched, and a shared layer of permissions and guardrails that is reused across workflows. Elsewhen also says its Planet Agent report found that agents tend to start at the edges of an organization, where tasks are repeatable and mistakes are cheap, and then move toward the core. Treat that as the vendor’s own finding, and ask for the underlying evidence before relying on it.
The same logic applies outside engineering. The first question worth asking any AI partner is what they have actually put into production, and developers can ask the same of their own work.
Comparing the Safeguards
No single control is enough. The table summarizes what each safeguard does well and where it falls short.
| Safeguard | What it does well | Where it falls short |
|---|---|---|
| Narrow tool scopes | Limits the damage a wrong call can do | Needs upkeep as tools and workflows change |
| Downstream authorization | Cannot be argued around by a prompt | Only protects systems that implement it properly |
| Reversibility gate | Keeps humans for the actions that matter | Depends on classifying tools correctly |
| Approval for everything | Feels safe and is easy to explain | Approval fatigue makes it weak in practice |
| Audit logging | Makes incidents debuggable | Helps after the fact; it does not prevent anything |
Limits and Open Questions
- Forecasts such as Gartner’s are predictions about project outcomes, not measurements of how any one system performs.
- Guidance from standards bodies and protocol authors is evolving, and some documents are drafts.
- A policy gate depends on accurate tool metadata. A tool wrongly marked reversible will bypass review.
- Prompt-injection risks remain even with narrow scopes, because a model can be misled into using the tools it legitimately has.
- Vendor descriptions of their own services reflect their positioning, so verify claims with references and evidence.
What is excessive agency?
It is the OWASP term for an agent that can do more than it needs to, caused by excessive functionality, permissions or autonomy.
Why not just ask the model to follow rules?
A prompt rule can be bypassed or ignored, while a scope check in the downstream API is enforced regardless of what the model says.
Should every agent action need approval?
Usually not. Gating on reversibility keeps humans focused on actions such as sending, paying and deleting, and avoids approval fatigue.
Are MCP servers safe to install?
Treat them like any third-party dependency. Review the tools they expose, limit scopes, pin versions and log calls.
Boring Is the Feature
The agentic projects that survive the next two years will probably not be the ones with the most ambitious autonomy. They will be the ones where someone sat down early and decided what the agent could touch, what it had to ask about and how anyone would know what it did.
That work does not demo well and it will not trend on social media. It is still the part that decides whether your agent becomes infrastructure or ends up among the projects that get cancelled.


