Ship It With AI Mihai Cvasnievschi

What an agent is

8 min read

By the end you can inspect a contemporary coding agent through nine recurring capabilities and compare how two systems implement or supply them.

TL;DR


What is a coding-agent primitive?

An agent is a model plus a harness, and the harness is a small, recurring set of parts.

Contemporary coding agents repeatedly expose the capabilities below, though their packaging and availability differ. Here, "primitive" means a useful capability to inspect, not a requirement that every product ship it as a separate configurable bundle. Each card ends with a question; "absent" and "provided externally" are valid answers.

THE HARNESS
◉
context window
⚙
tools
◫
permissions / sandbox
decision layer OS enforcement
✦
skills
▣
plugins
↔
MCP
▤
memory
manually defined auto-memory system
◔
effort
reasoning level retained reasoning
⟲
subagents
the agent, recursively
the agent loop binds them together;
subagents spawn constrained child instances of the agent itself
Figure: The primitives and the harness as an inspection framework. Compare the agent-level decision layer with actual OS-level enforcement and its covered routes. Inspect team-written and agent-written memory separately, and check effort settings and retained reasoning in the selected model/client. A capability can be absent or supplied externally; a subagent is another constrained agent instance when the harness provides it.

Context window

What it is: everything the agent knows right now, within a bounded number of tokens.

It holds the system prompt, the conversation, tool results and files read - not the rest of your codebase or the tickets. Most "obviously wrong" decisions trace to missing context: nobody told it about the new authentication library. Advertised window sizes overstate what a model uses well. Chapter 6 covers working inside the bound.

Ask: How big is the window, and how does the agent manage it under pressure?


Tools

What it is: the actions the agent can take - read, write and edit files, run shell commands, search the codebase.

Each tool call is a decision point, an audit point and a control point: log the calls to replay what happened, intercept them to govern. "Do not delete files here" works by stopping the Bash call before rm runs. Keep the always-visible tool set small, since each tool costs context before your first word.

Ask: What tools does it have, and how are they constrained?


Permissions / Sandbox

What it is: two controls shipped as a pair - the agent's own rules and the operating system's enforcement.

The agent-level decision layer checks the tool requests it covers against allow / ask / deny rules. Some modes add a model classifier for eligible actions after explicit rules are resolved. Injection can mislead that classifier or exploit permitted actions and gaps in coverage; it cannot simply persuade a correctly enforced deny rule to disappear. The OS layer refuses prohibited system calls from the processes it actually isolates, regardless of the agent's reasoning. Check which tools and subprocesses sit inside that boundary. Neither half is enough alone.

Ask: What permission model does it ship, and what OS sandbox does it default to?


Skills

What it is: packaged instructions the agent loads only when a task needs them.

A skill is a chunk of markdown - the team's way of writing a Spring Boot service, say - loaded when a task needs it. Descriptions can occupy context before invocation; the full instructions load when used, and may remain for the session. Keep triggers specific. Specialized knowledge can help; a general procedure the agent already follows can add cost without improving the result.

Ask: Are skills loaded on detection, or always?


Plugins

What it is: a bundle of skills, tools, hooks and commands, installed with one command.

The plugin is the unit of distribution: one team's PR-review workflow becomes another team's one-line install. Start with the native agent; add a plugin for a capability or a measured improvement you need. The marketplace is also a supply-chain surface, the npm of agentic coding. Appendix B.10 checks both trust and value.

Ask: Is there a plugin marketplace, and how do you vet what is in it?


What is MCP?

What it is: the Model Context Protocol, a specification for how agents talk to external systems - Jira, Postgres, GitHub, your data warehouse.

An MCP integration can be reused across compatible clients. Check the negotiated protocol version, capabilities, transport and authentication: saying that two products support MCP does not establish that every server works unchanged with both.

Ask: Does it speak MCP, and how good is the integration?


Memory

What it is: what carries over from one session to the next, in two halves.

The team writes the first: project instruction files such as AGENTS.md. Discovery, scope and precedence depend on the client; some require configuration or explicit loading (Chapter 6). The agent writes the second for itself: preferences, corrections and decisions it cannot re-derive from the code.

Ask: Does it read a team memory file at session start, and keep memory of its own?


Effort

What it is: how hard the model thinks before it acts - the newest primitive, and it earns its place on leverage.

Where the model and client expose effort controls, compare the available settings on representative tasks. Effort can affect cost and quality: a lower setting may miss needed investigation, while a higher one may add reasoning the task does not need. Names do not transfer between models. Compare settings by task or phase rather than assuming one level suits the whole session (Appendix B.9).

Ask: What effort levels does it expose, and does the reasoning survive between turns?


Subagents

What it is: constrained child instances of the agent itself.

The orchestrator hands a subagent a bounded task with scoped tools and gets a result back. A fresh context isolates the work; a fork can share the parent's history. Each worker adds usage, startup and coordination costs, partly affected by caching. Delegate sizeable, self-contained work when the expected gain exceeds those costs; keep quick or tightly dependent work in the main agent. Chapters 4, 5 and 7 show where it can pay.

Ask: How does it expose subagents - is parallel dispatch first-class?


The harness

The model sets the ceiling; the harness decides whether you reach it.

The harness is the runtime around the model: it formats your request, manages the window, dispatches tool calls, feeds results back and decides when the work is done. The loop itself is simple; the surrounding controls matter. Inspect language fit, license, plugin ecosystem, sandbox enforcement and audit posture, then evaluate the model and harness together on your own work.


Compare the implementations

The framework makes differences visible; two implementations do not prove a universal architecture.

Demonstration: one prompt, two agents. While preparing this manual I pointed Claude Code at the source of two other coding agents in two terminal panes: Codex CLI (Rust, maintained by OpenAI) and opencode (TypeScript, an independent team). Both are open source and share no code. Same prompt in each: map the agent loop, tools, permission gates, sandbox and plugin model, citing files and line numbers.

About four minutes later, with no human correction, both returned the same shape: an agent loop, a tool registry, a permission gate, a sandbox, a plugin model, MCP support, a subagent dispatch path. Different languages, files and names. The clearest divergence was the sandbox: Codex implements real OS-level isolation, so the kernel itself refuses what the agent is not authorized to do; opencode implements soft confinement, path validation and permission prompts with no kernel-enforced boundary.

Limits: an author-run comparison of two repositories illustrates the framework. It does not establish that every agent has all nine capabilities or that the implementations are equally effective.


Sandbox posture is a governance choice

A vendor's choices about primitives are governance choices.

Source and runtime probes can show what a sandbox actually covers. Codex CLI enforces an OS sandbox by default on Linux and macOS; Claude Code ships an opt-in shell sandbox; opencode needs external OS isolation. Defaults are versioned, so check yours.

What the sandbox actually covers matters more than what the vendor intended. You are the one choosing, and Chapter 2 turns the choice into five layers.


When it breaks


Do this Monday


Go deeper