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
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.oh CLI in a local repository to handle coding tasks, debug failing test suites, and execute multi-turn file edits directly from the shell.@zhijiewang/openharness-sdk), consuming typed event streams to monitor tool usage, model costs, and code generation steps.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.
bash npm install -g @zhijiewang/openharness To use the programmatic TypeScript SDK in a project: bash npm install @zhijiewang/openharness-sdkbash export ANTHROPIC_API_KEY="your-api-key" export OH_BINARY="/path/to/oh" # Optional, defaults to PATHoh 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