DEV Community

Ali Suleyman TOPUZ
Ali Suleyman TOPUZ

Posted on Originally published at topuzas.Medium on

Claude Code Is an Operating Layer for Engineering Work: I Went Looking for Proof Instead of Just…

Claude Code Is an Operating Layer for Engineering Work: I Went Looking for Proof Instead of Just Nodding Along

I read Muhammad Saad Uddin’s piece on gopubby a while back, the one arguing that Claude Code “is not an AI coding assistant, it is an operating layer for engineering work.” It opens with a story about engineers on paid plans supposedly burning through a five-hour token quota in under 70 minutes because a single cache miss pulled 900,000 tokens of context into a session. Dramatic hook, and I have no way to independently confirm the specific numbers in that anecdote, so I’m not going to repeat them as established fact. What I can say is that the core claim in the title stuck with me for a different reason: it’s a genuinely interesting distinction, and the article doesn’t do much to back it up beyond naming four buzzwords (agentic loops, context discipline, tool orchestration, enterprise safety) and moving on.

So I did what I usually do when a claim sounds right but the evidence is thin: I went and read the actual mechanics. Not marketing copy, the settings schemas, the hook event list, the sandboxing model, the permission precedence rules, the thing Anthropic’s own engineering blog calls “a harness for every task.” I wanted to know if “operating layer” is a metaphor that holds up under inspection or just a catchier way of saying “agent with a lot of tools.” This is what I found, including the places where the metaphor strains.

What “operating layer” should actually mean

Before grading the claim, I wanted a definition I could test against, because “operating layer” gets thrown around loosely enough to mean almost anything. An operating system, stripped to its essentials, does five jobs: it schedules processes, manages memory, mediates access to hardware and files through drivers and permissions, provides inter-process communication, and runs background jobs on a schedule. If Claude Code is genuinely an operating layer rather than a fancy autocomplete box, it should have a real analogue for each of those, not just a plausible-sounding blog post.

Here’s the mapping I ended up with after reading through the documentation:

+------------------------+---------------------------------------+------------------------------------------------+
| OS Concept | Claude Code Mechanism | What It Actually Does |
+------------------------+---------------------------------------+------------------------------------------------+
| Process scheduling | Subagents + dynamic workflows | Spawns isolated agents with their own context |
| | | windows, assigns models, runs them in parallel |
+------------------------+---------------------------------------+------------------------------------------------+
| Memory management | Context compaction, CLAUDE.md, | Summarizes/prunes context automatically, persists|
| | auto memory | facts across sessions instead of re-explaining |
+------------------------+---------------------------------------+------------------------------------------------+
| Device drivers | Model Context Protocol (MCP) | Standard interface to external tools, data, |
| | | and services, one plug for any compatible server |
+------------------------+---------------------------------------+------------------------------------------------+
| Access control / kernel | Hooks + OS-level sandbox + | Blocks or allows actions before they execute, |
| permissions | permission modes | isolates filesystem/network at the process level |
+------------------------+---------------------------------------+------------------------------------------------+
| Cron / background jobs | Routines, /loop, GitHub Actions | Runs on a schedule or on repo events, in the |
| | integration | cloud, independent of any open terminal |
+------------------------+---------------------------------------+------------------------------------------------+
Enter fullscreen mode Exit fullscreen mode

That’s a real structural match, not just a vibe. Whether each of those rows earns its place is worth going through one at a time, because some of them are far more developed than others.

Process scheduling: subagents that write their own harness

This is the part of the “operating layer” argument I found most convincing, and it’s the part the original article barely touches. Claude Code doesn’t just run a single agentic loop where one model calls tools until it decides it’s done. It can generate its own orchestration code on the fly, a JavaScript harness custom-built for the task at hand, that spawns and coordinates multiple subagents, each with an isolated context window and a narrow, specific goal.

Anthropic’s engineering team documented six recurring patterns this produces, and I think the list is more useful than any listicle of “agentic patterns” I’ve read, because these are the ones that actually show up when a coding agent hits a task too big for one context window:

+------------------------+--------------------------------------------------------------+
| Pattern | What it's for |
+------------------------+--------------------------------------------------------------+
| Classify-and-act | Route a task to a specialized agent based on what it is |
| Fan-out-and-synthesize | Split into parallel pieces, then merge the results |
| Adversarial verification | One agent checks another agent's output against a rubric |
| Generate-and-filter | Produce several candidates, keep only the ones that pass a bar |
| Tournament | Candidates compete head to head until one wins |
| Loop until done | Repeat with a defined stopping condition |
+------------------------+--------------------------------------------------------------+
Enter fullscreen mode Exit fullscreen mode

The reason this matters isn’t novelty, every one of those six shows up in the broader agentic-patterns literature. What matters is why Anthropic built it this way: a single long-running agent degrades in specific, predictable ways. It gets lazy and quietly stops short (addressing 35 of 50 review items and calling it done). It develops a self-preferential bias where it favors its own earlier output over a better alternative. It drifts from the original goal as repeated summarization gradually loses fidelity to what was actually asked. Spinning up separate subagents with their own isolated context and a narrow goal is a structural fix for all three, not a prompting trick. The write-up cites Bun’s Zig-to-Rust rewrite as a case where this pattern parallelized refactoring across modules, and a “deep research” workflow that fans out searches, fetches sources, and then runs a separate adversarial pass to check claims against those sources before anything gets written up.

If you’ve built multi-agent systems yourself, none of this is exotic. What’s notable is that it’s not something you have to hand-roll every time, Claude Code can decide, at runtime, that a task calls for fan-out-and-synthesize instead of a single loop, and write the orchestration code to do it. That’s closer to a scheduler deciding how to allocate work across processes than it is to an autocomplete engine finishing your sentence.

Memory management: compaction, CLAUDE.md, and auto memory

Every long-running agent eventually runs into the same wall: context windows are finite, and the naive fix (just keep everything) makes every subsequent call slower and more expensive without making the agent smarter. Claude Code handles this on two timescales.

Within a session, it compacts automatically as the context fills, and it exposes PreCompact and PostCompact hooks so you can inspect or influence what gets summarized rather than treating it as a black box. I'd treat any claim about the exact internal mechanics of that compaction (how many stages, what gets prioritized) with some skepticism unless it's coming directly from Anthropic, because I've seen third-party breakdowns online that go into specific staged pipelines I couldn't verify against primary sources. What is documented and verifiable is the hook surface: you get a checkpoint before compaction happens and a callback after, and you can act on both.

Across sessions, CLAUDE.md is the part most people already know: a markdown file in your project root that gets read at the start of every session, where you put coding standards, architecture decisions, and review checklists. Auto memory is the less-discussed half, and it's the more interesting one from an "operating layer" standpoint: Claude Code builds up its own memory as it works, saving things like build commands and debugging insights across sessions without you writing any of it down yourself. That's the difference between a tool that starts from zero every time you open it and one that accumulates operational knowledge about your specific codebase the way a new hire slowly does.

Device drivers: MCP as the hands

The Model Context Protocol is the piece of this stack I already understood well before writing this, and it’s the one that most directly earns the “operating layer” comparison rather than just gesturing at it. MCP is Anthropic’s open standard for how an agent connects to external tools and data, and the useful way to think about it is as a driver interface: a tool built once, as an MCP server, can plug into any MCP-compatible client, not just Claude Code, without being wired up bespoke for every agent framework that wants to use it.

Inside Claude Code specifically, this is what lets it read design docs from Google Drive, update Jira tickets, pull messages from Slack, or call your own internal APIs, all through the same interface it uses for its built-in file and shell tools. That uniformity is the point. A coding assistant that can edit files and run tests is useful. A coding assistant that can also open a ticket, post to a channel, and query a production database through the exact same permission and approval flow it uses for git commit is doing something categorically broader, and it's the MCP layer specifically that makes that broadening a plug-in problem instead of a custom-integration problem every single time.

If you want to see this on your own machine without connecting anything sensitive, a minimal local MCP server is a good way to feel the shape of it. Here’s a self-hosted one in Python, using the official SDK, that exposes a single tool and runs entirely on your machine with no external service beyond Claude Code itself:

# pip install "mcp[cli]"
# save as local_tools_server.py

from mcp.server.fastmcp import FastMCP
mcp = FastMCP("local-dev-tools")
@mcp.tool()
def count_todos(directory: str) -> str:
    """Count TODO/FIXME comments in a directory, recursively."""
    import subprocess
    result = subprocess.run(
        ["grep", "-rEc", "-e", "TODO", "-e", "FIXME", directory],
        capture_output=True, text=True
    )
    return result.stdout or "no matches"
if __name__ == " __main__":
    mcp.run(transport="stdio")
Enter fullscreen mode Exit fullscreen mode

Register it in your project’s .mcp.json:

{
  "mcpServers": {
    "local-dev-tools": {
      "command": "python",
      "args": ["local_tools_server.py"]
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

Run claude in that project and ask it to "use the local-dev-tools MCP server to count TODOs in src/" and you'll watch it call your own local process the same way it calls its built-in file tools, no cloud dependency in that hop at all. That's the honest local alternative here: unlike a lot of AI tooling, Claude Code itself has no swap-in-Ollama option, since the model call is inherently a call to Anthropic's API (or Bedrock/Vertex/a supported third-party provider), but the tool layer around it, MCP servers, hooks, and the sandbox, runs entirely on your own hardware and costs nothing beyond the model calls you'd be making anyway.

Access control: hooks and the sandbox

This is the part of the stack that actually made me stop calling it a metaphor. An autocomplete tool doesn’t need a kernel-level permission model, because it doesn’t do anything irreversible on its own. An operating layer does, because the whole point is that it’s allowed to act, and something has to police that.

Claude Code’s hook system fires at a genuinely long list of lifecycle events, not just “before and after a tool call”:

+---------------------------+----------------------------------------------------------+
| Category | Example events |
+---------------------------+----------------------------------------------------------+
| Session lifecycle | SessionStart, SessionEnd, Setup |
| Per-turn | UserPromptSubmit, Stop, StopFailure |
| Tool execution | PreToolUse, PostToolUse, PostToolUseFailure, |
| | PermissionRequest, PermissionDenied |
| Agents and tasks | SubagentStart, SubagentStop, TaskCreated, TaskCompleted |
| Files and config | FileChanged, ConfigChange, InstructionsLoaded |
| Context | PreCompact, PostCompact |
+---------------------------+----------------------------------------------------------+
Enter fullscreen mode Exit fullscreen mode

PreToolUse is the one that matters most for safety, because it can block an action outright before it runs, returning a deny decision with a reason rather than just logging that something bad happened after the fact. Here's a working example, a hook that stops a destructive rm -rf before it ever hits your shell:

{
  "hooks": {
    "PreToolUse": [
      {
        "matcher": "Bash",
        "hooks": [
          {
            "type": "command",
            "command": "${CLAUDE_PROJECT_DIR}/.claude/hooks/block-rm.sh",
            "timeout": 10
          }
        ]
      }
    ],
    "PostToolUse": [
      {
        "matcher": "Write|Edit",
        "hooks": [
          { "type": "command", "command": "/usr/local/bin/lint-check.sh" }
        ]
      }
    ]
  }
}

#!/bin/bash
# .claude/hooks/block-rm.sh
COMMAND=$(jq -r '.tool_input.command')

if echo "$COMMAND" | grep -q 'rm -rf'; then
  jq -n '{
    hookSpecificOutput: {
      hookEventName: "PreToolUse",
      permissionDecision: "deny",
      permissionDecisionReason: "Destructive rm -rf commands blocked by policy"
    }
  }'
else
  exit 0
fi
Enter fullscreen mode Exit fullscreen mode

That’s a policy engine, running entirely locally, with no network call involved in the enforcement decision itself. Underneath the hooks, there’s a second, lower-level layer: an actual OS-level sandbox for Bash commands and their subprocesses. On macOS it uses the built-in Seatbelt framework with no extra setup, on Linux and WSL2 it uses bubblewrap. Filesystem writes are restricted to the working directory by default, and outbound network traffic from sandboxed commands routes through a proxy that enforces a domain allowlist, checking hostname rather than doing full TLS inspection. That last detail is worth being honest about rather than glossing over: because the proxy decides based on hostname only, it doesn’t inspect encrypted payloads, which leaves a theoretical domain-fronting gap for organizations that need deeper packet inspection. The documented mitigation is layering an actual TLS-terminating proxy like Zscaler in front of it, not relying on the sandbox proxy alone.

For organizations, there’s a third layer above both of those: managed settings that override anything a developer sets locally, delivered either as server-managed policy on an Enterprise plan (no local file exists to tamper with at all), pushed via MDM tooling like Jamf or Intune, or as a root-owned managed-settings.json on the machine. A sane enterprise baseline documented alongside this disables permission bypass modes, requires the sandbox to be available before Claude Code will run at all, blocks commands like sudo and raw curl, and restricts network access to an approved domain list. That's not "an AI coding assistant with a linter." That's the same shape as a corporate MDM policy for any process that's allowed to touch a production laptop.

Inter-process communication and background jobs

The last two OS analogues are the ones that push this furthest past “assistant.” Claude Code sessions aren’t tied to one surface: you can start a task in the terminal, hand it to the desktop app with /desktop to review diffs visually, kick it to your phone through remote control, or start it in a browser and pull it back into your terminal with claude --teleport. That's session continuity across devices, which is closer to how a login session on a real OS can be reattached from a different terminal than it is to how a code-completion plugin behaves.

For scheduling, Routines run in the cloud on a cron-like schedule or in response to API calls and GitHub events, independent of whether your laptop is even on. Combine that with GitHub Actions or GitLab CI/CD integration for automated PR review and issue triage, and a Slack integration where mentioning @claude with a bug report can come back with an actual pull request, and you get something that looks a lot less like "a thing I run when I'm coding" and more like a background service other systems can call into.

The Agent SDK is the part that makes this explicit rather than implied: it exposes the same orchestration, tool access, and permission model that Claude Code itself runs on, so you can build your own custom agent harness on top of it rather than using the CLI directly. That’s the strongest evidence for the “layer” framing I found in this whole investigation. A coding assistant is a product you use. A layer is infrastructure other products get built on top of, and the SDK is Anthropic explicitly offering it as exactly that.

Where the metaphor strains

I don’t want to oversell this, because the honest version of “operating layer” comes with real caveats, and skipping them would make this article no better than the one I started out reacting to.

First, none of this eliminates the failure modes that show up in every agentic system, it just gives you the hooks to catch them. A loop-until-done pattern without a hard step or cost ceiling can still run away from you, the same way an unbounded evaluator-optimizer loop can in any framework. The sandbox and permission system are exactly that, a governor you have to configure, not a default you can assume is airtight out of the box.

Second, native Windows support for the sandbox is still marked as planned rather than shipped, and WSL2 has its own caveat where sandboxed commands can’t invoke native Windows binaries like PowerShell without explicitly excluding them. If your team is Windows-first, the “OS-level enforcement” argument is currently weaker for you specifically than it is for macOS and Linux users.

Third, the network proxy’s hostname-only inspection is a real gap, not a hypothetical one, and Anthropic’s own documentation for enterprise deployments recommends layering a real TLS-inspecting proxy on top rather than treating the built-in one as sufficient on its own. Calling something an operating layer doesn’t mean its access control is beyond reproach, it means access control exists as a first-class concept at all, which is a lower and more honest bar.

Fourth, and this is the one I keep coming back to: none of this changes the fact that the model can still be wrong. Dynamic workflows and adversarial verification reduce specific known failure modes, they don’t eliminate the need for a human to actually read the diff before it merges. An operating system doesn’t make your programs correct either, it just gives you predictable primitives to build correct systems out of. That’s a fair standard to hold this to, and on that standard it clears the bar more convincingly than I expected going in.

The gotchas, collected in one place

+---------------------------------------------+------------------------------------------------------+
| Gotcha | What actually happens |
+---------------------------------------------+------------------------------------------------------+
| Treating hooks as a complete security boundary | Hooks are policy you write yourself, an empty |
| | settings.json enforces nothing by default |
+---------------------------------------------+------------------------------------------------------+
| Assuming the sandbox proxy does deep inspection | It checks hostname only, no TLS inspection, so add a |
| | real inspecting proxy for anything sensitive |
+---------------------------------------------+------------------------------------------------------+
| Running loop-until-done workflows with no cap | Same runaway-loop risk as any agentic pattern, the |
| | harness doesn't impose a ceiling for you automatically |
+---------------------------------------------+------------------------------------------------------+
| Expecting full sandbox parity on native Windows | Not yet available, WSL2 works but can't call native |
| | Windows binaries without an explicit exclusion list |
+---------------------------------------------+------------------------------------------------------+
| Looking for a local-model swap like Ollama | Doesn't exist for Claude Code itself, the model call is |
| | inherently Anthropic API/Bedrock/Vertex/third-party |
+---------------------------------------------+------------------------------------------------------+
Enter fullscreen mode Exit fullscreen mode

Where I landed

Grading the original claim against the OS analogy I set up at the start: process scheduling gets a genuine yes, subagents and dynamic workflows are a real, documented, structurally motivated answer to specific degradation patterns, not just marketing language. Memory management is a partial yes, compaction and auto memory are real and useful, but I’d want more primary-source detail on the exact compaction mechanics before repeating specific internal claims about it as fact. Device drivers, meaning MCP, is a clean yes, it’s a genuinely portable interface and not exclusive to Claude Code, which if anything strengthens the “layer” argument since layers are supposed to be things other things build on. Access control is the strongest yes of all five, hooks plus an actual OS-level sandbox plus enterprise-managed settings is a real permission model with real, documented gaps, not a vague promise of “safety.” Background jobs and cross-device sessions round it out.

So: the title of the piece I started from is more defensible than the piece itself managed to demonstrate. “Operating layer” isn’t just a spicier way of saying “coding assistant with more steps,” there’s a real structural argument underneath it once you go look at the actual mechanism list instead of stopping at four buzzwords and a dramatic anecdote. Whether that’s the right framing for your own team depends less on whether the metaphor is defensible in the abstract and more on whether you’re actually going to configure the hooks, turn on the sandbox, and set a managed policy, because none of what makes this an operating layer rather than an assistant is on by default. It’s available. Using it is still a decision you have to make.

Tags: claude-code, ai-agents, developer-tools, software-engineering, mcp, devops, ai-coding-assistant

Top comments (0)