Building an Agent Harness From Scratch: GPT-3.5 Turbo Goes From False 'Done' to Real One, Prompt Untouched
tejaskumarlol · reddit · 2026-09-14
The full write-up (with code and links) behind the AI Engineer Europe talk: GPT-3.5 Turbo plus Playwright tools, tasked with upvoting the top Hacker News story, with the prompt identical across all versions — only the harness evolves:
- v0 bare loop: hits the login wall, still reports success.
- v1 guardrails: code-enforced iteration/message limits and naive context trimming.
- v2 verification: a deterministic function reads the tool call history to pass/fail each attempt, up to 3 retries — now it fails honestly.
- v3 harness-side login: the harness detects the login page and injects credentials the model never sees; done in 6 iterations.
Working definition: an agent harness is everything around the model that gives it grounding in reality — tool registry, context management, guardrails, the loop, and the verify step. Full blog post and per-step branches included; term sources: Mitchell Hashimoto's "harness engineering" and LangChain's anatomy of an agent harness.
More from coding & agent
- The key coding skill now: directing agents well — and knowing when not to trust them — YvesMulkers · 2026-09-14
- chrome-mcp fills a 30-field form in real Chrome: 148 logged, auditable actions — SYEDNIICK · 2026-09-14
- Building a Local Router With Smart Fallbacks to Stop Rate Limits Killing Your AI Agents — phanue1 · 2026-09-14
- A SQLite/S3 filesystem with per-directory OpenPolicyAgent scripts for AI agents — tobowers · 2026-09-14
- Processing SIEM tickets with AI: workflow tool or pure agent? — Melodic_Tooth6885 · 2026-09-14
- Same 3D simulation prompt: Agnes 2.5 Pro Beta costs ~$0.20 vs ~$1.70 on GPT-5.6 Sol — iamaliveix · 2026-09-14