Skip to main content
November 23, 2026

Zero MCP, One Prompt: An Agent Harness You Can Audit

Zero MCP, One Prompt: An Agent Harness You Can Audit

You write a careful AGENTS.md and tune three skills. The agent still does something odd, because much of what the model reads came from the vendor: a base system prompt, built-in agents, tool descriptions, plugin hooks and MCP schemas. You did not write it, and it can change on the next upgrade.

One answer is radical: run the harness with a single short system prompt that you wrote, role files that load only when needed, every default agent off, and no MCP servers or third-party plugins. This post turns that stance into a checklist for OpenCode: what to remove, what to keep, and how to gate the few things the agent may touch.

Why the Vendor Prompt Is a Moving Part

The base prompt is not a constant. It is code, and it ships with releases.

  • OpenCode's prompt files are public, and the commit history of the prompt directory shows them changing. In March 2026 one commit says "remove unnecessary parts from the fallback system prompt" and another adds a GPT prompt "so non codex gpt models have their own system prompt."
  • The Claude Code changelog for 2.1.330 says it "Changed unrecognized model names containing "sonnet" or "haiku" to use the shorter system prompt" and "Fixed the system prompt keeping the earlier model's instructions."
  • Anthropic publishes system prompt release notes for its apps and says it "periodically updates the system prompt." The same page adds: "These updates do not apply to the Claude API."

The prompt you get depends on the model name, and you learn about a change from a changelog line, not from a diff of what the model reads. When the vendor prompt and your AGENTS.md disagree, the model resolves the conflict quietly. We covered how that goes wrong across model upgrades in skills regress on model upgrades.

What OpenCode Lets You Replace

OpenCode's documented knobs cover most of the prompt surface:

  • The base prompt. The agents docs say a non-empty system value "replaces the provider's base prompt for that agent," and that for a Markdown agent "the Markdown body becomes the agent's system prompt." Project instructions and skills "are still added."
  • The built-in agents. OpenCode ships build and plan as primary agents and general and explore as subagents. Each can be removed with "disabled": true. Three hidden agents, compaction, title and summary, "perform maintenance and cannot be selected directly."
  • Skills on demand. Per the skills docs, only the ID, name and description of each skill go into each step. The body loads when the model calls the skill tool.
  • Permissions. The permissions docs use an ordered list of action, resource and effect rules, and "the last matching rule wins."

The Checklist

Remove

Component Default Why it hurts audit Action
Provider base prompt Added per model Changes with releases and model names Replace with your own agent body
build, plan, general, explore On Each brings its own prompt and tool policy "disabled": true, set default_agent
MCP servers None until you add one "MCP tools consume model context" (MCP docs); schemas come from someone else's server Do not configure any
npm and Git plugins None until you add one Ones that follow a tag, range or branch are checked "on startup and every 24 hours" (plugins docs) Do not install; if you must, pin an exact version or full commit hash
CLAUDE.md fallback Read where no AGENTS.md exists A second instruction tree you may forget about OPENCODE_DISABLE_CLAUDE_CODE=1 (rules docs)
URL entries in instructions Fetched at config load Remote text changes without a commit Use local files only

Keep

  • One short agent prompt in .opencode/agents/<name>.md, in git, reviewed like code.
  • AGENTS.md for project facts. OpenCode loads the global file and every AGENTS.md from the workspace up, and finds nested ones "as the agent explores the project." Know which ones exist.
  • Role files as skills, so a reviewer or investigator role costs one description line until the agent needs it.
  • The hidden maintenance agents. You cannot select them, but they still run with their own prompts. Read those prompts in the source of the version you run.

Gate

The default base policy is { "action": "*", "resource": "*", "effect": "allow" }. Reads of *.env files ask, but the docs say "no default rule asks for external_directory," so reads and edits outside the project proceed without a prompt. The page also warns that shell "runs with the host user's filesystem, process, and network authority." Flip the default to ask and allow only what you can name.

A Worked Example

Project config, opencode.jsonc:

{
  "$schema": "https://opencode.ai/config.json",
  "default_agent": "ops",
  "agents": {
    "build":   { "disabled": true },
    "plan":    { "disabled": true },
    "general": { "disabled": true },
    "explore": { "disabled": true }
  },
  "permissions": [
    { "action": "*",                  "resource": "*",              "effect": "ask"   },
    { "action": "read",               "resource": "*",              "effect": "allow" },
    { "action": "glob",               "resource": "*",              "effect": "allow" },
    { "action": "grep",               "resource": "*",              "effect": "allow" },
    { "action": "read",               "resource": "*.env",          "effect": "deny"  },
    { "action": "read",               "resource": "*.env.*",        "effect": "deny"  },
    { "action": "shell",              "resource": "git status *",   "effect": "allow" },
    { "action": "shell",              "resource": "git diff *",     "effect": "allow" },
    { "action": "shell",              "resource": "git push *",     "effect": "deny"  },
    { "action": "external_directory", "resource": "*",              "effect": "deny"  },
    { "action": "webfetch",           "resource": "*",              "effect": "deny"  },
    { "action": "websearch",          "resource": "*",              "effect": "deny"  },
    { "action": "skill",              "resource": "*",              "effect": "deny"  },
    { "action": "skill",              "resource": "role-*",         "effect": "allow" }
  ]
}

Order matters: broad rules first, exceptions after. The two skill rules hide every skill that OpenCode discovers in its compatibility folders (.claude/skills, .agents/skills) except your own role-* set. There is no mcp key and no plugins key.

The agent, .opencode/agents/ops.md:

---
description: Investigates and makes small, reviewed changes in this repo
mode: primary
---

You work only inside this repository. Read AGENTS.md first.
Before a task, load the one role skill that fits it:
role-investigator, role-reviewer or role-writer.
Make the smallest change that solves the task.
Do not run commands that change remote state.
If two instructions conflict, name both and stop.

Six lines, and git log on that file is its changelog.

Constrain the Output, Deliberately

You can add an output rule too, for example ASD-STE100 Simplified Technical English, a controlled language that the European aerospace industry created under AECMA (now ASD) for maintenance manuals in civil aviation. It has writing rules and "a controlled vocabulary: only approved words, each with one meaning," and the standard is free to download. STE is not a model setting: a fixed dictionary is a choice you write into the prompt and check in review.

Audit on Every Upgrade

Pin the OpenCode version, and on each upgrade:

  1. Read the release notes for changes to agents, permissions, skills discovery and the hidden agents.
  2. Confirm the agent list shows only your agent.
  3. List every instruction source: find . -name AGENTS.md -o -name CLAUDE.md, the instructions key, and each skills folder.
  4. Run one task with a forbidden action (a git push, a read of .env) and check that it is refused.
  5. If the model goes through a proxy you control, save one request body and diff it against the last release.

A failure mode to watch: OpenCode plugins can register an execute.before hook that can "inspect or replace tool input before execution" (plugin hooks). A plugin you did not write can change what a tool runs, and your prompt never sees the change. That is one more reason the plugin list should be empty, or short and pinned.

The Same Argument for an SRE Agent

This matters more when the agent touches production. Akmatori runs as containers inside your network, and the architecture docs show the instruction surface: Akmatori writes AGENTS.md for each run, skills are SKILL.md files in the open Agent Skills format, and a generated connected-tools skill lists the enabled tools. Tool access is not left to the prompt. The API server builds an allowlist from the kind of run, and the MCP Gateway "refuses every tool outside it." Credentials stay in PostgreSQL, so "an agent never sees a password, token or key." SSH hosts are read-only by default, with allowed and denied command patterns per connector (connectors docs).

Prompts guide behaviour. Gates limit damage. Our post on agent blast radius makes the case for putting the hard limits outside the model.

Conclusion

You cannot audit a prompt you cannot read. Replace the base prompt with a few lines in git, disable the default agents, skip MCP servers and plugins, load roles on demand, and flip the permission default to ask. What is left fits on one screen.

If your team wants AI-assisted incident workflows with instructions and tool gates you can read, Akmatori helps SRE teams investigate alerts, coordinate response, and automate safe infrastructure actions. Powered by Gcore for global infrastructure reliability.

Automate incident response and prevent on-call burnout with AI-driven agents!