← Back to Blog

Can a General-Purpose AI Agent Run Your Ads? The 4 Structural Constraints

We spent a month testing whether Claude Code and Codex could autonomously manage Meta ad campaigns. They broke at four structural points no prompt can fix.

Loof· Head of Growth

Hand-drawn illustration: the threshold between reading ads data and executing changes

Updated July 2026: Meta has since released an official MCP server. We address its implications in Constraint 1 and the FAQ below.

Last month, someone on our team wired Claude Code directly into the Meta Marketing API. The goal was simple: let it read campaign performance, decide what to do, and execute changes autonomously.

It read beautifully. It analyzed like a senior buyer.

Then it tried to act.

What followed wasn't a model failure. It was a structural failure — the kind no prompt engineering, larger context window, or better reasoning can solve.

We documented four constraints. They apply to Codex, Claude Code, ChatGPT with plugins, Manus, and any general-purpose coding agent trying to run ads autonomously.

The Short Version (TL;DR)

  1. The Permission Problem — Platforms treat autonomous agents as threats. You get throttled, flagged, or banned before you accomplish anything meaningful.
  2. The Guardrail Problem — There is no undo button on a $10,000 budget increase. Agents have no native mechanism for irreversibility-aware decision-making.
  3. The Data Interpretation Problem — The same metric in different business contexts demands opposite actions. APIs don't provide sufficient business context for reliable judgment.
  4. The State Problem — Agents don't natively maintain a continuously evolving business state. Without it, every decision is made in isolation.

The bottom line: Running ads is no longer an intelligence problem. It's an infrastructure problem. What determines whether your ads survive isn't the model. It's the guardrails.

The Framework

Every ad operation has two sides:

ANALYZEEXECUTE
General Agentyesno
Codex / Claude Codeyesno
ChatGPT + Pluginsyesno
MCP (Meta official)yes⚠️ Partial
Purpose-Built Systemyesyes

General-purpose agents excel at the left column. They can read data, identify patterns, generate hypotheses, and write analysis code faster than any human.

The right column is where they break. Execution requires permissions, guardrails, persistent state, and platform-specific safety logic that no foundation model provides out of the box.

Let's see why every stage to the right of that line exists.

Constraint 1: What happens when a platform decides you're a bot?

Platform enforcement gate slamming shut — irreversible disconnection

Meta enforces a hard 100 requests-per-second QPS limit on mutation endpoints — campaign, ad-set, and ad create/edit calls — per app and ad-account combination. That's the published number. The real limit is lower.

Behind the published rate limit sits a score-based behavioral detection system. Every API caller accumulates a reputation score. Unusual patterns — bulk edits at 3am, rapid campaign creation/deletion cycles, edit frequencies no human would produce — degrade your score silently.

You don't get a warning. You get a 24-hour cooldown. Or a permanent app review. Or a disabled ad account with $40,000 of active spend.

A developer named Leo built a Codex-powered ad manager earlier this year. It worked — until Meta's behavioral layer flagged the access pattern. His write-up documents exactly what happened.

What about Meta's official MCP server?

Meta released an MCP server in April 2026. It solves the authorization channel problem — you now have a sanctioned path. But MCP is a protocol layer, not an execution system. It tells you "access is allowed here." It doesn't tell you "what action to take and when." Rate limits, behavioral scoring, and account-safety logic still apply. You still need the infrastructure layer above MCP.

Running ads isn't just about whether you can call the API. It's about whether you survive calling it repeatedly over weeks and months.

Constraint 2: Why do execution guardrails matter more than intelligence?

Bot signal detection: perfect machine rhythm flagged against organic patterns

Here's a scenario that happens weekly in real ad accounts:

A campaign is overspending with a CPA 3× above target. An agent identifies this correctly. The "intelligent" response: pause it immediately.

But:

  • That campaign is the only one feeding the pixel with purchase events during a learning-phase reset.
  • Pausing it means the ad set behind it exits learning and resets — $2,000 of learning investment lost.
  • The correct action was to reduce budget by 30% and wait 48 hours, not pause.

There is no undo button. A budget scaled to $50,000 cannot be "un-scaled" — Meta's delivery system has already optimized around the new ceiling. A paused campaign in learning phase doesn't resume from where it stopped.

General agents have no native understanding of irreversibility. Every action looks the same to them — an API call that returns 200 OK.

Purpose-built systems encode irreversibility logic: cooling-off periods, graduated scaling steps, learning-phase protection rules, and human-in-the-loop gates for high-stakes changes.

Constraint 3: Why does ad data break general-purpose agents?

Data semantics confusion: same value in three incompatible containers

Meta's Insights API returns data like this:

{
  "actions": [{"action_type": "purchase", "value": "12"}],
  "action_values": [{"action_type": "purchase", "value": "1847.30"}],
  "purchase_roas": [{"action_type": "purchase", "value": "2.31"}]
}

Clean enough. But for an agent trying to decide what to do, the critical questions aren't in the payload:

  • Are these 12 conversions on a 7-day click window or 1-day?
  • Is this ad set still in learning phase? How much was spent to get these CVs?
  • Another ad set in the same account shows CPA = $45. Is that high or low? Depends on the category, AOV, historical baseline, and business target.

The API doesn't provide this business context. If you fed the agent learning-phase status, historical spend curves, category benchmarks, and attribution settings, it could absolutely do the analysis. But no out-of-the-box integration surfaces all of this reliably. The agent would need to assemble it from 5-7 separate API calls, cross-reference with stored business state, and apply category-specific heuristics.

That's not a prompting problem. That's an infrastructure problem.

Constraint 4: Why does statelessness kill autonomous ad management?

Stateless agent: fading across time, contradicting its own decisions

Monday. You launch a new ad set targeting US females 25-44, interest: skincare. Budget $50/day. CPA target: $28.

Tuesday. CPA is $47. The agent says: "Overspending. Pause."

Wednesday. You relaunch. CPA comes down to $24. Total learning-phase cost: $200 wasted.

Why? Because the agent on Tuesday had no memory that this ad set was 18 hours into a 7-day learning phase. It saw a number. It acted on the number.

A general-purpose agent doesn't natively maintain a continuously evolving business state. Claude Code has Project Memory. Codex has checkpoints. But these are notes — not a structured business state machine.

An ad set moving from learning phase to stable delivery. Budget climbing from $50 to $500 over three weeks. An audience going from cold-start to saturation. This continuous evolution needs to be tracked structurally — not recalled from a text file.

Purpose-built systems maintain this state as first-class infrastructure: phase tracking, budget trajectory, audience saturation curves, creative fatigue scores — all updated in real time, all feeding every decision.

So what actually works?

If you look closely, none of the four constraints above are model problems. A smarter GPT-5 or Claude 4 won't fix them. They're infrastructure problems:

  • Permissions require authorized, reputation-safe API access with behavioral compliance.
  • Guardrails require irreversibility-aware decision logic with cooling-off periods and human gates.
  • Data interpretation requires assembled business context from multiple sources, persisted over time.
  • State requires a structured, evolving representation of your business that survives across sessions.

We're not saying don't use Claude Code or Codex.

Quite the opposite — they're exceptional for analysis. Use Claude Code to build data pipelines, run one-off competitive teardowns, generate SQL, or prototype reporting dashboards. They're faster than any specialized tool for that work.

The hard part isn't analysis. It's execution.

Execution requires: real-time state tracking, platform guardrails, multi-step decision chains, and protection mechanisms for irreversible operations.

That's what GrowthGPT is built to do. It connects to Meta, Google, and TikTok through authorized channels; maintains persistent business state across every session; encodes platform-specific safety logic for every write operation; and keeps a human in the loop for high-stakes decisions while handling routine optimization autonomously.

The model is the brain. The infrastructure is what keeps the brain from burning down your ad account.

FAQ

Q: Does Meta's official MCP server solve the permission problem?

Partially. MCP provides a sanctioned access channel — that's real progress. But it's a protocol layer, not an execution layer. Rate limits, behavioral scoring, irreversibility, state management, and business-context assembly still require dedicated infrastructure above MCP.

Q: Can I build this infrastructure myself?

Technically yes. Realistically: 6-10 weeks for a basic framework + ongoing maintenance (API versions update quarterly) + token costs of $500-2,000/month/seat + every edge case you discover the hard way. For most teams, plugging into existing infrastructure (15-minute setup) is the more rational path.

Q: Will these four constraints disappear as models improve?

Constraints 3 and 4 (data interpretation and state) will partially improve as context windows grow and tool-use becomes more sophisticated. Constraints 1 and 2 (permissions and guardrails) are platform-imposed and business-logic-imposed — they exist because autonomous action is dangerous, and they will tighten, not relax, as more agents attempt to act autonomously.

Q: What about agents that claim to "run ads end-to-end"?

Ask three questions: (1) Do they have authorized write access, or are they screen-scraping? (2) Do they encode irreversibility logic, or do they just fire API calls? (3) Do they maintain persistent business state, or does every session start fresh? If any answer is no, they're a demo, not a product.


Related: TikTok's Agentic Hub Is Live. The Harder Problem Is Who Orchestrates Across Platforms. — every platform has an agent now; cross-platform allocation, memory, and judgment still don't. Also: GPT-5.6 Is Smarter. It Still Can't Run Your Ads. — a smarter model narrows the reasoning gap, not the permission gap.

Running ads is no longer an intelligence problem. It's an infrastructure problem. What determines whether your ads survive isn't the model. It's the guardrails.

Try GrowthGPT free