Beyond Prompt Engineering: Harness Engineering for Self-Improving AI
Most people imagine the future of AI like this: Train a bigger model → get a smarter AI. But that’s becoming an outdated way of thinking.
Beyond Prompt Engineering: Harness Engineering for Self-Improving AI
Most people imagine the future of AI like this: Train a bigger model → get a smarter AI. But that’s becoming an outdated way of thinking.
The biggest breakthroughs over the next few years may not come from larger neural networks.
They may come from something sitting around the model.
It’s called a harness.
And surprisingly, it might become the first real form of recursive self-improvement (RSI).

The Original Idea of Recursive Self-Improvement
Back in 1965, mathematician I. J. Good introduced the idea of an ultraintelligent machine.
His argument was simple.
Imagine a machine that’s smart enough to design an even smarter machine.
That smarter machine designs an even better one.
Then another.
Then another.
The cycle continues.
AI v1
↓
Build AI v2
↓
Build AI v3
↓
Build AI v4
↓
...
Instead of humans making every improvement, AI begins improving the process that creates AI.
Years later, Eliezer Yudkowsky called this feedback loop recursive self-improvement.
Originally, many people imagined this meant an AI literally rewriting its own neural network weights.
Today, researchers think something more practical is happening first.
Instead of rewriting its brain…
AI is learning to improve its tools, workflows, memory, and runtime systems.
And that’s already happening.
The Model Isn’t Everything
Imagine hiring two software engineers.
Both have identical programming knowledge.
One only has Notepad.
The other has:
- VS Code
- Git
- Docker
- Terminal
- Debugger
- Documentation
- Internet
- Unit tests
- CI/CD
Who finishes first?
Obviously the second one.
The difference isn’t intelligence.
It’s the environment.
Modern coding agents work exactly the same way.
Claude Code. Codex. Cursor. OpenCode.
They’re all powered by language models…
…but what makes them impressive is the software wrapped around them.
That wrapper is called the harness.
What Is a Harness?
A harness is everything surrounding the language model.
Instead of only asking the model one question…
the harness manages an entire workflow.
User Task
│
▼
+----------------+
| Harness |
+----------------+
│ │ │ │
▼ ▼ ▼ ▼
Memory Tools Files Tests
│
▼
LLM
The harness decides:
- which tools to call
- when to search the web
- when to execute code
- when to edit files
- when to retry
- how to store memory
- how to evaluate results
The LLM becomes just one component.
The harness becomes the operating system.
Think of It Like an Operating System
A CPU isn’t very useful without Linux or Windows.
Likewise…
A frontier language model isn’t nearly as useful without a runtime around it.
The harness hides complexity while exposing a simple interface.
User
│
▼
Harness
│
├── File system
├── Terminal
├── Git
├── Browser
├── Search
├── Memory
├── Subagents
└── LLM
Instead of prompting once…
the system runs an entire software pipeline.
Pattern 1: Workflow Automation
The first ingredient is giving AI a repeatable workflow.
Instead of:
Question
↓
Answer
Modern agents behave more like this:
while not task_finished:
plan()
execute()
observe()
evaluate()
improve()
Notice something.
The model isn’t simply generating text anymore.
It’s repeatedly checking whether it’s correct.
This feedback loop is incredibly powerful.
Karpathy’s AutoResearch project is a great example.
Instead of asking an AI to “write a research paper”…
the workflow keeps refining the work until it satisfies the goal.
Pattern 2: The File System Becomes Memory
Many people think AI memory means storing everything inside the context window.
That’s actually a terrible idea.
Imagine writing an entire operating system inside one ChatGPT prompt.
Impossible.
Instead…
agents save information into files.
project/
notes.md
experiments/
logs/
errors/
papers/
todo.md
results.json
The model only loads what’s relevant.
Example:
grep "accuracy" logs/*
Instead of remembering everything…
the AI remembers where things are.
That’s much closer to how humans work.
Pattern 3: Parallel Subagents
Humans delegate work.
AI can too.
Instead of one gigantic conversation…
the harness creates multiple workers.
Main Agent
│
├── Research Agent
├── Coding Agent
├── Testing Agent
└── Documentation Agent
In pseudocode:
agents = [
spawn("research"),
spawn("coding"),
spawn("testing")
]
wait(agents)
merge_results()
Each agent works independently.
The parent agent combines everything later.
This dramatically increases productivity.
Coding Agents Already Follow This Design
If you’ve used Claude Code or Codex…
you’ve already interacted with a harness.
Most coding agents repeatedly perform operations like:
read_file()
edit_file()
run_tests()
check_git()
execute_terminal()
search_docs()
repeat()
Notice something interesting.
The model isn’t doing magic.
It’s just orchestrating software tools.
That’s why coding agents feel so capable.
Context Engineering Is Replacing Prompt Engineering
Prompt engineering used to dominate AI discussions.
Now researchers talk about context engineering.
There’s a huge difference.
Old approach:
Very long prompt
↓
LLM
New approach:
Memory
↓
Relevant Files
↓
Search Results
↓
Task History
↓
LLM
Instead of stuffing everything into one prompt…
the harness builds context dynamically.
Only the information needed for the current decision gets included.
This scales much better.
Agentic Context Engineering (ACE)
One interesting research direction is treating context like a living notebook.
Instead of rewriting one enormous prompt…
ACE stores knowledge as structured bullet points.
Example:
ID: BUG_14
Description:
Database timeout happens when
pool size < 8
Another note:
ID: PERF_2
Description:
Cache API responses for 30 minutes.
The system keeps updating this notebook after every rollout.
Instead of growing one giant prompt…
it grows organized knowledge.
Meta Context Engineering Goes One Step Further
Now imagine AI improving how context itself is managed.
Instead of humans deciding memory rules…
the AI starts inventing better memory systems.
Simplified idea:
while True:
build_context()
evaluate()
improve_context_strategy()
The optimization target is no longer the answer.
It’s the machinery producing the answer.
The Harness Starts Improving Itself
Now things become really interesting.
Imagine the harness itself is just code.
Like this:
def agent():
search()
plan()
execute()
evaluate()
Since it’s code…
an AI coding agent can rewrite it.
Harness v1
↓
Evaluate
↓
Improve Code
↓
Harness v2
↓
Evaluate Again
↓
Harness v3
This is one of the closest real-world examples of recursive self-improvement.
Workflow Search Instead of Workflow Design
Researchers have also started asking an important question.
Instead of manually designing workflows…
why not let AI invent them?
One system generates new workflow ideas.
Another tests them.
The best survive.
Generate
↓
Evaluate
↓
Keep Best
↓
Generate Again
That’s basically evolution.
Except the organisms are AI workflows.
Self-Harness
One of the most fascinating recent ideas is called Self-Harness.
Instead of blindly rewriting itself…
the system follows a disciplined loop.
Step 1:
Find recurring failures.
Timeout
Missing file
Wrong API
Bad planning
Step 2:
Propose a tiny improvement.
Before:
Always search web.
After:
Search only if confidence < 70%.
Step 3:
Run regression tests.
If everything improves…
keep the change.
Otherwise…
discard it.
This is exactly how experienced software engineers improve production systems.
The Biggest Lesson
One surprising discovery appears repeatedly across research.
Smarter models improve harnesses better.
Smaller models often make things worse.
In other words…
recursive self-improvement isn’t magic.
The base intelligence still matters.
A mediocre engineer rarely designs an extraordinary engineering process.
The same applies to AI.
Why This Matters
Many people still think AI progress means:
Train a larger transformer.
But today’s frontier labs are optimizing something much broader.
They’re improving:
- memory
- workflows
- context
- evaluation
- orchestration
- tool use
- coding environments
- runtime systems
- autonomous experimentation
The model is only one piece of the puzzle.
Increasingly…
the harness is becoming the real product.
Final Thoughts
We’re probably not going to wake up tomorrow and see an AI rewriting its own neural network.
But we may see something even more practical.
AI improving:
- its workflows
- its coding environment
- its memory system
- its evaluation pipeline
- its orchestration logic
- the software that surrounds the model
That’s recursive self-improvement in a form that’s already emerging.
The fascinating part is that harnesses are just software.
And software can be rewritten.
Once AI becomes good enough at writing software…
it can begin improving the very system that allows it to think.
That may be the first truly scalable path toward recursive self-improvement — not by changing the brain directly, but by continually upgrading everything around it.
메타데이터
- post_id
- 99fc9a2e19b7
- slug
- beyond-prompt-engineering-harness-engineering-for-self-improving-ai-99fc9a2e19b7
- url
- https://medium.com/coding-nexus/beyond-prompt-engineering-harness-engineering-for-self-improving-ai-99fc9a2e19b7
- canonical_url
- https://medium.com/coding-nexus/beyond-prompt-engineering-harness-engineering-for-self-improving-ai-99fc9a2e19b7
- author_url
- https://medium.com/@tarangtattva2
- status
- ok
- fetched_at
- 2026-07-11 02:02:54