Skip to main content

Agent Harnesses: Claude Code, OpenCode, Pi and Hermes

Why This Matters

The model is only half of an agent. The other half is the harness: the program that decides what context the model sees, which tools it can call, how permissions work and how sessions are stored. The same model behaves differently in different harnesses, and knowing the options keeps you from being locked into one.

Four harnesses compared

Claude CodeOpenCodePiHermes Agent
MakerAnthropicOpen source (opencode.ai)Mario Zechner, now Earendil (open source)Nous Research (open source)
ModelsClaude models; other endpoints via compatible APIsMany providersMany providersMany providers and own endpoints
PhilosophyFull-featured: skills, hooks, subagents, plugins, MCPOpen, provider-agnostic, similar feature setMinimal core: read, write, edit, bash; extend with TypeScriptLong-running personal agent with memory, skills and messaging
Context fileCLAUDE.mdAGENTS.md (and Claude-compatible paths)ConfigurableOwn memory and persona files

Check each project’s documentation for current details; these tools change monthly.

What carries over between harnesses

The good news: most of what you built in this course is portable.

  • Instructions: keep shared rules in AGENTS.md and import it from CLAUDE.md (lesson 3, Context Architecture: CLAUDE.md, AGENTS.md and Rules).
  • Skills: the SKILL.md format is an open convention. OpenCode, for example, also discovers skills in .claude/skills/.
  • MCP servers: any MCP-capable harness can use the same servers.
  • Tests, hooks in git, CI: these do not care which agent made the change. This is why quality gates belong in your pipeline, not only in the agent.

What does not carry over one-to-one: harness-specific hook formats, permission configuration and slash commands.

Choosing per task

  • Cost: a cheaper model in a lean harness for routine edits; a frontier model for hard problems.
  • Model access: company policy may require a specific provider or a local model (lesson 18, Local LLMs: Ollama, LM Studio and MLX).
  • Tooling: need hooks, subagents and plugins? A full-featured harness. Want to understand and shape every token? A minimal one like Pi.
  • Where it gets stuck: long-running tasks, large monorepos and very long sessions expose the differences quickly. Try your hardest real task, not a demo.

Hands-on

  1. Install a second harness (OpenCode or Pi) next to Claude Code.
  2. Make sure your instructions live in AGENTS.md and your skills in .claude/skills/.
  3. Give both harnesses the same task on separate branches.
  4. Compare: time to green, number of corrections, tokens or cost, and how readable the diff is.

Walkthrough in TestRun Board

  1. Open the repository in OpenCode. It reads AGENTS.md directly and discovers the skills in .claude/skills/, so both instructions and skills carry over without changes.
  2. Ask the same question as in lesson 1, What Agentic Engineering Is: “How do I run the full check?” The answer comes from the same AGENTS.md.
  3. Now notice what does not carry over: .claude/settings.json (permissions and hooks) is Claude Code configuration. In OpenCode, ask it to add a package and see that no hook stops it.
  4. That is exactly why the example repository repeats its important rules in CI: scripts/agent-policy.sh fails a pull request that adds a dependency without the new-dependency label or adds .only/.skip, whichever agent wrote the code.
  5. Give both harnesses the lesson 2, Build Your First Feature with an Agent spec on separate branches and compare time to green, corrections and the diff.

Key Takeaways

  • Agent = model + harness; the harness shapes context, tools and safety.
  • Keep instructions, skills and MCP configuration in portable formats.
  • Put quality gates in CI so they hold no matter which agent wrote the code.
  • Choose the harness per task on cost, model access, tooling and robustness.