NelsonAuthor
OpenHarness build log
Built on November 18, 2026 for the HarnessRouter hackathon. Everything below comes from our own records: git history, the app's task store, and HarnessRouter's own session data. Times are UTC.
TL;DR
| Build time | About 2¼ hours from an empty repo (~18:08) to the shipped demo (20:24) |
| What we shipped | A harness- and model-agnostic coding platform: 10 HarnessRouter harnesses, 65 models, live sessions, follow-ups, side-by-side runs, Usage & budgets, a judge-facing README and a 2:53 demo made from real footage |
| HarnessRouter usage | 10 harnesses created, 19 sessions, 21 tasks (incl. 2 follow-ups and 3 we cancelled), about 89 agent-minutes |
| Total spend | $5.33. Our per-task metering matches HarnessRouter's session spend_usd to the cent. |
| Code | 3,768 lines of TypeScript in 54 files, 17 unit tests, 281 lines of harness admin scripts, 1,173 lines of video pipeline |
| How we built it | With an AI coding agent (Claude Code) following HarnessRouter's agents.md → Skill flow, the workflow HarnessRouter designed for agents, plus our own product and design decisions on top |
Timeline
| Time (UTC) | Milestone | Notes |
|---|---|---|
| ~18:08 | Empty repo | Idea: "OpenCode made the model swappable; let's make the harness swappable too." |
| ~18:15 | Read harnessrouter.ai/agents.md | It points to the Skill in HarnessRouter/plugins (v0.3.0-dev.2). We read SKILL.md and all references, starting with the API reference, runtime integration and harness config. |
| ~18:16 | Key stored server-side | One-line .env.harnessrouter, owner-only (0600) and git-ignored. Never in the browser, logs or commits. |
| ~18:17 | Discovery and catalog | GET /v1/uhp lists 2026-09-28 (the Skill's verified version) and reports memories: false. GET /v1/me names the Default Workspace. GET /v1/bases lists 29 bases, most running 50–68 models. |
| ~18:19 | 10 harnesses created | One per agent base: Claude Code, Codex, Qwen Code, MiniMax, Gemini CLI, OpenCode, Kimi, Grok Build, Aider, OpenHands. Reused by exact name, with an Idempotency-Key on each create. The workspace's two existing harnesses were left untouched. |
| ~18:21 | First probe task | Claude Code on claude-haiku-5.5 (a per-task model override) cloned developit/mitt, installed dependencies, ran the tests and wrote a patch: 110 s, $0.022. This proved sandbox networking, the override and our output contract. |
| ~18:23 | First instruction fix | The probe showed out/ didn't exist before the first write, so we added mkdir -p out to the instructions and rolled it to all 10 harnesses: GET with ETag → full PUT with If-Match → readback. Zero conflicts. |
| ~18:25–18:40 | Server and UI | Adapter (from the Skill's Node template), streaming runner, SSE fan-out, routes, composer, session view, side-by-side view. |
| 18:41 | First real task through the app | Qwen Code + qwen3.8-max: "Add a once() method with tests and docs." |
| ~18:58 | Unplanned crash test | Editing restarted our dev server mid-task. On the next request, recovery found the turn's saved , polled , and collected the outputs. Nothing was re-sent. |
Key decisions, and why
- One HarnessRouter harness per agent base. A harness's
basecan't change, butmodelcan be overridden per task. So the product owns ten harnesses that share one set of instructions, and the user's model choice travels asmodelon each task. That gives 10 harnesses × up to 63 models = 453 combinations with just 10 resources. - One output contract for every harness. The shared instructions require
out/changes.patch(the cumulative diff against agit tagtaken at the start),out/SUMMARY.mdandout/manifest.json(title, summary, changed files, tests). Ten very different agents then return comparable, reviewable artifacts. That's what makes side-by-side runs and the Usage page possible. - Server-only integration, per the Skill's rules.
- The browser sends a harness key (
"qwen"); the server maps it to aharness_idand validates the model againstGET /v1/harnesses/{id}/models. - The key, harness ids, session and response ids, and download URLs never reach the browser. We checked every payload for
chrn_,hsess,resp_anddownload_url.
- The browser sends a harness key (
- The stream is consumed server-side, never tied to the browser. We save
response.idandsession_idatresponse.createdand turn tool calls into sanitized steps fanned out over SSE. The task keeps running if the tab closes, and recovery polls instead of re-sending. - Cost comes from
spend_usd. Each turn's cost is the change in the session's cumulative spend. That one number powers the result card, the side-by-side Fastest/Cheapest badges, the Usage page, and budget enforcement. - Repos. The agent clones public repos inside the sandbox, which worked out of the box. For private repos, the server downloads the tarball with the user's GitHub token and uploads it with
POST /v1/files, so the agent never sees a token. That path is implemented, but we didn't exercise it live because there was no OAuth app during the hackathon. - Instructions as code.
harness/setups.jsonplusharness/instructions.mdare the source of truth.npm run hr:ensurecreates or reuses harnesses;npm run hr:syncrolls changes out with ETag/If-Match. We synced 3 times across 10 harnesses: 30 PUTs, 0 conflicts, every readback matched.
HarnessRouter features we used
| Feature | Endpoint(s) | Where in our code | Verified live |
|---|---|---|---|
| Discovery | GET /v1/uhp | build step | ✅ version and capabilities |
| Identity | GET /v1/me | scripts/hr-admin.mjs me | ✅ |
| Catalog | GET /v1/bases, GET /v1/harnesses/{id}/models | src/lib/server/catalog.ts | ✅ live model menus for 10 harnesses |
| Harness lifecycle | GET/POST /v1/harnesses, GET/PUT /v1/harnesses/{id} (ETag, If-Match), Idempotency-Key on create | scripts/hr-admin.mjs ensure / sync | ✅ 10 creates, 30 PUTs |
| Tasks (streaming) | POST /v1/responses with stream, user, model, metadata.harness_id, Idempotency-Key | src/lib/server/runner.ts | ✅ 21 tasks on 10 harnesses |
| Follow-ups | previous_response_id + metadata.session_id | src/lib/server/sessions.ts | ✅ 2 follow-ups, one with a model switch |
| Recovery | GET /v1/responses/{id} polling | runner.ts recoverOnce | ✅ after a real mid-task restart |
| Cancel | POST /v1/responses/{id}/cancel | runner.ts, hr-admin.mjs cancel-running | ✅ 3 tasks, instantly |
| Session files | GET /v1/sessions/{id}/files, GET /v1/containers/{sid}/files/{fid}/content | runner.ts, download route | ✅ patch, summary and manifest for every task |
| Metering | GET /v1/sessions/{id} (spend_usd) | runner.ts, usage.ts | ✅ reconciles with GET /v1/sessions?harness= to the cent |
| Session listing | GET /v1/sessions?harness= |
What worked really well
- The Skill is excellent onboarding.
agents.md→ Skill → API reference was accurate to the live service: every shape we relied on matched. The Node adapter template saved hours, and its rules (server-only key,useron every task, never takeharness_idfrom the browser, consume the stream independently) are exactly the guardrails a product needs. We kept all of them. - One API, 29 harnesses. Going from 1 to 10 harnesses cost us zero integration work. It was literally a config list. That's the core of our pitch and it's HarnessRouter's doing.
- Model override per task works across bases, including cross-provider: Qwen Code ran
gpt-6-luna(by accident, in our cancelled run) andqwen3.8-flash; Claude Code ranclaude-haiku-5.5. - Streaming is clean. The first frame arrived about 2 s after the POST. Events follow the Responses-API style and
response.createdcarriessession_id, so we could persist immediately. - Durability primitives held up for real. Recovery by polling survived an actual server restart mid-task. Cancel was instant. ETag/If-Match updates never conflicted and always read back exactly.
- Sandboxes are practical. `gi