Skip to content
Gopi Krishna Tummala
Esc

Back
Intermediate Agentic AI 12 min read

Agent Engineering: What Ports Between Claude Code, Codex and Copilot

By Gopi Krishna Tummala

Three layers of portability: what moves between coding agents unchanged, what moves with a config line, and what you rewrite every time.


You build a code-review agent in Claude Code. It reads a diff, flags correctness and security problems, runs the tests that the changed files touch, reports findings with file and line, and never edits source. It works well enough that two teammates want it — except one lives in GitHub Copilot and another runs Codex.

So you copy the files across and find out which parts were real engineering and which were Claude Code configuration.

The procedure survives. The review checklist, the order of the checks, the script that maps changed files to test suites: all of it is just a folder with a Markdown file, and all three tools read that format. The instruction file nearly survives, with one condition per tool that decides whether it gets read at all. The parts that make it an agent — a reviewer with its own context, a hook that blocks writes, a permission rule that keeps it read-only — don’t survive at all. Each runtime spells those differently, and there is no standard for them.

That’s the useful mental model, and it’s more durable than any one tool’s documentation: portability is layered, and the layers get less portable the closer you move to the execution loop.

This post walks the three layers with one agent, checked against each tool’s own docs. Everything here is as of December 2026, and the dates matter more than usual — one of the four runtimes in the original version of this comparison was retired mid-year.

The idea in one picture

flowchart TB
  P["Portable: works almost unchanged<br/>Agent Skills (SKILL.md), MCP servers"]
  C["Converging: one config line away<br/>AGENTS.md and instruction files"]
  R["Runtime-specific: rewrite per tool<br/>subagents, hooks, permissions, sandboxing"]
  P --> C --> R
  P -. "the knowledge and the<br/>connections to your systems" .-> KEEP["Single-source these"]
  R -. "the control loop<br/>each vendor owns" .-> ADAPT["Expect to maintain<br/>one copy per tool"]

The further down you go, the more vendor-specific the mechanism. Keep your engineering knowledge in the top layer, and accept duplication in the bottom one.

Layer one: skills and MCP travel

The Agent Skills standard is the strongest piece of portability available right now. A skill is a folder whose required file is SKILL.md: YAML frontmatter with, at minimum, a name and a description, then Markdown instructions, plus optional scripts/, references/ and assets/. Every tool here implements the same three-stage loading: the agent sees only names and descriptions up front, reads the full SKILL.md when a task matches, and touches the bundled files only when the procedure needs them.

Our review procedure fits that shape exactly, and the useful part is the script. map_tests.py, which turns a diff into the list of affected suites, is deterministic Python; it doesn’t care which model invokes it. The standard originated at Anthropic and was released as an open standard; VS Code’s documentation now describes Agent Skills plainly as “an open standard (agentskills.io) that works across multiple AI agents.”

The catch is discovery paths, not format. The same skill folder is looked for in different places:

Instruction fileSkillsMCP config
Claude CodeCLAUDE.md; reads AGENTS.md only when no CLAUDE.md sits above.claude/skills/.mcp.json
CodexAGENTS.md, root to cwd; AGENTS.override.md wins.agents/skills/config.toml
Copilotcopilot-instructions.md, *.instructions.md, AGENTS.mdworkspace or userby harness
AntigravityGEMINI.md; AGENTS.md via context.fileName.gemini/ or .agents/skills/settings.json

Note the overlap in that middle column: Codex looks in .agents/skills/, and Antigravity accepts .agents/skills/ as an alias that outranks its own .gemini/ path. That’s a convention worth leaning on. Put the canonical skill in .agents/skills/ and symlink .claude/skills/ to it, rather than maintaining two copies that drift.

MCP travels for the same reason: it standardizes the wire protocol between an agent and your systems, so a server exposing your CI, your ticket tracker or your test runner is written once and consumed by all of them. Only the config syntax differs — TOML for Codex, JSON for the others — which is a mechanical translation, not a rewrite.

Layer two: instructions nearly travel

AGENTS.md is the closest thing to a cross-vendor instruction standard. It’s deliberately thin: a Markdown file at the repository root, no required sections or fields, nested copies allowed in subdirectories, with the file closest to the edited file winning. It’s now stewarded by the Agentic AI Foundation under the Linux Foundation, and its site claims use by over 60,000 open-source projects.

“Nearly” is doing real work in that heading, because each runtime reads it on its own terms.

Codex reads it natively, walking from the project root down to the current directory and concatenating what it finds, so a deeper file’s guidance lands later in the prompt and effectively overrides what came before. It stops at a size cap — 32 KiB by default — which is a useful reminder that an instruction file is a context budget, not a wiki.

Claude Code reads AGENTS.md only when there is no CLAUDE.md at or above your working directory, and only on v2.1.277 or later. If both exist, it reads the CLAUDE.md files and ignores the other, unless the CLAUDE.md imports it explicitly. This surprises people who add an AGENTS.md to a repository that already has a CLAUDE.md and conclude the file is being ignored for no reason. A one-line import is the clean bridge.

Copilot is the interesting case, because it isn’t one runtime. It runs several harnesses, and which instruction file applies depends on which one you’re in: the Claude harness takes CLAUDE.md, the Codex harness takes AGENTS.md. Its own documentation declines to promise an order, which is the most honest sentence in any of these docs: “Don’t rely on a universal precedence order: combination rules differ by harness.”

Antigravity CLI defaults to GEMINI.md and will read AGENTS.md if you set context.fileName in settings.json.

That last one needs a footnote, and it’s why I’d treat any comparison of these tools as perishable. Google announced in May 2026 that Gemini CLI was being replaced by Antigravity CLI, invoked as agy, with hosted access for most individual users ending on 18 June 2026; it remains available to Gemini Code Assist Standard and Enterprise licence holders and through paid API keys. Google said the replacement would not have full feature parity at launch. Any article naming the four major coding agents has a shelf life of about six months.

There’s a deeper limit than discovery, and it applies to all four. Claude Code’s documentation states it plainly: instruction files are “context. They aren’t enforced configuration.” Nothing guarantees the agent follows them — the same point VS Code makes as “Instructions guide the model. They don’t guarantee compliance.” Our reviewer’s “never edit source files” line belongs in the instruction file, but if it only lives there, it’s a preference.

Layer three: the control loop doesn’t travel

Everything that makes the reviewer safe rather than merely well-briefed is vendor-specific.

Subagents. In Claude Code the reviewer is a Markdown file in .claude/agents/ with name and description required, plus optional tools, model, permissionMode and more. It runs in its own context window with its own system prompt, and only its final summary returns to the parent — which is exactly what you want for review, since the parent’s reasoning about why the code is right shouldn’t contaminate the judgment of whether it is. Copilot’s equivalent is a .agent.md file in .github/agents/, with name, description, tools and handoffs. Codex and Antigravity both document subagents too, Antigravity’s marked experimental. Four tools, four file formats, four delegation models. Copilot’s handoffs work only in its Local harness, which is deprecated and scheduled for removal in February 2027.

Hooks. This is where the gap is widest. Claude Code documents 34 lifecycle events — PreToolUse, PostToolUse, PermissionRequest, SubagentStop, PreCompact and so on. The others document hooks as a feature without anything like that surface area. A hook that runs the formatter after every edit, or blocks a write to a generated file, is written once per tool and tested once per tool.

Permissions and sandboxing. Every runtime has a model; no two are the same. This is the layer that actually enforces “read-only,” and it’s the layer with no standard at all.

The practical consequence is a rule for where to put each requirement:

RequirementMechanismPorts?
Project context and conventionsAGENTS.md (+ a CLAUDE.md import)Nearly
A repeatable procedureAgent Skill with scriptsYes
Access to your systemsMCP serverYes
Deterministic checks on every changeHook, or a script CI also runsScript yes, hook no
Independent review or investigationSubagentNo
Preventing a dangerous operationPermissions and sandboxNo
Proving the work is correctTests and CIYes, and they’re yours

The bottom rows are the ones that matter most and port least. That isn’t an argument against using them — it’s an argument for putting as much of your guarantee as possible into the one mechanism every tool respects, which is a script that exits non-zero. Part 4 made this case for a single repository; it holds doubly across tools. If the reviewer can’t write to protected paths because CI rejects the diff, that rule is enforced in every runtime at once.

One repository, several runtimes

The layout that follows from all this keeps shared knowledge single-sourced and accepts duplication only where the runtime demands it:

AGENTS.md              the real instruction file
CLAUDE.md              one line: @AGENTS.md
.agents/skills/        canonical skills, symlinked from .claude/skills/
.mcp.json              MCP servers for Claude Code
scripts/agent/         the checks: validate.sh, map_tests.py
.claude/agents/        reviewer, Claude Code format
.github/agents/        reviewer, Copilot format

Two directories hold the same reviewer in two dialects, and that’s the honest cost. Everything above them is written once.

Four mistakes I’d avoid, most of which I’ve made:

One enormous instruction file. Codex caps it at 32 KiB for a reason. Instructions are loaded every session; skills load only when relevant. If content is task-specific, it belongs in a skill.

A skill where a sentence would do. “Use four-space indents” is an instruction. A skill is for a multi-step procedure with knowledge that isn’t obvious from the code.

A subagent for work that isn’t isolated. Delegation pays when the context genuinely should be separate — review, parallel investigation. Two agents editing the same files cost more in conflicts than they save.

Trusting a hook you didn’t read. Hooks run arbitrary code on lifecycle events, and a skill or plugin can carry them. Claude Code’s docs make the enforcement boundary explicit: “use the permission system rather than a hook to enforce a hard allow or deny.”

What I’d remember

  • Portability is layered. Skills and MCP port, instruction files nearly port, and subagents, hooks and permissions don’t. Design knowing which layer you’re in.
  • Single-source the top two layers. One canonical .agents/skills/, one AGENTS.md, symlinks and one-line imports for the rest.
  • Instruction files are context, not configuration. Every vendor says so in its own words. A rule that must hold belongs in a permission, a hook or a test.
  • A script that exits non-zero is the most portable guarantee you have. It works identically in all four runtimes and in CI, which is the only one that gates the merge.
  • Date your comparisons. Gemini CLI was replaced mid-2026 and Copilot’s Local harness goes away in early 2027. The layers outlast the tools.

Where to go next

Questions to sit with

  1. Of the rules you give your coding agent today, how many are enforced by something other than the agent’s goodwill?
  2. If your team used two of these tools, which of your configuration would you single-source, and which would you knowingly duplicate?
  3. What would have to become standard for a subagent definition to be portable? Is that a format problem or a runtime problem?