NelsonAuthor
- Building
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_usdto 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 topTimeline
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.mdIt points to the Skill in HarnessRouter/plugins(v0.3.0-dev.2). We readSKILL.mdand 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/uhplists2026-09-28(the Skill's verified version) and reportsmemories: false.GET /v1/menames the Default Workspace.GET /v1/baseslists 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-Keyon 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-taskmodeloverride) cloneddevelopit/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 addedmkdir -p outto the instructions and rolled it to all 10 harnesses: GET with ETag → full PUT withIf-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 aonce()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/uhpbuild step ✅ version and capabilities Identity GET /v1/mescripts/hr-admin.mjs me✅ Catalog GET /v1/bases,GET /v1/harnesses/{id}/modelssrc/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-Keyon createscripts/hr-admin.mjs ensure / sync✅ 10 creates, 30 PUTs Tasks (streaming) POST /v1/responseswithstream,user,model,metadata.harness_id,Idempotency-Keysrc/lib/server/runner.ts✅ 21 tasks on 10 harnesses Follow-ups previous_response_id+metadata.session_idsrc/lib/server/sessions.ts✅ 2 follow-ups, one with a model switch Recovery GET /v1/responses/{id}pollingrunner.tsrecoverOnce✅ after a real mid-task restart Cancel POST /v1/responses/{id}/cancelrunner.ts,hr-admin.mjs cancel-running✅ 3 tasks, instantly Session files GET /v1/sessions/{id}/files,GET /v1/containers/{sid}/files/{fid}/contentrunner.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 centSession listing GET /v1/sessions?harness=What worked really well
- One HarnessRouter harness per agent base. A harness's