<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/8N0o1aVez" -->

---
title: The Missing Cent: A Beginner’s Guide to Harness Engineering.
description: Harness engineering means building the rules, tests and checks around an AI coding agent so it produces reliable work every time, not just once. An agent...
canonical: https://daily.dev/posts/the-missing-cent-a-beginner-s-guide-to-harness-engineering--8n0o1avez
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: The Missing Cent: A Beginner’s Guide to Harness Engineering. | daily.dev
og:description: Harness engineering means building the rules, tests and checks around an AI coding agent so it produces reliable work every time, not just once. An agent...
og:url: https://daily.dev/posts/the-missing-cent-a-beginner-s-guide-to-harness-engineering--8n0o1avez
og:image: https://api.daily.dev/og/posts/8N0o1aVez.png
og:image:alt: The Missing Cent: A Beginner’s Guide to Harness Engineering.
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# The Missing Cent: A Beginner’s Guide to Harness Engineering.

**[Medium](https://daily.dev/sources/medium_js)** · 12 min read · 7 upvotes · 1 comments

## Summary

Harness engineering means building the rules, tests and checks around an AI coding agent so it produces reliable work every time, not just once. An agent equals model plus harness: you can't change the model, but you can change everything around it. The post demonstrates this with a Python bill-splitting bug where rounding floats drops a cent ($99.99 instead of $100). It fixes the bug by storing money as whole cents, adding a pytest test as a 'sensor' and an AGENTS.md rule as a 'guide'. It cites Mitchell Hashimoto, OpenAI, and Birgitta Böckeler as sources for the term, which became popular in early 2026.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://medium.com/@ssaigavaskar/the-missing-cent-a-beginners-guide-to-harness-engineering-d003f92a706a>

## Questions this post answers

### What does 'harness engineering' mean when working with AI coding agents?

Harness engineering is designing the environment around an AI model, such as rules, tests, checks, docs and reviewers, so the agent produces reliable work repeatedly rather than by luck once. The shorthand is 'Agent = Model + Harness': you can't change the model itself, but you can change instruction files (AGENTS.md), tests, linters, review agents, and cleanup jobs around it.

_Developers setting up AI agents for real projects can track harness patterns and guides on daily.dev._

### What is the difference between a guide and a sensor in AI agent harness design?

A guide steers the agent before it acts, like an AGENTS.md rule file describing project conventions (similar to a recipe binder). A sensor checks the work after it acts, like an automated test that fails when output is wrong (similar to a taster checking a dish). Guides alone are insufficient since agents don't always follow written rules, and sensors alone waste time fixing mistakes after the fact, so both are needed together.

_Anyone deciding how to structure AI agent workflows can compare guide and sensor patterns on daily.dev._

### Why does rounding each person's share separately when splitting a bill in Python produce an incorrect total?

Rounding each share to two decimal places independently can lose a fraction of a cent per person, so summing the rounded shares no longer equals the original total, for example $100 split 3 ways rounds to $33.33 each, totaling $99.99 instead of $100. The fix used in real payment systems is to store money as whole cents (integers) instead of floats, then use divmod to distribute any leftover cent to specific people so the total always matches exactly.

_Developers debugging money-splitting logic can find exact-cent allocation patterns like this on daily.dev._

## Community discussion

Top comments from developers on daily.dev.

**@kartiknvj** · 0 upvotes

> $99.99 is a good first example, everyone gets it instantly. Your test only checks split_bill(10000, 3), though, and an agent chasing a green run could special-case that one input. I'd loop the same assert over a range of totals and group sizes, so the sensor enforces the every-cent rule from your [AGENTS.md](http://AGENTS.md) for any bill.

## Similar posts on daily.dev

- [The State Of AI Harness Engineering 2026](https://daily.dev/posts/the-state-of-ai-harness-engineering-2026-z2cv9sfcz) · marmelab · 11 upvotes · 0 comments
- [Harness Engineering](https://daily.dev/posts/harness-engineering-l1sahcwor) · Martin Fowler · 4 upvotes · 0 comments
- [Harness Engineering 101: The LLM is the brain, the harness is the body](https://daily.dev/posts/harness-engineering-101-the-llm-is-the-brain-the-harness-is-the-body-gmdrggzuw) · Hacker News · 51 upvotes · 3 comments

---

Tags: [#python](https://daily.dev/tags/python), [#ai-agents](https://daily.dev/tags/ai-agents)

[View this post on daily.dev](https://daily.dev/posts/the-missing-cent-a-beginner-s-guide-to-harness-engineering--8n0o1avez)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"The Missing Cent: A Beginner’s Guide to Harness Engineering.","url":"https://daily.dev/posts/the-missing-cent-a-beginner-s-guide-to-harness-engineering--8n0o1avez","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/the-missing-cent-a-beginner-s-guide-to-harness-engineering--8n0o1avez"},"datePublished":"2026-11-02T08:15:01.023Z","dateModified":"2026-11-02T08:19:11.108Z","description":"Harness engineering means building the rules, tests and checks around an AI coding agent so it produces reliable work every time, not just once. An agent...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/709c57c690ee9267bc701bb88e00ae0b?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/709c57c690ee9267bc701bb88e00ae0b?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Medium","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Medium","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/medium","url":"https://daily.dev/sources/medium_js"},"commentCount":1,"discussionUrl":"https://daily.dev/posts/the-missing-cent-a-beginner-s-guide-to-harness-engineering--8n0o1avez","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":7},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":1}],"keywords":"python,ai-agents","timeRequired":"PT12M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Medium","item":"https://daily.dev/sources/medium_js"},{"@type":"ListItem","position":3,"name":"The Missing Cent: A Beginner’s Guide to Harness Engineering."}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/the-missing-cent-a-beginner-s-guide-to-harness-engineering--8n0o1avez","comment":[{"@type":"Comment","text":"$99.99 is a good first example, everyone gets it instantly. Your test only checks split_bill(10000, 3), though, and an agent chasing a green run could special-case that one input. I’d loop the same assert over a range of totals and group sizes, so the sensor enforces the every-cent rule from your AGENTS.md for any bill.","datePublished":"2026-11-02T13:38:34.670Z","url":"https://daily.dev/posts/8N0o1aVez#c-PNKmkRytc","author":{"@type":"Person","name":"kartik-nvjk","url":"https://daily.dev/kartiknvj","image":"https://media.daily.dev/image/upload/s--3gGgsVCw--/f_auto/v1781456774/avatars/avatar_TvTVeiMdkRCqWUDullFmy?_a=BAMAMiWQ0"}}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/the-missing-cent-a-beginner-s-guide-to-harness-engineering--8n0o1avez#faq","mainEntity":[{"@type":"Question","name":"What does 'harness engineering' mean when working with AI coding agents?","acceptedAnswer":{"@type":"Answer","text":"Harness engineering is designing the environment around an AI model, such as rules, tests, checks, docs and reviewers, so the agent produces reliable work repeatedly rather than by luck once. The shorthand is 'Agent = Model + Harness': you can't change the model itself, but you can change instruction files (AGENTS.md), tests, linters, review agents, and cleanup jobs around it. Developers setting up AI agents for real projects can track harness patterns and guides on daily.dev."}},{"@type":"Question","name":"What is the difference between a guide and a sensor in AI agent harness design?","acceptedAnswer":{"@type":"Answer","text":"A guide steers the agent before it acts, like an AGENTS.md rule file describing project conventions (similar to a recipe binder). A sensor checks the work after it acts, like an automated test that fails when output is wrong (similar to a taster checking a dish). Guides alone are insufficient since agents don't always follow written rules, and sensors alone waste time fixing mistakes after the fact, so both are needed together. Anyone deciding how to structure AI agent workflows can compare guide and sensor patterns on daily.dev."}},{"@type":"Question","name":"Why does rounding each person's share separately when splitting a bill in Python produce an incorrect total?","acceptedAnswer":{"@type":"Answer","text":"Rounding each share to two decimal places independently can lose a fraction of a cent per person, so summing the rounded shares no longer equals the original total, for example $100 split 3 ways rounds to $33.33 each, totaling $99.99 instead of $100. The fix used in real payment systems is to store money as whole cents (integers) instead of floats, then use divmod to distribute any leftover cent to specific people so the total always matches exactly. Developers debugging money-splitting logic can find exact-cent allocation patterns like this on daily.dev."}}]}
```

