---
title: "Claude Code and Codex in the Enterprise: The Context Gap"
url: "https://atlan.com/know/ai-agent/context-layer/claude-code-codex-context-gap/"
description: "Claude Code and Codex have enterprise controls. But a safe agent is not the same as an agent that knows your business. Learn what context they still need."
author: "Karthik Pasupathy"
author_role: "Contributing Writer — AI Context & Agents"
published: "2026-08-05"
updated: "2026-08-05T00:00:00.000Z"
---

---

A harness decides whether Claude Code or Codex is allowed to touch a system. It does not decide whether the change is right for the business. Atlan's Enterprise Data Graph, **MCP Server**, and **Context Agents** close that second gap, giving both tools governed business context instead of asking every team to rebuild the same understanding by hand.

Building that understanding requires five types of enterprise context:

* **Business knowledge for accuracy.** The agent must understand how the company defines terms such as customer, revenue, and amount, and which tables or schemas are authoritative.

* **Team expertise for safe changes.** The agent must know how the team tests, reviews, deploys, monitors, and rolls back changes.

* **Policy norms for governed action.** The agent must understand who owns the affected systems and data, which changes require approval, and what information cannot move between environments.

* **Shared context for consistency.** Claude Code, Codex, and internal agents must work from the same approved definitions and rules.

* **Portable context for reuse.** Enterprise context should exist outside any single agent harness and be available through interfaces such as MCP or APIs.

---

## What do Claude Code and Codex already solve well?

Claude Code and Codex can plan changes, edit code, run tests, fix bugs, and prepare pull requests. Their growing ability to work independently has shifted the enterprise conversation from whether coding agents are useful to how much access they should receive.

Both products have meaningful [controls for managing agent access](https://atlan.com/know/ai-agent-risks-guardrails/).

[**Claude Code**](https://code.claude.com/docs/en/security) provides:

* A permission-based architecture that defaults to read-only access, asking for approval before editing files or running non-read-only shell commands
* An optional Bash sandbox that enforces filesystem and network boundaries
* Separate permission and trust controls that govern MCP servers
* Access to its SOC 2 Type 2 report and ISO 27001 certificate through Anthropic's Trust Center, the same [enterprise-ready AI agent](https://atlan.com/know/ai-agent/enterprise-ready-ai-agents/) bar any harness has to clear

**Codex** provides:

* [Sandboxed execution environments and configurable approval policies](https://openai.com/index/running-codex-safely/) to control filesystem changes, network access, and actions that cross the sandbox boundary
* Role-based access control so [enterprise administrators](https://help.openai.com/en/articles/11390924) can manage access
* OpenTelemetry exports for events such as approval decisions and MCP usage

Cursor and GitHub Copilot have converged on a similar shape of controls, the same ground [how to build an AI agent harness](https://atlan.com/know/how-to-build-ai-agent-harness/) and [what is harness engineering](https://atlan.com/know/what-is-harness-engineering/) cover in depth.

These controls make Claude Code and Codex ready to operate within enterprise technical boundaries. But a production rollout depends on two forms of readiness:

* **Harness readiness.** The agent harness should execute within defined technical boundaries, using controlled tools, permissions, approvals, and network access.

* **Context readiness.** The agent should understand the business meaning, ownership, history, and policies behind the systems and data it is changing.

![Harness readiness vs. context readiness: the harness decides whether a coding agent CAN act (sandboxing, permissions, audit logs, approvals); context decides whether it SHOULD act (business definitions, data ownership, team norms, policy rules)](/img/claude-code-codex-context-gap-1-harness-vs-context.webp){width=1672 height=941}

Claude Code and Codex provide strong controls for harness readiness. They do not, by themselves, supply the understanding required for context readiness. This is the gap Atlan addresses with the [Context Layer for AI](https://atlan.com/know/what-is-context-layer/): governed, current information about what enterprise data means, who owns it, and what actions are allowed.

To understand why this context layer matters, we first need to examine the risks that remain even when the agent harness works as intended.

---

## What risks arise when an agent harness lacks context readiness?

Here's the scenario the harness checklist doesn't cover.

A coding agent is pointed at a production repo. It reads the schema, identifies a column named amount, and performs a migration that changes how a billing pipeline calculates totals. The harness approved the change. The sandbox verified it ran. The tests passed.

The problem: amount means pre-tax in the orders table and post-tax in the invoices table. The agent didn't know. The migration looked correct. But, in reality, it was wrong.

Nothing in the harness catches this. A schema doesn't declare which convention it follows; a column named amount looks identical either way. A sandbox verifies that code runs, not that it acts on the right assumption, and a passing test suite confirms the migration matches whatever the test author encoded, wrong convention included.

A second failure traces to the same missing input. A coding agent cleaning up dead code finds an API endpoint with no recent calls in the logs and proposes deprecating it. The endpoint is not dead: a quarterly reconciliation job outside the logging pipeline the agent checked calls it every three months. The harness approves the deprecation, the untouched tests pass, and the job fails weeks later. Lineage, not code cleanliness, was the missing input.

This is the gap. A harness can prevent a coding agent from deleting files or accessing systems outside its approved environment. But it cannot stop the agent from confidently rewriting a billing pipeline based on a misunderstanding of what "amount" means, or from retiring a dependency it never had visibility into.

A large lottery and gaming operator, after evaluating agent harnesses across the business, said the harnesses were "still missing a part." They didn't solve the accuracy problem or reduce hallucinations. The operator called [Atlan](https://atlan.com/know/ai-agent/enterprise-ready-ai-agents/) the only tool addressing the full context problem.

Avoiding these failures requires more than tighter execution controls. A coding agent needs three forms of organizational understanding: knowledge of what enterprise data means, expertise in how the team develops and operates systems, and norms that define ownership, approvals, and permitted actions.

  Want the full picture of what a context layer covers?
  Get the plain-language breakdown of what a context layer is, why coding agents need one, and how it differs from a harness.
  Get the Ebook

---

## Knowledge: What your enterprise data means

Knowledge is the organization-specific meaning attached to code, data, schemas, metrics, and business terms. It tells a coding agent which sources are authoritative and how the company defines concepts such as customer, revenue, and amount. More broadly, [research on context engineering](https://arxiv.org/abs/2507.13334) treats an agent's input context as something that must be deliberately assembled and managed, not something a bigger context window solves on its own.

For example, a coding agent reading a field called revenue_amount cannot determine from the name alone whether it represents gross revenue, net revenue, or annual recurring revenue. It also cannot know whether finance changed that definition last quarter or whether another table has become the approved source. That ambiguity is exactly what keeps the [semantic layer](https://atlan.com/know/semantic-layer/) an agent reads from honest rather than just fast to query.

This knowledge helps Claude Code, Codex, or another coding agent [select the correct enterprise data](https://atlan.com/know/ai-agent/how-to-give-ai-agents-access-to-enterprise-data/), interpret fields accurately, and write changes that reflect current business definitions. When the available context is incomplete or conflicting, the agent can identify the ambiguity rather than make an unsupported assumption.

Without this organizational knowledge, an agent starts with a [cold-start problem](https://atlan.com/know/ai-agent-cold-start-problem/). [Context bootstrapping](https://atlan.com/know/context-bootsrapping/) uses existing signals such as lineage, SQL history, dashboards, and documentation to give the agent a more informed starting point, rather than a blank instruction file it has to fill in by trial and error.

---

## Expertise: How your team reviews, ships, and rolls back changes

Expertise is the practical knowledge of how a team develops, tests, reviews, deploys, monitors, and rolls back changes. These practices may not be visible in the source code, and they often differ across teams within the same company.

For example, a change to a payments service may require an integration test, reviews from the platform and finance teams, and a staged rollout with a documented rollback procedure. Another service in the same repository may follow a different process entirely, with no shared file that says so.

Equipping a coding agent with this expertise helps it prepare the right tests, request the appropriate reviewers, and follow the appropriate deployment process. The result is not only technically valid code but also a change ready to move through the organization's actual [software-development workflow](https://atlan.com/know/ai-agent/ai-agents-for-sdlc/), the same discipline [agent engineering](https://atlan.com/know/agent-engineering/) is meant to instill across a coding agent's whole lifecycle, not only the moment it writes a diff.

---

## Norms: What the agent is allowed to do

Norms are the organizational rules that define ownership, approval requirements, data restrictions, and acceptable actions. They tell the agent which decisions it can make independently and when it must stop or involve a person.

For example, a coding agent may encounter a service containing personal data, a schema change that requires approval from the data-platform team, or a regulated table that cannot be copied outside a particular region. A technically valid change could still violate company policy if the agent is unaware of these restrictions, often the same root cause behind a shaky [AI agent identity](https://atlan.com/know/ai-agent/ai-agent-identity/) setup: access and permission inherited from a role nobody actually reviewed.

These norms become [policy context](https://atlan.com/know/ai-agent-governance/) that helps the agent recognize sensitive actions before executing them, route changes to the correct owner, and avoid prohibited data movement. The [NIST AI Risk Management Framework](https://www.nist.gov/itl/ai-risk-management-framework) places governance across the AI lifecycle, reinforcing that these rules should shape the system before an agent acts, not only after an incident forces a review. The harness enforces technical boundaries, while organizational norms tell it which business boundaries must be enforced. A model doesn't need a defect to go wrong here; it just needs to be confidently unaware of a rule it was never given, more often the cause behind [AI agent hallucination](https://atlan.com/know/ai-agent-hallucination/) than an actual model error.

  Not sure where your own context gap sits?
  Run the Context Gap Calculator to see which category, knowledge, expertise, or norms, is thinnest for Claude Code or Codex on your team right now.
  Try the Gap Calculator

---

## Can one context source serve Claude Code, Codex, and internal agents at once?

Yes, if the context exists outside any individual agent harness and is shared through standard interfaces.

An enterprise may use Claude Code in one repository, Codex in another, ChatGPT for adjacent workflows, and custom agents for internal systems. If each tool maintains its own definitions and policies, they can develop conflicting interpretations of the same business. That is the horizontal exposure [what general-purpose AI agents need](https://atlan.com/know/ai-agent/context-layer/context-requirements-for-general-purpose-ai-agents/) from a context layer covers in more depth, for the broader category of general-purpose agents beyond coding specifically.

Atlan provides a shared Context Layer for AI across these tools, bringing together business definitions, data ownership, lineage, policies, and usage information so agents can work from governed organizational context rather than infer meaning from code and schema names.

[Context Agents](https://atlan.com/know/context-agents/) help build and maintain this shared source, analyzing signals such as query history, lineage, column usage, BI semantic models, and existing documentation to generate and enrich the business context other agents need. Their output becomes governed context rather than being passed directly from one agent to another.

[Context Repos](https://atlan.com/know/ai-agent/context-repository-for-ai-agents/) package this information into shared, versioned units. Through open interfaces such as [MCP](https://atlan.com/know/mcp/why-mcp-matters-for-ai-agents/) and APIs, Claude Code, Codex, ChatGPT, and internal agents retrieve the same approved definitions and rules as needed, [without tying that context to a single agent platform](https://atlan.com/know/ai-agent/agent-context-layer-tools-compared/), the same portability standard [what is Atlan MCP](https://atlan.com/know/what-is-atlan-mcp/) and a [model-agnostic context layer](https://atlan.com/know/ai-agent/context-layer/model-agnostic-context-layer/) both hold any vendor to.

When a definition, ownership rule, or policy changes, it updates once for every connected agent, whether that agent runs in one cloud or is split across several, the same requirement a [multi-cloud context layer](https://atlan.com/know/ai-agent/context-layer/multi-cloud-context-layer/) has to satisfy.

---

## What should you check before scaling a coding agent past one team?

If you're evaluating whether to roll out Claude Code, Codex, or a custom coding agent company-wide, these are the context-readiness questions to answer first:

1. **Does the agent know what your metrics mean?** Can it distinguish between gross revenue, net revenue, and ARR in your specific codebase, or does it guess from column names?

2. **Can you prove it gets organizational questions right before it touches production?** Do you have evals based on real dashboards and queries, not synthetic test cases, the same rigor used to [test an AI agent harness](https://atlan.com/know/how-to-test-ai-agent-harness/)?

3. **Does it know who owns what and what needs approval?** Is policy context an input to the agent's decision or a post hoc audit finding? If the routing only exists in a person's head, the agent has no ownership record to check against.

4. **Can you audit what it knew when it acted?** Does your [agent observability](https://atlan.com/know/ai-agent-observability/) let you reconstruct the exact context the agent had at the time of a change, or only the diff it produced?

5. **Will the same context serve Claude Code, Codex, and your internal agents?** Or does each agent build its own version of what things mean, with its own instruction file quietly drifting from the others?

6. **Is the context portable across models?** If you switch from Claude to GPT or to an internal model next year, does the context travel with you, or does the switch trigger a second context-building project alongside the model migration itself?

If the answer to any of these is "we're not sure," the [context layer](https://atlan.com/know/ai-agent/context-layer/context-layer-evaluation-criteria/) needs work before the harness goes wider. Weighing whether to build that layer in-house is a fair next question, and worth checking against a [DIY context layer](https://atlan.com/know/ai-agent/context-layer/diy-context-layer/) before committing engineering time to it.

  See the context layer working live
  Watch how teams connect Claude Code, Codex, and internal agents to one governed context source instead of rebuilding it per tool.
  Watch the Demos

---

## Wrapping up

The harness decides whether the agent can run here. Context decides whether it should.

Both Claude Code and Codex have shipped real enterprise controls: sandboxing, permissions, audit logs, compliance APIs. Those answer the safety question. They don't answer the trust question.

Trust comes from the agent knowing what your data means, how your team ships, and what rules govern who can touch what. That's the context layer, and most enterprises haven't built it yet. Everything above has focused on coding agents specifically; for the broader pattern across general-purpose agents, see [what general-purpose AI agents need](https://atlan.com/know/ai-agent/context-layer/context-requirements-for-general-purpose-ai-agents/) from a context layer.

[Assess your context maturity](https://tools.atlan.com/tools/context-maturity-assessment/) to find out where your organization stands.

---

## FAQs about Claude Code and Codex enterprise context

### 1. Is it safe to let Claude Code or Codex touch production systems?

Both Claude Code and Codex ship enterprise-grade security controls: sandboxing, permission models, network isolation, and audit logging. These controls make it safe to run the agent inside your infrastructure. But safety and trust are different questions. A sandboxed agent that doesn't understand your business context can still make wrong changes that pass all security checks. The harness handles safety. Context handles trust.

### 2. What's the difference between an agent harness and enterprise context?

An agent harness controls what the agent can do: which files it can read, which commands it can run, which networks it can access. Enterprise context controls what the agent knows: what your data means, who owns it, and what already went wrong last time someone touched this system. The harness, without context, produces a safe agent that makes confident but wrong decisions.

### 3. How do you stop a coding agent from misunderstanding what a metric or table means?

The agent needs governed business context: definitions, ownership, lineage, and usage patterns that reflect how your organization actually uses its data. This context comes from mining existing signals such as SQL history, BI dashboards, and data lineage, rather than from manual documentation. Testing the agent against real organizational questions before deployment confirms it has the right context.

### 4. Do Claude Code and Codex need the same governance as any other AI agent?

Yes. A coding agent that touches production code, data pipelines, and business logic is making consequential decisions. It needs the same governance as any autonomous system: policy context, access controls, audit trails, and point-in-time records of what it knew when it acted. The NIST AI Risk Management Framework applies to coding agents the same way it applies to any enterprise AI system.

### 5. Can one context source serve multiple coding agents at once?

Yes. Shared, versioned context repositories served over open protocols like MCP allow Claude Code, Codex, and custom internal agents to read the same definitions, ownership rules, and policy context. When a definition changes, it changes once and propagates to every agent. This eliminates the problem of each agent building its own version of what things mean and ensures consistency across your entire agent fleet.