{"slug": "show-hn-lite-harness-self-hosted-cursor-agents-use-claude-code-opencode", "title": "Show HN: Lite-Harness – Self-Hosted Cursor Agents (Use Claude Code/OpenCode)", "summary": "LiteLLM Labs released Lite-Harness, an open-source tool that runs AI coding agents like Claude Code, OpenCode, and Codex in a self-hosted sandbox with a unified CLI and API. The project consolidates multiple agent harnesses into a single Docker service to simplify maintenance, session management, and tool integration for developers automating coding tasks.", "body_md": "Run Claude Code/Codex/OpenCode on a sandbox in autopilot. Call the harnesses via a CLI or API's through an OpenCode-compatible API spec.\n\n```\n# git clone https://github.com/LiteLLM-Labs/lite-harness && cd lite-harness\n# cd cli && npm install -g .\n\nlite login\n# Server URL [http://localhost:4096]:\n# Master key: ✓ Saved\n\nlite claude-code\n\n  lite  claude-code\n  claude-sonnet-4-6  ·  localhost:4096  ·  sess_a1b2c3\n\n  /clear to reset history  · Ctrl+C or \"exit\" to quit\n\n❯ monitor CI every hour and fix any bugs\n  ⠙ thinking…\n  ✓ bash {\"command\":\"gh run list --limit 5\"}\n  I'll set up a recurring CI monitor. Checking the last 5 runs now...\nlite opencode\n\n  lite  opencode\n  claude-sonnet-4-6  ·  localhost:4096  ·  sess_d4e5f6\n\n  /clear to reset history  · Ctrl+C or \"exit\" to quit\n\n❯ dm github stargazers daily\n  ⠙ thinking…\n  ✓ bash {\"command\":\"gh api /repos/LiteLLM-Labs/lite-harness/stargazers\"}\n  Got 42 new stargazers. Drafting DMs...\n```\n\nSupported agents: `opencode`\n\n`claude-code`\n\n`github-copilot`\n\n`codex`\n\n— [full CLI docs](/LiteLLM-Labs/lite-harness/blob/main/cli/README.md)\n\n```\nexport MASTER_KEY=$(openssl rand -hex 32)\necho \"MASTER_KEY: $MASTER_KEY\"\n\ndocker run -p 4096:4096 \\\n  -e LITELLM_API_BASE=https://your-litellm-gateway \\\n  -e LITELLM_API_KEY=sk-... \\\n  -e MASTER_KEY=\"$MASTER_KEY\" \\\n  ghcr.io/litellm-labs/lite-harness:latest\n```\n\nOpen [localhost:4096](http://localhost:4096), paste the master key on the login page.\n\nNeeds a [LiteLLM](https://github.com/BerriAI/litellm) gateway. Full config: [docs/configuration.md](/LiteLLM-Labs/lite-harness/blob/main/docs/configuration.md).\n\nBy default, sessions (history, model context) are lost when the server restarts. To keep them across restarts, mount persistent storage at the data directory:\n\n**Docker:**\n\n```\ndocker run -p 4096:4096 \\\n  -v ./data:/home/sandbox/.local/share/lite-harness \\\n  -e LITELLM_API_BASE=... \\\n  -e LITELLM_API_KEY=... \\\n  -e MASTER_KEY=... \\\n  ghcr.io/litellm-labs/lite-harness:latest\n```\n\n**Custom path** (e.g. a mounted cloud volume at `/mnt/data`\n\n):\n\n```\n-e DB_PATH=/mnt/data/db.db\n```\n\nOn restart the server logs `hydrated N session(s) from db`\n\nand all prior sessions are immediately available.\n\nSet `E2B_API_KEY`\n\nor `DAYTONA_API_KEY`\n\nand agents get an isolated Linux sandbox automatically. Full options (templates, snapshots, vault): [docs/configuration.md](/LiteLLM-Labs/lite-harness/blob/main/docs/configuration.md#sandbox-opencode-mcp).\n\nWe built lite-harness because running opencode and claude-code as separate servers got hard to maintain - multiple services, different API specs, unreliable session management, different inputs for MCP tools and system prompts.\n\nSo we wrapped all harnesses in an OpenCode-compatible server and put it in one Dockerfile, giving us one service to maintain, with shared MCP tools, prompts, and session management across all harnesses.\n\n[API reference](/LiteLLM-Labs/lite-harness/blob/main/docs/api.md) · [Architecture](/LiteLLM-Labs/lite-harness/blob/main/docs/architecture.md) · [Configuration](/LiteLLM-Labs/lite-harness/blob/main/docs/configuration.md) · [CLI](/LiteLLM-Labs/lite-harness/blob/main/cli/README.md) · [Add a harness](/LiteLLM-Labs/lite-harness/blob/main/docs/contributing-harness.md)\n\nMIT", "url": "https://wpnews.pro/news/show-hn-lite-harness-self-hosted-cursor-agents-use-claude-code-opencode", "canonical_source": "https://github.com/LiteLLM-Labs/lite-harness", "published_at": "2026-05-30 23:51:21+00:00", "updated_at": "2026-05-31 00:16:30.163285+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "ai-infrastructure", "large-language-models", "artificial-intelligence"], "entities": ["Lite-Harness", "Claude Code", "OpenCode", "Codex", "GitHub Copilot", "LiteLLM", "LiteLLM Labs"], "alternates": {"html": "https://wpnews.pro/news/show-hn-lite-harness-self-hosted-cursor-agents-use-claude-code-opencode", "markdown": "https://wpnews.pro/news/show-hn-lite-harness-self-hosted-cursor-agents-use-claude-code-opencode.md", "text": "https://wpnews.pro/news/show-hn-lite-harness-self-hosted-cursor-agents-use-claude-code-opencode.txt", "jsonld": "https://wpnews.pro/news/show-hn-lite-harness-self-hosted-cursor-agents-use-claude-code-opencode.jsonld"}}