Harnesses you can adopt · Adopt 2
Coding harnesses: a finished harness for software work
Claude Code, Codex CLI, GitHub Copilot CLI, Antigravity CLI, Cursor and Grok Build each run the same eight jobs for a developer's session, under their own names. One table translates the names into jobs. Then each product gets a tab.
Product facts read on each vendor's documentation on 2026-11-16. Comes after SDKs; the eight jobs are defined in Eight jobs.
The team that built the quote harness wrote every one of its eight jobs by hand. assemble_context decides what the model sees. run_tool_guarded checks a tool name against an allow-list. checkpoint saves each step. authorize stops the reply email until a person approves it.
They wrote that code with a second agent open in a terminal: a coding tool. One of them typed "add a golden case for a house built before 1950 and run the evals". The tool read the repository's instruction file before it did anything. It opened golden.jsonl and edited it. Before it ran evals.py it stopped and asked whether it may run a shell command. After an hour of work it replaced the oldest part of the conversation with a summary. The next morning the developer continued the same session. (This is an ordinary session, described to make a point. It is not a recorded run.)
Read that paragraph again as a harness engineer. A file loaded into the context at the start is job 1. An edit tool and a shell tool are job 2. The pause before a command is job 5. The summary is job 1 again. The session that survives the night is job 4. Nobody on the team wrote any of it.
So the tool on their desk is a harness, already built, and it does for their own work what harness.py does for the quote. Two questions follow. Which of the eight jobs does it run, and under which names? And if it already runs all of them, why did the team still have to write harness.py?
The short answer. A coding harness is an agent harness that a vendor finished for one kind of work: changing software, with a developer present. Its features are the eight jobs with product names on them. You do not write those jobs. You configure them, in files, and what you put in those files is still your decision.
The same eight jobs, pointed at a repository#
A coding harness and the quote harness differ in what they work on, not in what they are. One reads an email and produces a decision. The other reads a repository and produces a change. Both run a model call in a loop, and the model in both can only ask.
So every job from Eight jobs must be somewhere in the product. The team can find each one by asking what they wrote for it in the miniature, and then looking for the feature that does the same work.
For job 1, context assembly, they wrote a system prompt and a function that orders the context. A coding harness has a project instructions file: a text file it loads at the start of every session. It has skills: longer instructions of which only a one-line description is loaded until a task needs the rest. And it has compaction: when the conversation nears the size of the context window, the harness replaces older turns with a summary. Context explains why each of these exists.
For job 2, tools, they wrote three functions and an allow-list. A coding harness arrives with its tools built in: read a file, edit a file, search, run a shell command. Because a shell command can do anything the developer's account can do, most products offer a sandbox, a boundary the operating system enforces around the command. Tool servers connect through MCP.
For job 3, control flow, they wrote a loop with a turn limit. The coding harness owns the loop. What it gives the developer are ways to shape it: a plan mode in which the agent proposes before it edits, a mode without a person at the keyboard for scripts, and subagents, each a second loop with its own context window.
For job 5, approval, they wrote one gate before one side effect. A coding harness cannot know in advance which commands matter, so it has a general gate: every tool request passes through rules that allow it, deny it, or ask the developer. A permission mode is a named setting that moves the default, from "ask about every edit" to "ask about nothing". And a hook is the developer's own script, which the harness runs at a fixed point in the loop, for example before every tool call. A hook can refuse a call for a reason no general rule could express.
The other jobs have plainer names. Job 4 is the saved session and the command that resumes it. Job 6 is a flag that makes a scripted run return JSON that matches a schema. Job 7 is a usage report and, in some products, a spending limit. Job 8 is the transcript on disk, and in some products an export to a tracing system.
The diagram shows the division of labor that results. The developer writes a few files. The harness reads them and runs the jobs.
Diagram: A coding harness · the files you write, and the jobs it runs from them
Read left to right. The left column is what a team writes and keeps in the repository. The middle column is the product: it reads those files and runs the eight jobs. The right column is what the harness reaches. Click any box.
- You write: files in the repository
- Instructions file and skills: Text the harness loads into the context: always for the instructions file, on demand for a skill.
- Permission rules and mode: Lists that allow, deny or ask for a tool request, and a named mode that sets the default.
- Hooks: Your own scripts, registered for fixed points in the loop. The harness runs them; the model does not.
- Tool server list: Which outside tool servers the harness connects to.
- The coding harness runs: the product
- Assemble and compact the context: Loads the instructions, the skill descriptions and the history before each model call, and summarizes older turns when the context fills.
- The loop, plan mode, subagents: Calls the model, reads its tool requests, repeats. The vendor wrote this loop; you shape it with modes and limits.
- Check each tool request: Runs your hooks, applies your rules and the current mode, and asks the developer when the rules say ask.
- Built-in tools, inside a sandbox: Read, edit, search and shell tools that ship with the product. A sandbox, where turned on, limits what a shell command can reach.
- Session, usage, transcript: Saves the conversation so it can be resumed, counts what it consumed, and keeps the record of what it did.
- What the harness reaches
- The model: Receives the context and returns text or a tool request. It never sees the rules or the hooks.
- Your repository and shell: The files the tools change and the commands they run, with the developer's own account.
- MCP servers: Separate programs that offer more tools. Their results are untrusted text.
The loop, the tools and the session are the product's. The instructions, the rules and the hooks are files in the repository, written by the team. A coding harness moves the eight jobs from code you write to configuration you write. It does not remove the decisions.
One request shows where those files are consulted. The developer's prompt leads the model to ask for a shell command. Before anything runs, the harness passes the request through the developer's hook and the permission rules.
Diagram: One shell command in a coding harness · where your files are consulted
Time runs down the page. The model only asks. The harness runs your hook, applies your rules, asks the developer if the rules say so, and only then runs the command. The order of the hook and the rules is the one Claude Code documents; other products document their own. Click any step.
- Developer to Coding harness: Prompt. The developer's request in plain words.
- Coding harness to Model: Context: instructions file, skills, history. Job 1. The harness assembled this; the instructions file is part of every call.
- Model to Coding harness: Tool request: run a command. A name and arguments. Nothing has happened yet.
- Coding harness to Your hook: Before the call: the request, as data. The harness passes the tool name and arguments to your script.
- Your hook to Coding harness: Deny with a reason, or no objection. A deny stops the call here. Silence does not approve it: the rules still apply.
- Coding harness: Rules and mode: deny, ask or allow. Job 5. A matching deny rule blocks in every mode.
- Coding harness to Developer: Ask, if the rules say ask. The pause the developer sees before a command.
- Developer to Coding harness: Approve. A person's decision, for this call.
- Coding harness to Shell tool: Run the command. Only now does anything change. The harness makes the call.
- Shell tool to Coding harness: Output. The command's output, or its error.
- Coding harness: Append to the session record. Jobs 4 and 8. The request and the result are written to the saved session.
- Coding harness to Model: Tool result, as the next message. The model reads the result and decides its next step. A denied call also returns as a result, with the reason.
The model never sees the hook or the rules, and it cannot skip them. This is the sentence from Tools, unchanged: the model asks, the harness decides and calls, the tool does. A coding harness adds only that the "decides" step is now assembled from files a developer can read.
The translation table#
With the jobs located, the six products can be read side by side. Each row is one feature, with the job it belongs to. Each cell is the name that product's documentation uses. A cell that says "the docs do not say" means the vendor pages read for this site on 2026-11-16 did not state it. It does not mean the product lacks the feature.
The table is wide. It describes what each product documents, and it is not a ranking.
| Feature, and what it means | Job | Claude Code | Codex CLI | GitHub Copilot CLI | Antigravity CLI | Cursor and Cursor CLI | Grok Build |
|---|---|---|---|---|---|---|---|
| Project instructions file. Text loaded into the context at the start of every session | 1 | CLAUDE.md; auto memory | AGENTS.md | .github/copilot-instructions.md, .github/instructions/**/*.instructions.md, AGENTS.md | Rules: AGENTS.md, GEMINI.md, .agents/rules/*.md | Rules: .cursor/rules/*.mdc, AGENTS.md | AGENTS.md |
| Context compaction. Older turns replaced by a summary | 1 | Automatic; /compact | Hook events PreCompact, PostCompact; beyond that the docs do not say | Automatic; /compact, /context | Automatic, into checkpoint summaries | Hook event preCompact; beyond that the docs do not say | Automatic; /compact |
| Skills. Instructions loaded only when a task needs them | 1 | SKILL.md in .claude/skills/ | SKILL.md in .agents/skills | Agent skills, SKILL.md folders | SKILL.md in .agents/skills/ | SKILL.md in .cursor/skills/ or .agents/skills/ | SKILL.md in .grok/skills/ |
| Built-in tools and sandbox. Where a shell command runs | 2 | Sandbox for shell commands, off by default; /sandbox | sandbox_mode: read-only, workspace-write, danger-full-access | /sandbox enable; trusted directories | --sandbox, off by default | --sandbox enabled or disabled | --sandbox with a profile, off by default |
| MCP servers. Tool servers from outside | 2 | .mcp.json; claude mcp add | [mcp_servers.<server-name>] in config.toml | .mcp.json; ~/.copilot/mcp-config.json; GitHub's server built in | .agents/mcp_config.json | .cursor/mcp.json | [mcp_servers.<name>] in config.toml; /mcps |
| Plan mode and turn limits. Shape the loop, or stop it | 3 | plan mode; --max-turns in scripted runs | The docs do not say | Plan mode; autopilot mode | --mode plan; turn limit: the docs do not say | Plan mode; turn limit: the docs do not say | /plan; turn limit: the docs do not say |
| Subagents. A second loop with its own context window | 1 and 3 | Markdown files in .claude/agents/ | TOML files in .codex/agents/ | .github/agents/*.agent.md; /fleet | .agents/agents/; /agents | .cursor/agents/ | Subagents; /tasks lists them |
| Headless mode. The same loop from a script, with no person present | 3 | claude -p | codex exec | copilot -p | agy -p | agent -p | grok -p |
| Sessions and resume. Continue where a session stopped | 4 | --continue, --resume; /rewind | codex resume; codex exec resume | --continue, --resume | --continue; /resume, /rewind | agent resume; agent ls | --continue, --resume; /resume |
| Permission modes and approval. What runs without asking | 5 | Six modes, from default to bypassPermissions; allow, ask and deny rules | approval_policy: on-request, never, or granular | --allow-tool, --deny-tool, --allow-all-tools | --mode accept-edits, auto or plan; allow, ask and deny rules | permissions.allow and deny in .cursor/cli.json | Modes ask, auto, always-approve; [permission] rules |
| Hooks. Your script, run by the harness at a fixed point | 5 and 8 | hooks in settings; 33 events, for example PreToolUse | hooks.json or [hooks]; PreToolUse and others | .github/hooks/*.json; preToolUse and others | .agents/hooks.json; PreToolUse and others | .cursor/hooks.json; preToolUse and others | .grok/hooks/*.json; PreToolUse and others |
| Structured output. A scripted run returns JSON that matches a schema | 6 | --json-schema | --output-schema | The docs do not say | --json-schema | The docs do not say | The docs do not say |
| Usage and cost reporting. What a session consumed | 7 | /usage; total_cost_usd in JSON output; --max-budget-usd | Token counts in the turn.completed event | /usage; /context | /usage, /credits | The docs do not say | /usage |
| Transcripts and tracing. The record of what the session did | 8 | JSONL under ~/.claude/projects/; OpenTelemetry export | Event stream with --json; tracing: the docs do not say | ~/.copilot/session-state/, ~/.copilot/logs/; tracing: the docs do not say | transcript.jsonl per conversation; tracing: the docs do not say | A transcript file, passed to hooks as transcript_path; tracing: not read | /transcript, /export; tracing: the docs do not say |
Three things are worth taking from the table.
First, the names are converging. AGENTS.md appears in five of the six instruction rows, and Claude Code's documentation says it reads that file when a repository has no CLAUDE.md. SKILL.md appears in all six skill rows. An event called PreToolUse or preToolUse appears in all six hook rows. A team that writes its instructions, skills and hooks for one product has done most of the thinking for another, though the file locations and the fields differ.
Second, the defaults do not converge, and the defaults are where the risk is. Three products document their sandbox as off by default. codex exec runs in a read-only sandbox by default. A reader who learns one product and assumes another behaves the same has made a job 5 mistake without touching a setting.
Third, the lower rows are thinner than the upper ones. Every product documents its instruction file in detail. Fewer document a schema-checked output, a spending limit or a tracing export. That is the order in which a developer at a keyboard needs them, and it is the reverse of the order in which a production system needs them. The last section of this page returns to that.
How the cells were filledTwo sources, one rule for gaps, and one product name that changed
Each cell comes from one of two places: the baseline check of 2026-11-14, kept in this site's fact files, or the vendor's own documentation read again on 2026-11-16. Where both existed, the newer reading was used. The fact log for this page lists each claim with its page address.
"The docs do not say" has a narrow meaning. A product's documentation has many pages, and only some were read. If the pages read did not state a feature, the cell says so instead of filling the gap from memory. Two cells show why this matters. For Codex CLI, the hooks page lists the events PreCompact and PostCompact, so compaction exists, but none of the pages read describes how it is triggered. For Cursor, the page that documents the CLI's JSON output lists four fields, and none of them is a token count or a cost; the pages about usage were not read.
One name changed during 2026. Google announced on 2026-05-19 that Antigravity CLI, command agy, replaces Gemini CLI for free-tier and Google AI Pro and Ultra users, and that Gemini CLI stops serving those users on 2026-06-18. Gemini CLI remains open source and continues for some paid plans. The tab on this page is for Antigravity CLI. Its instruction rules still read GEMINI.md, and its global configuration still lives under ~/.gemini/.
Six products, one tab each#
Each tab has the same four parts: what the product is in its vendor's words, which jobs it runs for you, what stays with you, and one small example of configuring a job. Every example is a documented shape: it is copied or shortened from the vendor's documentation, and it was not run for this page.
The Claude Code tab is the longest because its documentation was read most closely. Length is not a judgment of the product.
Claude Code
What it is, in the vendor's words. "Claude Code is an agentic coding tool that reads your codebase, edits files, runs commands, and integrates with your development tools."
Which jobs it runs for you.
| Job | What Claude Code does | Its names |
|---|---|---|
| 1 Context | Loads instruction files at the start of every session. Keeps notes it writes for itself. Loads a skill's full text only when the skill is used. Compacts the conversation into a summary as the context nears its limit | CLAUDE.md, CLAUDE.local.md, auto memory, SKILL.md, /compact |
| 2 Tools | Ships file, search and shell tools. Can confine shell commands with an operating-system sandbox. Connects tool servers | /sandbox, sandbox.enabled, .mcp.json, claude mcp add |
| 3 Control | Runs the loop. Offers a mode that explores and proposes before editing, a scripted mode, and subagents | plan, claude -p, --max-turns, .claude/agents/ |
| 4 State | Writes every message, tool use and result to a file, and can reopen the session under the same id | --continue, --resume, /rewind |
| 5 Approval | Checks each tool request against rules and the current permission mode. Runs your hooks before the call | permissions.allow, ask, deny, defaultMode, PreToolUse |
| 6 Output | In a scripted run, returns JSON that was validated against a schema you pass | --json-schema, structured_output |
| 7 Cost | Reports token use and an estimated cost. Can stop a scripted run at a spending cap | /usage, total_cost_usd, --max-budget-usd |
| 8 Record | Keeps the transcript. Exports metrics and events, and traces in beta, over OpenTelemetry | CLAUDE_CODE_ENABLE_TELEMETRY, OTEL_METRICS_EXPORTER |
Four of these rows need more than a name, because the documentation states rules that are easy to get wrong.
Instructions are context, not enforcement. CLAUDE.md can live in four places: a managed policy file for an organization, ~/.claude/CLAUDE.md for one user, ./CLAUDE.md or ./.claude/CLAUDE.md for a project, and ./CLAUDE.local.md for one person in one project. The documentation says of these files and of auto memory: "Claude treats them as context, not enforced configuration." A line in CLAUDE.md that says "never push to main" is a request to the model. To block an action whatever the model decides, the same page points to a PreToolUse hook. After a compaction the project-root CLAUDE.md is read again from disk, so an instruction that must last belongs in the file and not in the conversation.
Settings have a precedence, and lists are combined. Settings live in ~/.claude/settings.json for a user, .claude/settings.json for a project and shared through version control, .claude/settings.local.json for one person in one project, and in managed settings for an organization. The documented order is: "Settings precedence, highest first: managed settings, command line, project local, shared project, user." A single value such as permissions.defaultMode follows that order. A list such as permissions.allow does not: when several files set it, Claude Code "combines the lists instead of picking one". So a project file can add a deny rule and no user file can remove it.
Six permission modes set the baseline. The documentation's table says what runs without asking in each.
| Mode | What runs without asking |
|---|---|
default | Reads only |
acceptEdits | Reads, file edits, and common filesystem commands |
plan | Reads; the agent explores and proposes a plan without editing your source files |
auto | Everything, with background safety checks |
dontAsk | File reads in your working directories and pre-approved tools; anything that would prompt is denied |
bypassPermissions | Everything |
A mode is set with claude --permission-mode, with permissions.defaultMode in settings, or by pressing Shift+Tab in a session. The documentation says that with version 2.1.283 or later, auto is the built-in starting mode for interactive terminal sessions, and it recommends bypassPermissions for isolated containers and virtual machines only. Rules sit on top of the mode, and they are evaluated "in order: deny, then ask, then allow". One sentence matters more than the rest: "Deny rules block in every mode, including bypassPermissions."
Hooks run before the permission check, and cannot loosen it. Claude Code documents 33 hook events and five kinds of handler: a shell command, an HTTP endpoint, an MCP tool, a model prompt and an agent. For guardrails the event that matters is PreToolUse, which runs before every tool call. A hook blocks the call by returning a permissionDecision of "deny", or by exiting with code 2. Two rules fix how a hook and the permission rules combine. A blocking hook wins over an allow rule: it "stops the tool call before permission rules are evaluated". And a hook that returns "allow" does not win over a deny or ask rule: "PreToolUse hook decisions don't bypass permission rules." A hook can make the gate stricter. It cannot make it looser.
A few more documented rules are easy to assume wrongly. Custom subagents are Markdown files with YAML frontmatter in .claude/agents/ or ~/.claude/agents/, and "each subagent runs in its own context window"; Many agents covers what that costs. A skill is a folder with a SKILL.md in .claude/skills/ or ~/.claude/skills/; on a name clash the personal skill wins over the project skill, which is the opposite of settings. The sandbox "covers shell commands only": the file tools, MCP servers and hooks run outside it. And /rewind restores files that the edit tools changed; a file that only shell commands changed "isn't tracked and stays as it is".
What stays with you.
- The content of every file. The harness loads
CLAUDE.md; it does not know your build command or which directory holds generated code. - The rules. No product can know that
git pushto your main branch is a release. You write that deny rule, in the project file, so it holds for everyone. - Turning the sandbox on, and choosing a mode that matches where the session runs.
- Evals. Claude Code records what a session did. Whether the change it made is correct is your tests, your review and your pipeline.
- The cost figure's meaning. The documentation calls
total_cost_usda client-side estimate that can differ from the bill.
A minimal example: a permission rule, then a hook. The first block is the documentation's own example of permission rules in a settings file. It lets npm scripts and commits run without a prompt and blocks every push. Placed in .claude/settings.json and committed, it applies to every developer who opens the project.
{
"permissions": {
"allow": [
"Bash(npm run *)",
"Bash(git commit *)"
],
"deny": [
"Bash(git push *)"
]
}
}
The second block is the documentation's example of a hook. It tells Claude Code to run a script before shell commands that match rm *. The script reads the tool request as JSON on standard input and prints a deny decision if the command contains rm -rf. The model receives the reason as the result of its request.
{
"hooks": {
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"if": "Bash(rm *)",
"command": "${CLAUDE_PROJECT_DIR}/.claude/hooks/block-rm.sh",
"args": []
}
]
}
]
}
}
Both are documented shapes, copied from the permissions and hooks pages. Neither was run for this page. A substring check for rm -rf is a demonstration of the mechanism; it does not catch every destructive command, and it is no substitute for the sandbox.
Codex CLI
What it is, in the vendor's words. "Codex CLI is a coding agent from OpenAI that runs locally on your computer."
Which jobs it runs for you.
- Job 1. Reads
AGENTS.md: first a global file in~/.codex/, then files from the project root down to the current directory, up to a combined size limit of 32 KiB by default. Skills are folders with aSKILL.mdthat must includenameanddescription; Codex scans.agents/skillsfrom the current directory up to the repository root. - Job 2. Runs commands inside a sandbox with a mode:
read-only,workspace-writeordanger-full-access. MCP servers are configured as[mcp_servers.<server-name>]tables inconfig.toml. - Job 3. Runs the loop.
codex execruns it from a script. Custom subagents are TOML files in~/.codex/agents/or.codex/agents/. - Job 4.
codex resumereopens a recent chat;codex exec resumecontinues a scripted session. - Job 5. An approval policy decides when Codex asks:
on-request,never, or a granular policy that keeps some categories of prompt and rejects others. The valueuntrustedis retired; the documentation says the retired setting can prevent the client from starting. Hooks live inhooks.jsonor in[hooks]tables inconfig.toml, in the user's~/.codex/or the repository's.codex/. A hook that is not managed by an administrator "must be reviewed and trusted" before it runs. - Job 6.
--output-schemaasks for "a final response that conforms to a JSON Schema". - Jobs 7 and 8. With
--json, a scripted run prints a stream of events; theturn.completedevent carries token counts. The pages read do not describe a cost figure or a tracing export.
What stays with you. The two settings are separate decisions, and you make both: the sandbox mode says what a command can reach, and the approval policy says when you are asked. The content of AGENTS.md is yours, within the size limit. So are trusting a project's hooks and reviewing what a scripted run changed. The pages read do not state a plan mode or a turn limit, so this page states neither.
A minimal example: approval policy and sandbox mode. This is the documentation's configuration for interactive, read-only use. With on-request, commands the sandbox allows run without a prompt, and the sandbox here allows reading only.
# ~/.codex/config.toml
approval_policy = "on-request"
sandbox_mode = "read-only"
The same choice for one run is codex --sandbox read-only --ask-for-approval on-request. Documented shape, from the approvals and security page; not run for this page.
GitHub Copilot CLI
What it is, in the vendor's words. "The command-line interface (CLI) for GitHub Copilot allows you to use Copilot directly from your terminal." The project's README adds that it is "powered by the same agentic harness as GitHub's Copilot coding agent".
Which jobs it runs for you.
- Job 1. Reads
.github/copilot-instructions.md,.github/instructions/**/*.instructions.md, andAGENTS.md; it also readsCLAUDE.mdandGEMINI.md, and a user file in$HOME/.copilot/. The documentation says it combines these files and "does not define a general precedence order" between them. Compaction is automatic as the conversation nears the token limit;/compactdoes it on request and/contextshows a token breakdown. - Job 2.
/sandbox enableturns on local sandboxing, to "restrict Copilot's access to your filesystem, network, and system capabilities". Trusted directories control where the CLI can read, modify and execute files. GitHub's own MCP server is already configured; others go in~/.copilot/mcp-config.jsonor a project's.mcp.json. - Job 3. Plan mode builds a plan before writing code. Autopilot mode keeps the agent working until the task is complete.
copilot -pruns one prompt and exits. Custom agents are.agent.mdfiles in.github/agents/or~/.copilot/agents/;/fleetruns parts of a task on parallel subagents. - Job 4.
--continueresumes the most recently closed local session;--resumepicks one. Session history is under~/.copilot/session-state/. - Job 5.
--allow-tooland--deny-toolname tools asshell(COMMAND),write, or an MCP server name, and deny takes precedence.--allow-all-toolsremoves the per-tool prompt. Hooks are.github/hooks/*.jsonfiles, or files in~/.copilot/hooks/; the reference lists 14 events. ApreToolUsehook answers with apermissionDecisionof"allow","deny"or"ask". - Job 6.
--output-formatistextorjson. The pages read do not state a schema option. - Jobs 7 and 8.
/usageshows the AI Credits used in the session and token use per model. Session logs are in~/.copilot/logs/. The pages read do not describe how to set up a tracing export.
What stays with you. Which tools run unprompted, which directories are trusted, and what the instruction files say. One documented behavior deserves attention before you rely on a hook as a guard. A preToolUse command hook that crashes or exits with an error denies the tool call, which is the safe direction, but the same page says a hook that times out lets the call proceed. Test the failure you care about.
A minimal example: allow one tool for one scripted run. The command is from the documentation. It runs one prompt without a person present and lets the agent run git without asking. Every other tool that would need approval still does.
copilot -p "Show me this week's commits and summarize them" --allow-tool='shell(git)'
Documented shape, from the page about Copilot CLI. Not run for this page.
Antigravity CLI
What it is, in the vendor's words. "A keyboard-first terminal client that runs Antigravity workflows in local shells, remote cloud environments, and SSH sessions." Its command is agy. It replaced Gemini CLI for many users in 2026; the note under the translation table has the dates.
Which jobs it runs for you.
- Job 1. Instructions are called Rules:
AGENTS.md,GEMINI.mdand.agents/rules/*.md, found from the workspace up to the repository root, plus global files under~/.gemini/. Rules are "cumulative rather than replacement-based". Skills are folders with aSKILL.mdin.agents/skills/. The documentation says it "automatically compacts older turns into checkpoint summaries". - Job 2.
--sandboxruns terminal commands "in a terminal sandbox with OS containment restrictions enabled"; the sandbox is off by default. MCP servers are listed undermcpServersin.agents/mcp_config.jsonor~/.gemini/config/mcp_config.json. - Job 3.
--mode planmakes the agent investigate with read-only tools and present an outline first.agy -pruns one prompt and exits. Custom subagents are files in.agents/agents/;/agentsopens the view that monitors them. The pages read state a time limit for scripted runs,--print-timeout, and no turn limit. - Job 4.
agy --continueresumes the most recent session for the workspace,/resumeopens a picker, and/rewindrolls back to a checkpoint. - Job 5.
--modetakesaccept-edits,autoorplan. Permission rules are lists namedallow,askanddeny, with entries such ascommand(git), and the precedence is "Deny > Ask > Allow". Hooks live in.agents/hooks.jsonfor a workspace and~/.gemini/config/hooks.jsonglobally, with six events:SessionStart,PreToolUse,PostToolUse,PreInvocation,PostInvocationandStop. - Job 6.
--json-schematakes a schema "to enforce structured output in print mode"; the result is in thestructured_outputfield of the JSON output. - Jobs 7 and 8.
/usageshows model quotas and/creditsshows remaining credits. A transcript is written per conversation astranscript.jsonl. The pages read do not state a cost in currency or a tracing export.
What stays with you. The rules files, the permission lists, the choice to turn the sandbox on, and the hook scripts. One detail from the rules page is easy to miss: a file in .agents/rules/ needs frontmatter with a trigger, and the page says a file without it is discarded without a message. An instruction you believe is loaded may not be.
A minimal example: a hook before every terminal command. In this file, a named group registers a script for the PreToolUse event, and the matcher limits it to the tool run_command. The script blocks the call by printing JSON with a decision of "deny".
{
"safety-gate": {
"PreToolUse": [
{
"matcher": "run_command",
"hooks": [
{
"command": "./scripts/safety-check.sh"
}
]
}
]
}
}
Documented shape, shortened from a larger example on the hooks page (that example also carries an enabled field, set to false). Not run for this page.
Cursor and Cursor CLI
What it is, in the vendor's words. "Cursor is a coding agent for building ambitious software." Of the terminal client: "Cursor CLI lets you interact with AI agents directly from your terminal to write, review, and modify code." Its command is agent.
Which jobs it runs for you.
- Job 1. Instructions are called Rules, in four kinds: Project Rules in
.cursor/rules, User Rules, Team Rules andAGENTS.md. A rule file has frontmatter withdescription,globsandalwaysApply. Skills are folders with aSKILL.mdin.cursor/skills/or.agents/skills/. The hooks page lists an eventpreCompact, so compaction exists; the pages read do not describe it further. - Job 2.
--sandboxtakesenabledordisabled. The sandbox restricts terminal commands: it uses Seatbelt on macOS and Landlock with seccomp on Linux, and network access is "blocked by default". MCP servers are listed undermcpServersin.cursor/mcp.json. - Job 3. Three modes: Agent ("full access to all tools"), Plan ("design your approach before coding") and Ask ("read-only exploration without making changes").
agent -pruns without a person present. Custom subagents live in.cursor/agents/, and prefixing a message with&hands it to a Cloud Agent. - Job 4.
agent resumecontinues the latest chat;agent lslists earlier ones;--resumetakes a chat id. - Job 5. The CLI's permissions are tokens in
~/.cursor/cli-config.jsonor a project's.cursor/cli.json:Shell(),Read(),Write(),WebFetch()andMcp(). "Deny rules take precedence over allow rules." Hooks live in.cursor/hooks.json; the page lists 21 events. - Job 6.
--output-formatistext,jsonorstream-json. The pages read do not state a schema option. - Jobs 7 and 8. The documented JSON output has the fields
duration_ms,result,session_idandrequest_id. A transcript file exists and its path is passed to hooks. The pages about usage and tracing were not read, so this page says nothing about them.
What stays with you. The rules, the allow and deny tokens, and the hook scripts. Read the failure rule before you use a hook as a guard. The hooks page says exit code 2 blocks the action, and that other failures let the action proceed: they are "fail-open by default". A hook entry can set failClosed to reverse that. In a scripted run, the documentation says that without --force "anything that would need approval is rejected", which is the safe default; --force allows commands unless a deny rule names them.
A minimal example: allow and deny tokens for the CLI. The block is shortened from the documentation's example. The agent may run ls and git and read TypeScript sources without asking. It may not run rm, read environment files or write key files, whatever else is allowed.
{
"permissions": {
"allow": [
"Shell(ls)",
"Shell(git)",
"Read(src/**/*.ts)"
],
"deny": [
"Shell(rm)",
"Read(.env*)",
"Write(**/*.key)"
]
}
}
Documented shape, from the CLI permissions reference with some entries removed. Not run for this page. Shell(rm) matches the first word of a command line; a command that deletes files by another route is not covered, which is what the sandbox is for.
Grok Build
What it is, in the vendor's words. "Grok Build is a powerful and extensible coding agent." Its command is grok.
Which jobs it runs for you.
- Job 1. Reads
AGENTS.md(alsoAgents.mdandAGENT.md): global rules in~/.grok/first, then every directory from the repository root down to the working directory, with deeper files winning on a conflict. Skills are folders with aSKILL.mdunder.grok/skills/or~/.grok/skills/, and a skill appears as a slash command. Compaction is automatic when context use reaches a set percentage, 85 by default, and/compactdoes it on request. - Job 2. The sandbox is "off by default".
grok --sandbox workspaceturns it on with one of the documented profiles:workspace,devbox,read-onlyorstrict. It uses Landlock on Linux and Seatbelt on macOS. MCP servers are[mcp_servers.<name>]tables in~/.grok/config.toml;/mcpsshows them. - Job 3.
/planmakes the agent explore and draft "a plan for your approval before it edits anything".grok -pruns one prompt from a script./taskslists background tasks and subagents; the subagent page itself was not read. - Job 4.
--continuecontinues the most recent session in the current directory and--resumetakes a session id;/resumedoes the same inside a session. Scripted sessions are stored in~/.grok/sessions. - Job 5. Three modes: ask ("prompt for anything not already allowed", the default), auto (a classifier approves safe tools) and always-approve. Rules live in a
[permission]table, and "deny always wins over allow". Hooks are.grok/hooks/*.jsonor~/.grok/hooks/*.jsonfiles; a project's hooks need trust, granted with/hooks-trust. - Job 6.
--output-formatisplain,jsonorstreaming-json. The pages read do not state a schema option. - Jobs 7 and 8.
/usageshows credit usage./transcriptshows the full transcript and/exportwrites it out. The pages read do not describe a tracing export.
What stays with you. The rules, turning the sandbox on, and trusting a project's hooks. Two documented behaviors shape how much a hook can guard. PreToolUse is "the only blocking event". And a hook that times out, crashes or prints malformed output does not block: "Only an explicit deny blocks." The documentation also says that in always-approve mode, deny rules and PreToolUse hooks still apply, so those two are where a limit that must hold belongs.
A minimal example: permission rules. This block is the documentation's example. It allows any git command and all reads, and denies rm -rf whatever the mode.
[permission]
rules = [
{ action = "allow", tool = "bash", pattern = "git *" },
{ action = "allow", tool = "read" },
{ action = "deny", tool = "bash", pattern = "rm -rf *" },
]
Documented shape, from the permissions page; it goes in ~/.grok/config.toml or a project's .grok/config.toml. Not run for this page.
Across the six tabs one pattern repeats. Every product gives you a rule list in which deny wins, and every product gives you a hook before the tool call. What differs is what happens when the hook itself fails: one product denies the call, others let it through, one lets you choose. If a hook is the only thing between the agent and a command that must never run, that difference is the first thing to read in the documentation and the first thing to test.
What a coding harness does not do for the agent you ship#
Now the second question from the opening. The team's coding harness runs all eight jobs. Why did they still write harness.py?
Because the eight jobs were built for a different situation, and each one shows it.
Take job 5. A coding harness's approval gate asks the person at the keyboard: a developer, who can read the command and knows the repository. The quote agent's gate asks an underwriter, later, in another application, about a reply to a customer, and a premium-tier quote needs a senior underwriter. No permission mode expresses that. It is a domain rule, and in the miniature it is the function authorize.
Take job 2. The built-in tools are general: read, edit, search, run a command. The quote agent must have the opposite: three narrow tools and nothing else, with no shell at all. A product agent's safety comes mostly from what it cannot ask for.
Take job 4. A session on a developer's disk is state for one person on one machine. The quote agent's state must survive a deploy, be shared by several service instances, and guarantee that the reply email is not sent twice. That is the checkpoint table and the outbox from Reliability and cost, not a transcript file.
Take job 8. A transcript records what a session did. It does not say whether the agent's decisions are right. The golden set in evals.py does that for the quote agent, and nothing in a coding harness can know what a correct quote is.
A coding harness can run without a person, and its scripted mode suits a pipeline step such as a code review. That is still software work in a repository. An agent that answers brokers is a different product with different users, and it needs a harness whose rules are about insurance.
This does not mean starting from the thirty-line loop. The parts of a coding harness are available as a library. The Claude Agent SDK, for example, describes itself as the same tools, agent loop and context management that power Claude Code, and SDKs shows what that rung gives you and what it leaves. The choice is not "a coding harness or nothing". It is which rung to stand on for the agent you ship, job by job.
From a finished harness to parts you assemble#
The team can now read the tool on their desk the way they read their own code: an instructions file is job 1, a permission rule is job 5, a hook is their own check placed inside someone else's loop. They can move between six products with one table, and they know which cells to test before trusting them.
What they still lack is a harness for their own agent that they did not write line by line. A coding harness is finished, and that is its limit: its loop, its tools and its gate are the vendor's. A framework is the same set of parts sold unassembled: the loop as a library, with the tools, the state and the approval gate left for you to supply. Frameworks looks at what those libraries give the quote agent, and what a graph runtime adds when a run has to pause for the underwriter and continue the next day.