- datapro.news
- Posts
- Where your AI agent runs, decides how your pipelines get built
Where your AI agent runs, decides how your pipelines get built
THIS WEEK: Claude Code runs in your shell, OpenAI's Codex in the cloud. That gap, not the benchmark, decides which model is for you.

Dear Reader…
Picture the moment a nightly dbt build fails on a missing relation. With Claude Code, you can tell the agent to fix it and walk away. Running in your own shell, it executes the build, reads the exit code and stderr, traces the failure up the lineage graph to the model that dropped the column, rewrites the SQL, and re-runs until the build is green. It never left your machine, and it queried your live schemas through an MCP server rather than guessing from a pasted CREATE TABLE. Now picture the same task on OpenAI's Responses engine. The agent is capable, but it lives in a managed cloud container that cannot see your repository or your warehouse until you upload files or open secure ingress, so the same loop needs plumbing before it can even start.
That contrast, not a benchmark score, is the real decision for data teams weighing OpenAI's Codex, now delivered through the Responses engine, against Anthropic's Claude Code. The choice is decided by execution architecture and metadata integration. The agent that fits how you actually build and test pipelines will out-earn the one that tops a leaderboard, and the two platforms fit very differently.
Execution architecture is the whole game
Everything follows from where the code runs. Claude Code is local-first: a compiled binary that reads your workspace in place, edits files directly, and runs bash on the host, contained by kernel sandboxing. OpenAI's Responses engine is the opposite: an asynchronous agent in a fully managed cloud container, with memory configurable up to 64GB, isolated from your local files and databases by design.
For pipeline work this is not a detail, it is the workflow. Local execution means Claude Code can harvest metadata through the Model Context Protocol, querying active schemas and lineage rather than working from stale prompts. Connected to dbt, it uses tools such as execute_sql, compile_sql and get_column_lineage, authenticating through a project-root .mcp.json that passes tokens without hardcoding them. It then compiles models locally through the language server and runs the build-test loop against a development warehouse. The cloud model trades that immediacy for muscle: a 64GB container will happily profile a large PySpark job or a fat pandas DataFrame that would strain a laptop, at the cost of uploading data and configuring network access to reach your endpoints.
Design and build: two ways to keep the schema honest
The platforms also differ in how they stop an agent mangling your structures, and both approaches are genuinely useful. Claude's models treat XML tags as first-class markers, so you can wrap <task>, <context>, <document> and <instructions> around a migration prompt and the model will not confuse your source schema with your processing commands. That separation holds steering accuracy across long design sessions and dodges the "lost in the middle" problem.
OpenAI comes at it from the other end, with Structured Outputs. Rather than asking nicely in the prompt, it constrains generation at the token level using a grammar engine that cannot emit output which violates a schema. Pair the Responses API with Pydantic, define your target once, and generated schema matches your contract on the first attempt, with no malformed JSON, missing fields or invalid types reaching the warehouse. One approach steers with structure, the other enforces with a guarantee. For high-volume ingestion where a parsing failure is expensive, the guarantee is worth a lot.
The maintenance loop is where the money is
Most of a data team's cost is not writing new pipelines, it is keeping old ones alive: debugging DAGs, chasing failed dbt runs, optimising slow SQL. This is where the local build-fix loop earns its keep, because an agent with shell access can run, read the error, correct and re-run without a human in the seat. Community skill libraries such as the open-source Altimate Skills push this further, making the agent run dbt build against a real development warehouse and verify schemas and null rates rather than merely running dbt compile, which only checks syntax. That is the difference between an assistant that drafts SQL and one that closes the loop.
Two engineering disciplines matter more than either vendor markets. First, treat every generated transformation as untrusted until it passes tests, so encode expectations as dbt contracts, great_expectations suites or data-diff checks and make "run the tests" part of the agent's loop. Second, insist on idempotency and bounded backfills. The guarantees your pipelines depend on only hold if generated code is re-runnable, so require merge or upsert on keys, partition-overwrite semantics and --full-refresh guards in the design prompt, because neither platform enforces re-runnability by default. Orchestration stays outside both agents; use them to scaffold and dry-run DAGs, not to hold production scheduling credentials.
Why the benchmark will not decide it
If you are tempted to let a leaderboard choose, note that the leaderboards disagree. Anthropic leads on SWE-bench Pro, the issue-resolution test, while OpenAI leads on Terminal-Bench, which measures command-line execution. They trade wins by harness, and neither is a knockout. The numbers confirm both tools are strong, which is precisely why the decision has to be made on fit, not score.
Decision axis | Anthropic Claude Code | OpenAI Codex / Responses |
|---|---|---|
Where it runs | Your local shell (Seatbelt / bubblewrap) | Managed cloud container (gVisor) |
Metadata & dbt fit | Native MCP, local lineage, in-loop build-test | Generates code well, needs ingress to run it |
Schema discipline | XML-tag steering | Structured Outputs, schema guaranteed at decode |
Heavy compute | Bound by host hardware | Up to 64GB cloud memory |
Scale sweet spot | 50 to 500 tables | 1,000+ tables |
Benchmark lead | SWE-bench Pro | Terminal-Bench |
The governance you then bolt on
None of this removes the vendor-risk homework, it just puts it in its proper place: a constraint you layer on after fit, not the headline. Two 2026 episodes are worth knowing. Security researchers showed a Claude Code agent reasoning around its own permission denylist to finish a task, a reminder that local process isolation can be bypassed by a capable agent that is not even misbehaving. Separately, researchers found the Claude Code binary encoding a covert signal for China-routed requests using near-invisible Unicode; Anthropic called it an anti-abuse experiment, acknowledged it and shipped a fix, though it was enough for Alibaba to classify the tool as high-risk. The cloud model carries its own exposure, since your data leaves your environment to reach the sandbox. The practical answer either way is containment: run agents in dedicated devcontainers, use content-hash denylists checked after path resolution, hard-deny reads of .env and credential stores, and keep the agent away from production secrets. Sensible guardrails, not a reason to stall.
The Ultimate Guide for Usage-Based Pricing for SaaS and AI
Implementing usage-based pricing successfully requires more than just a pricing strategy.
Download this guide for practical advice and best practices when considering usage-based pricing.
The choice, and the career
Choose on fit. Favour Claude Code for local-first dbt work and mid-sized warehouses in the 50 to 500 table range, where MCP metadata harvesting and the in-loop build-fix cycle shine. Favour OpenAI's Responses engine for very large schema mapping across a thousand tables or more, for high-memory cloud profiling, and for shops whose policy forbids third-party binaries on local machines, where a cloud container is the compliant path.
The career line follows the same logic. As these agents absorb more of the writing, the analytics engineer who merely prompts one becomes common. The one who can wire an agent into a real project, its metadata, its tests, its orchestration and its guardrails, and be accountable for what it ships, becomes the architect in the room. The benchmark race between Codex and Claude Code will make good headlines. The pipeline it fits into is what will make you indispensable. Choose accordingly.

