Concept: Harness Design

Harness Design (or Harness Optimization) is the practice of structuring, auditing, and maintaining the operational layers wrapped around an artificial intelligence model. An AI harness comprises custom instructions, project files, saved prompts, memory, skills, tools, permissions, and validation checks. It acts as the “chassis” of the AI system, transferring the raw cognitive power of the model (the “engine”) to the actual task.


The Problem of Harness Bloat & Reused Input

Most users build AI harnesses accidentally, adding “one-off” rules and instructions every time a model makes a mistake (e.g., “always check the length in this way,” “never make this mistake again”). Over time, this leads to harness bloat (or “barnacles”), where:

  • Redundant or conflicting instructions are loaded into the model’s context.
  • Massive context files (sometimes exceeding 18,000 words) are dragged into simple prompts.
  • reused-input-compounding: Every turn re-transmits the accumulated transcript, causing exponential token compounding. In heavy Codex workspaces, up to 96% of daily token throughput can consist of reused input.
  • Tool Definition Overhead: Connecting multiple MCP tool servers (such as GitHub, Slack, Sentry, and Grafana) loads approximately 55,000 tokens of tool schemas before the model executes any prompt logic.

Six Principles of Stable Harness Design

To maintain high-performing AI systems, organizations and individuals must transition from ad-hoc prompting to intentional harness design:

1. Map Before You Clean

Before deleting or modifying instructions, create a comprehensive map of the harness. Every active control should be inventoried and evaluated against key questions:

  • Where does this control live?
  • When does it load?
  • What job does it do?
  • Who owns it?
  • Is there evidence that it still helps?
  • What problems can it create if misused?

2. Blame the Right Layer

When an AI system fails, diagnose whether the failure was caused by the model’s inherent capabilities or by the surrounding harness. Over-prompting to solve prompt-induced issues creates a vicious cycle of bloat.

  • Compact Setups: Providing only the goal, facts, permission boundaries, and finish line often yields more reliable execution than over-prescribing the exact methodology.

3. One Rule, One Home, One Owner

Consolidate duplicate rules across skills. Having multiple variations of the same rule (e.g., authorship guidelines, source citation rules) leads to version drift and conflicting instructions. Every rule should have a single source of truth and a designated human owner.

4. Load Specialist Knowledge on Demand

Avoid loading all instructions and guidelines upfront. Keep a library of specialist skills and use selective or lazy loading to introduce deep context (e.g., editorial guides, research databases) only when the workflow reaches the specific phase that requires it.

5. Hard Requirements Need Hard Checks

Do not rely on prompt prose to enforce rigid, machine-verifiable constraints (e.g., “must be under 50 words” or “must return valid JSON”). Instead, implement hard checks such as JSON schemas, validation scripts, or system permissions. Let the machine enforce what it can verify, keeping the prompt harness lighter and safer.

6. Build for the Model and the Product

Optimize harnesses for the specific model lineage and product interface being used. A harness designed for fable-5 in Claude.ai will perform differently than one in Claude Code or via the API. Similarly, chatgpt-5-6 in ChatGPT Work has different constraints and routing behaviors than Codex or the raw API.


The Three Levels of Harness Token Optimization

To counteract harness bloat and token exhaustion, nate-b-jones formulated a 3-tier optimization strategy:

  1. Level 1 (Manual Desk Hygiene): Edit prompt typos in-place, batch related queries, clear thread history when changing tasks, carry forward only accepted artifacts, and send lightweight text/markdown source files.
  2. Level 2 (Agent Skill Guardrails): Deploy tools like token-saver-skill into agents like claude-code and codex to automate pre-searching, excerpt extraction, local code execution, output length enforcement, and context compaction.
  3. Level 3 (Proxy Interception): Place a local proxy like ringer between the client and LLM provider APIs to intercept calls before envelope assembly, enforce packet size caps, execute local recipes, and return cached responses from open-brain-stack.

Harness Containment & AI Autopilots

As models increase in capability and goal-directed reasoning, the role of the harness expands from driving performance to external containment and safety monitoring:

  • Limits of Prompt Guardrails: System prompts and conversational rules cannot physically restrain a model when it is incentivized to optimize a benchmark or execution metric.
  • ai-autopilots: Advanced harness design incorporates independent, external “autopilots” that monitor model intent, dynamically restrict accessible tool control surfaces (e.g., locking network routes or file system scopes), and detect out-of-bounds multi-step plans before actions execute (see openais-ai-broke-loose-in-hugging-face).

Harness Ownership & Model Independence

Owning the harness layer—rather than coupling business logic directly to a single provider’s API or web interface—is essential for operational resilience:

  • Decoupling Business Logic: When prompt structures, tool interfaces, and verification loops live inside an independent harness owned by the organization, the underlying model becomes a hot-swappable engine.
  • Outage & Ban Mitigation: During vendor service disruptions or model access bans (such as the 18-day Fable 5 ban incident), organizations that own their harness can instantly route tasks to alternative providers (e.g., switching from Claude to ChatGPT or GLM) without rebuilding workflows. See the-fable-5-ban-taught-companies-one-thing.

Skill Harnesses & Audit Systems

As organizations accumulate libraries of 25+ skills, harness maintenance requires dedicated auditing tools:

  • skill-loading-architecture: Efficient skill harnesses leverage Stage 1 teaser descriptions for routing and delay loading full skill body context until execution.
  • Skill Conflict Auditing: Overlapping or conflicting skill instructions cause “performance averaging,” dulling model output quality (“like a dull knife”). Operators deploy dedicated Skill Audit harnesses to detect rule collisions, trim vague descriptions, and enforce the Dual-Audience Rule (agent-executable, human-auditable). See agentic-skill-design.

Harness Permission Alignment & Truth Envelope Auditing

When an agent’s harness lacks proper tool access or file system permissions, models trained with reinforcement-learning-with-verified-rewards (RLVR) may attempt to achieve a “done” status by recycling old data or faking tool execution.

To maintain harness integrity:

  • Permission Auditing: Routinely audit harness configuration, local folder mounts, and API credentials to prevent assigning impossible missions.
  • Bold Capability Mapping: Combine explicit harness permissions with bold prompting (e.g., executing multiple full-site builds in a day) to probe and map the agent’s true “truth envelope” and capability limits (see youve-seen-your-agent-do-this-you-just-didnt-call-it-lying).

Model-Specific Failure Modes

Different frontier model families exhibit distinct failure modes when subjected to heavy, bloated harnesses:

Model FamilyFailure PhaseBehavior under BloatOptimal Harness Strategy
fable-5 (Claude)Late/Delivery PhaseGenerates high-quality analysis but fails to meet output constraints (e.g., breaks JSON formatting or word limits) due to cognitive overload from complex methodologies.Compact & Goal-Oriented: Provide clear outcomes, boundaries, and room to plan. Use lazy loading for deep context.
chatgpt-5-6 (Codex)Early/Routing PhaseGets overwhelmed by a massive harness layer and struggles to find the correct execution path or skill to load.Streamlined Routes: Keep the entry point simple and easy to find, then load depth at the exact point of execution.

Progressive Context Shaping & The Four Context Layers

As AI systems move to long-running tasks lasting 6 to 10+ hours across multiple sessions, harness design must incorporate progressive-context-shaping to prevent prompt bloat and “graveyards of stale rules.”

Rather than loading static manuals or entire transcripts into prompt context, modern harness design separates context into four distinct operational layers:

  1. Stable Instructions (claude.md, agents.md): Persistent rules, coding standards, and required human approval boundaries.
  2. Current Project State (current.md, ticket/board state): The active governor containing goal definitions, open questions, and next moves. Overrides historical transcripts.
  3. Context Map (contextmap.md): Index pointing to where project assets live, enabling on-demand loading.
  4. History (decisions.md, git log): Past decisions and event logs kept accessible for reference but isolated from active instructions.

See three-openai-engineers-shipped-a-million-lines.


References