Skip to content
Beeuni
English
Esc
↑↓navigate↵open⌘Jpreview
On this page

Harnesses

How a project selects OpenCode or pi, and which session features each supports.

A harness is the agent runtime inside a session’s sandbox. It runs the model loop, calls tools, and produces the transcript.

Both harnesses read the same project: beeuni.yaml, the configured agents and skills, the root AGENTS.md, and memory/. The clients (web, CLI, TUI, mobile, SDK) read both through the same session API. The table below compares their session features. Each harness also reads its own configuration files.

How a session selects its harness

New sessions run pi. Existing OpenCode sessions remain supported.

pi uses the Beeuni LLM gateway. Both are standard behavior with no per-project switch.

The manifest field runtime is deprecated and no longer selects a harness.

import { runtimeSupports } from '@beeuni/sdk';

const { health } = await s.health();
if (!runtimeSupports(health?.capabilities, 'session.compact')) hideCompact();

What each harness supports

Both harnesses

Feature OpenCode pi
Chat turns, streaming, stop Yes Yes
Agent settings: prompt, model, variant, mode, permission, temperature, top_p, steps Yes Yes. pi does not apply options (provider options).
Tool access per agent (agents.<name>.tools in beeuni.yaml: all, none, a list, exclude) Yes Yes
Per-agent permission rules and permission requests Yes Yes
Questions (question tool) Yes Yes
The project’s root AGENTS.md rules file, or CLAUDE.md when the root has no AGENTS.md Yes Yes
Subagents (task tool), session.subagents Yes Yes: declared, permitted agents with mode: subagent or all. V2 also provides general and read-only explore. A subagent cannot start another subagent.
Skills (skills/ and the managed beeuni-* skills), with the agent’s skills grant Yes. The agent loads a skill with the skill tool. Yes. The system prompt lists each granted skill; the agent reads the file.
The built-in tools are web_search, image_search, scrape_webpage, memory and show. Connected application actions are accessed through beeuni connectors; connector grants control access. Harness tools such as read, edit, bash and task are separate. Yes Yes
Project tools (tools: in beeuni.yaml) Yes Yes
Summarize the conversation on demand or automatically near the model’s context limit, session.compact Yes Yes. If a request exceeds the context limit, pi summarizes the conversation and retries once.
Guidance during a running turn, session.steer Yes, on compatible runtime versions Yes
Structured session log, session.log.v2 Yes Yes
Project slash commands, session.commands Yes, from commands/ in the OpenCode config directory. Yes, from the prompt templates in prompts/ in the pi config directory and in pi packages. pi does not read OpenCode’s commands/.
Terminal in the sandbox (PTY) Yes Yes
bash, read, write, edit, glob, grep tools; secrets in the shell; the beeuni CLI Yes Yes

The web tools follow the websearch (web_search, image_search) and webfetch (scrape_webpage) permission keys on both harnesses. On OpenCode these tools cannot request permission, so an ask rule blocks the call. On pi, an ask rule prompts for permission. For pi’s memory tool, commands that change a file follow edit, and view follows read. On OpenCode, the tool follows the memory permission rule.

OpenCode only today

Feature Capability OpenCode pi
Rewind to a message and restore it. Edit-and-resend uses rewind. session.rewind Yes No
MCP servers (mcp in opencode.jsonc) session.mcp Yes No MCP client. Connectors work on both harnesses through the beeuni connectors CLI.
Todo list (todowrite tool) and the plan card session.todo Yes No. The plan card stays empty.
Attach the harness’s own terminal client (beeuni connect, TUI Alt+o) session.attach Yes No. See TUI.
Runtime config document (/global/config) session.config Yes No. Agents and models come from the project on both.
Fork a session at a message session.fork Yes No
A shell command run as a turn session.shell Yes No

A pi session returns 501 feature_not_supported for unsupported features. Requests for an unavailable configuration document, such as /global/config, return 404.

Harness configuration files

V3 uses the manifest’s extensions registry and per-agent grants. The directories and package settings below apply to v2 projects.

Each harness has a separate configuration directory.

OpenCode pi
Directory harnesses/opencode/, or opencode.config_dir harnesses/pi/, or pi.config_dir
Legacy directory .beeuni/opencode/ .beeuni/pi/
Contents opencode.jsonc, plugins/, tools/, commands/ settings.json, extensions/, skills/, prompts/
Extensions Plugins and OpenCode-only tools in that directory pi packages in harnesses.pi.packages, and extension files in extensions/

A pi session does not read opencode.jsonc, plugins/, tools/, or commands/. An OpenCode session does not read the pi directory. A tool both harnesses need is a project tool, declared in beeuni.yaml, not a file in either directory.

pi packages come from pi.dev/packages. A package can add tools that pi does not have, for example an MCP adapter or a todo tool. Beeuni loads the package; it does not test third-party packages.

Was this page helpful?