OpenHarness

OpenHarness is an open-source terminal coding agent and execution harness developed by Zhijie Wong. Built as an open alternative designed to achieve parity with tools like Claude Code, OpenHarness provides both an interactive terminal interface (`oh`) and programmatic interfaces for driving autonomous coding workflows. In daily use, developers interact with OpenHarness via the `oh` command-line executable or integrate it into automated pipelines through dedicated Python and TypeScript SDKs. The tool executes multi-turn programming tasks by streaming typed event payloads—such as text deltas, tool executions, cost metrics, and session states—over an NDJSON event protocol. OpenHarness distinguishes itself by offering dual-layer integration: it provides an in-process SDK and a subprocess-driven client SDK, along with support for the Agent Client Protocol (ACP) server specifications. This architecture allows developers to run standalone CLI coding sessions or embed the harness directly into larger toolchains with structured event streaming and hook decisions. OpenHarness is open-source software available under GitHub, providing a self-hostable harness without proprietary licensing fees, though users supply their own model backend access.

Tags: agent harness, cli, coding agent, OpenSource, terminal

Visit OpenHarness

Key features

  • oh Command-Line Interface — Provides a standalone terminal binary for interactive agentic development and automated task execution. - Agent Client Protocol (ACP) Server — Implements ACP server specifications to interface smoothly with compatible agent orchestration tooling. - Typed Event Streaming — Yields structured NDJSON streaming events covering text deltas, tool execution lifecycle, cost tracking, and session turns. - Dual-Track SDKs — Offers TypeScript and Python SDKs to programmatically drive the oh CLI binary as an orchestrated subprocess. - In-Process Agent API — Includes an embedded in-process agent library alongside the subprocess-driven SDK architecture. - Hook & Execution Controls — Supports execution hooks with automated process termination handling and cross-platform process tree cleanup.

Use cases

Use Case: Interactive Terminal Coding Developers use the oh CLI in a local repository to handle coding tasks, debug failing test suites, and execute multi-turn file edits directly from the shell.

Use Case: Programmatic Agent Orchestration Engineers build custom automation pipelines using the TypeScript or Python SDK (@zhijiewang/openharness-sdk), consuming typed event streams to monitor tool usage, model costs, and code generation steps.

Use Case: ACP Protocol Server Integration Teams looking to standardize agent interfaces can run OpenHarness as an ACP-compliant server backend for external IDE extensions or orchestrators.

Who it is for

OpenHarness is built for developers, system builders, and AI engineers seeking an open, scriptable CLI agent that mirrors Claude Code-style workflows with full event streaming support. It is particularly suitable for developers building custom tooling or automated agent workflows via TypeScript or Python. It is less suitable for users looking for a pre-configured graphical IDE plugin without terminal configuration.

Install guide

Installation Install the CLI package globally using npm: bash npm install -g @zhijiewang/openharness To use the programmatic TypeScript SDK in a project: bash npm install @zhijiewang/openharness-sdk

First Run Ensure your agent environment and model provider credentials (such as your Anthropic API key) are exported in your shell, or configure the path to the binary if using the SDK: bash export ANTHROPIC_API_KEY="your-api-key" export OH_BINARY="/path/to/oh" # Optional, defaults to PATH

Example Session Run the oh CLI directly to inspect a codebase and execute a task: bash oh "Inspect the tests in packages/sdk/test and fix any failing unit tests"

Part of CLI Coding Agents

Categories: AI Coding Agents, Code Assistants, Developer Tools

Related CLI agents

  • amux — amux is an open-source agent harness and session multiplexer developed by Mixpeek. Built in Rust, it is designed to manage,…
  • CLI Agent Orchestrator — CLI Agent Orchestrator (CAO) is an open-source agent orchestration harness maintained by AWS Labs (awslabs). It provides a structured CLI…
  • ForgeCode — ForgeCode is an open-source terminal coding harness and multi-agent orchestrator developed by Tailcall. It integrates directly into the developer's shell…
  • Pi Boss — Pi Boss is an open-source multi-agent orchestration extension developed by skyfallsin for the pi terminal coding agent ecosystem. It provides…
  • gate4agent — gate4agent is an open-source Rust-based agent harness and runtime orchestrator developed by ZENG3LD. It serves as a supervisory control layer…
  • Martty — Martty is an open-source terminal user interface (TUI) coding agent and session harness developed by openma-ai. It provides an interactive…
  • AI Tools
  • Categories
  • Industries
  • CLI Coding Agents
  • MCP Servers
  • MCP Categories