Apply to my task
arXiv:2610.13494 ★ 88 Oct 9, 2026

HMA (Humanize MLE Agents): two agents take turns with a clean context and a shared folder

Key result

Finding: the longer an agent stays in one session, the shorter and lazier its responses get. By hours 3–5 they are 30–45% shorter than in the first two hours. The HMA method keeps six hours of agent work from going down the drain. You take two models from different providers, such as Claude and GPT, and they finish one task in turns. Each runs at most 5 experiments, the session is cut off, the context is wiped, and memory lives in a shared working folder. Over the same six hours, the pair beat the best solo agent and open systems that were given 2–4 times more time. The gain is moderate, a few percentage points, but it came without a single extra prompt.

01

TL;DR

HMA is a way of organizing the work, not a prompt. Two agents from different providers (say, Claude and GPT) take turns refining the same task in a shared working folder. Each one runs at most 5 experiments per session, then the session is cut off and the context is reset. The next agent starts with a fresh head but sees everything in the folder. At the end, a third pass does a review: an agent that did not write the latest solution picks the best candidate from the archive.

The headline finding is about a weakness of the solo agent. The longer a single session runs, the shorter its responses get: by hours 3–5 they are 30–45% shorter than in the first two hours. Progress slows down too, and the agent seems to think less and less. The second finding: custom harnesses (your own instructions, skills, accumulated know-how) age along with the model. On a weaker model they helped; on a stronger one the developer's native harness beat them by a wide margin.

The authors' fix doesn't make the agent more complex, it changes how the work is organized. The agents are not tuned: each works in its own native harness, with no extra prompts. They are alternated and their context is wiped often. Over the same six hours, such a pair clearly beat the best solo agent and outran open systems that were given 2–4 times more time.

Want this for your own case? Apply this study to your task: AI adapts its method to what you are working on and writes the prompt.

02

Method Blueprint

STEP 1: Shared working folder (code, results, best candidates) → persists between sessions
STEP 2: Agent A runs ≤ k experiments (k ≤ 5) → the session is cut off
STEP 3: Context is reset → agent B opens the folder, continues for ≤ k experiments
STEP 4: Repeat A ↔ B until time runs out (reserve the last ~4% of the time)
STEP 5: Final review: an agent that did not write the latest solution picks the best candidate from the archive

Each session is a separate agent run. The handoff happens only through files, not through conversation memory.

03

Example in Practice

Task: an Amazon seller wants a better weekly sales forecast for 300 SKUs. They have two years of sales data, a baseline model script, and a metric: mean absolute error (MAE) on the held-out last 8 weeks. They have two subscriptions: Claude Code and Codex CLI. Instead of one marathon session, they run the two in turns in the same folder.

The paper has no ready-made prompts: the authors deliberately added no instructions. Below is my implementation of the mechanics, not a quote from the paper.

Prompt (identical for both agents, every session is a brand-new chat):

<Role>
You are an analyst improving the weekly sales forecast for an Amazon seller.
You work in tandem with another AI agent: you take turns refining the same folder.
</Role>

<Task>
Goal: reduce MAE on the held-out last 8 weeks (file data/sales.csv).
Baseline model: baseline.py. The metric is computed by the evaluate.py script.
Use training data only from before the held-out period.
</Task>

<SessionRules>
1. Start by reading WORKLOG.md and the experiments/ folder. That is your entire memory.
2. Run no more than 5 experiments. Experiment = one change + a run of evaluate.py + a logged result.
3. After each experiment, add a line to WORKLOG.md: what you changed, MAE, conclusion.
4. If the result beats the best so far, save it as best/ and note it in WORKLOG.md.
5. After the 5th experiment, write a HANDOFF block in WORKLOG.md: what worked, what didn't, which ideas haven't been tried. Then stop.
</SessionRules>

Final review prompt (for the agent that did not run the last session):

You are a reviewer. Read WORKLOG.md and experiments/. Pick the single best candidate
to submit. Check that there is no data leakage from the held-out 8 weeks and that the result
reproduces when you run evaluate.py. If the best candidate per the log fails the
check, pick the next one. At the end, state your choice and the reason.

Result: each session leaves up to 5 entries in WORKLOG.md plus a handoff block for the next agent. Starting from a clean context, the agent reads the log and picks up ideas its partner hasn't tried. After 6–10 handoffs, the best candidate sits in best/. The final agent confirms the pick or replaces it if it finds data leakage or a result that doesn't reproduce.

04

Why It Works

The weakness. In a long session, context piles up: old dead ends, long logs, early hypotheses. According to the authors, the agent's responses shrink noticeably by hours 3–5, and fresh ideas dry up. On top of that, a single agent hits the ceiling of its own habits. The one who found a good candidate isn't necessarily the best at polishing it.

The strength. An agent with a clean context comes back to the task fresh and "thinks" just as much in its first responses as at the very start. Files on disk hold state better than any context. Different models take different paths: one adds features, another fixes the validation. Handing over the result as a new starting point reveals what the first agent couldn't see. That's the authors' own explanation, not a separately tested fact.

Control knobs: - Session size k: the authors tuned it empirically, k ≤ 5. The first 5 experiments of a session deliver roughly 98% of all observed gains. Go lower for short tasks; for expensive experiments you can also go lower to pass the baton more often. - Agent pairs: different providers work best. Pairs of mismatched strength also improved results, and the Claude↔GPT combo won regardless of who started first. - Review at the end: a time reserve (15 minutes out of 6 hours in the paper). The reviewer must not be the author of the latest solution. - Native harness: don't pile your own mega-instructions on the agent. First check that it actually does worse without them.

05

Prompt Template

<Role>
You are a {specialist_role} improving {what_we_improve}.
You work in tandem with another AI agent: you take turns refining the same folder.
</Role>

<Task>
Goal: {measurable_goal_and_metric}.
How to check the result: {command_or_evaluation_method}.
Constraints: {what_not_to_do}.
</Task>

<SessionRules>
1. Start by reading {log_file} and the {experiments_folder} folder. That is your entire memory.
2. Run no more than {k} experiments. Experiment = one change + a measurement + a logged result.
3. After each experiment, add to {log_file}: what you changed, the result, the conclusion.
4. If the result beats the best so far, save it to {best_folder}.
5. After the last experiment, write a HANDOFF block: what worked, what didn't, which ideas haven't been tried. Then stop.
</SessionRules>

What to fill in: - {k} — 5 by default. - {measurable_goal_and_metric} — a number and how to get it: MAE, conversion rate, run time. - {log_file} — one shared file that both agents read.

For the finale, run a separate reviewer (the other agent) with the prompt: "pick the best candidate from the log, check reproducibility and that there's no leakage."

🚀 Quick start — paste into a chat:

Here is the HMA template (two agents alternating with a shared folder and context resets). Adapt it to my task: [your task]. 
Ask me questions to fill in the fields.

[paste the template above]

The LLM will ask how to measure success, what counts as one experiment, and where the shared state lives. Without a measurable metric and a shared log, the handoff between agents doesn't work. It will take the pattern from the template and adapt it to your task.

06

Limitations

⚠️ You need a measurable metric: the method was tested on tasks where an experiment's outcome is a number (ML competitions, code optimization). For writing, design, and strategy, where "better" can't be measured, the paper offers no evidence.

⚠️ You need two agents from different providers: that means two subscriptions or two API keys, plus manual or automated handoff between tools. In the paper, orchestration was handled by the ready-made Humanize framework (code available). The authors did not test manual alternation.

⚠️ The gain is moderate: the improvement over the best solo agent is a few percentage points. The final review corrected only about 9% of picks and added a handful of medals out of 450 runs.

⚠️ One task type and one hardware setup: the main results come from 75 Kaggle competitions with a GPU and a six-hour budget. The value k ≤ 5 was tuned on that same set. The kernel optimization case is a single task.

⚠️ Harness aging was measured narrowly: "harnesses go stale" was shown on one pair of model versions and 16 tasks. It's a strong signal, not a law.

⚠️ The slowdown was measured indirectly: "reasoning intensity" is response length. It declines along with the gains, but causality isn't proven.

⚠️ Some ablations aren't visible: the provided text is truncated, so the breakdown of individual method components (what the context reset itself contributes versus switching agents) can't be checked here.

07

How They Studied It

Researchers from Tsinghua, NVIDIA, MIT, and Zhejiang University used MLE-bench: 75 Kaggle competitions where an agent writes and runs ML solutions. Each agent got one A10 GPU and six hours. First they looked at what happens to solo agents. Across six configurations, response length dropped by 29.8–45.0% between hours 0–2 and hours 3–5. Then they compared three third-party custom harnesses (ScienceFlow, ML-Master 2.0, MLEvolve) on two versions of the same model. On the weaker version, the custom approaches sometimes beat the native harness. On the new version, the native harness earned 77.1% medals versus 37.5% to 68.8% for the custom ones, even though those were given 12–24 hours.

Then they assembled HMA: 5 model pairs, 6 configurations, k = 5, the final 15 minutes for review. The best pair (Opus 5 ↔ GPT-5.6-sol) earned 78.2% medals versus 72.4% for the best solo agent and 70.2% for the best open system. With the starting order reversed it got 73.3%, still above 72.4%. There was a gain in every one of the six configurations, averaging +6.4 points over the component agents. One more result: HMA retains 86.4% of its early-stage response length in the late stage, while solo agents retain 60.7%. The practical takeaway: rather than making the harness more elaborate, it pays to reset context often and bring in "fresh eyes."

08

Adaptations and Extrapolations

🔧 Technique: revisit your instructions when the model changes → less dead weight

The authors cite vendor recommendations: OpenAI advises rewriting AGENTS.md, skills, and prompts when upgrading the model; Anthropic advises removing instructions for checks that newer models do on their own. The practical move: after upgrading your agent, run a task without your CLAUDE.md and compare it to the version with it. If there's no difference, trim the file.

Extrapolation: a "clean chat" in everyday work. This is my own loose transfer of the idea, not a result from the paper.

We've been working on {task} for {N} iterations. Stop. Write me:
1. The current best version (in full).
2. What we tried that didn't work.
3. Three ideas we haven't tried yet.
I'll open a new chat and paste this in as the starting state.

Then open a new chat (ideally with a different model) and paste in this block along with the task. Same principle: state lives in text, not in a long conversation. The authors did not measure the effect in a regular chat.

09

Resources

  • Paper: Humanize MLE Agents: Multi-Agent Session Alternation Beyond Single-Agent Limits (Preprint)
  • Code: https://github.com/humanfia/hma
  • Authors: Changye Li, Zijian Zhang, Muheng Li, Yiduo Pang, Tingjun Wu, Menghan Li, Yitong Liu, Hongkai Guo, Mengchi Chen, Chenyu He, Kaisheng Ma, Wei Xu, Song Han, Sihao Liu, Ligeng Zhu
  • Organizations: Tsinghua University, NVIDIA, Zhejiang University, MIT
  • Benchmark: MLE-bench (Chan et al., 2025)

Research digest

Key result

Finding: the longer an agent stays in one session, the shorter and lazier its responses get. By hours 3–5 they are 30–45% shorter than in the first two hours. The HMA method keeps six hours of agent work from going down the drain. You take two models from different providers, such as Claude and GPT, and they finish one task in turns. Each runs at most 5 experiments, the session is cut off, the context is wiped, and memory lives in a shared working folder. Over the same six hours, the pair beat the best solo agent and open systems that were given 2–4 times more time. The gain is moderate, a few percentage points, but it came without a single extra prompt.

Principle

This is a way of organizing work, not a clever prompt. The agents aren't fine-tuned or loaded down with your own instructions. Each works in the developer's native harness. The process: shared folder → agent A runs up to 5 experiments and writes a handoff → context is reset → agent B reads the folder and continues → and around it goes. At the end, a reviewer who did not write the latest solution picks the best candidate. The handoff happens only through files. Think relay race, not marathon: each runner covers a short leg on fresh legs. The agent's memory is a log on disk, not the chat history.

Why it works

The cause is accumulated clutter. In a long session, old dead ends, long logs, and early hypotheses pile up. The model gets bogged down in them and starts thinking less. The authors measured this by response length. It falls along with the gains in results. They did not prove causality. The second reason: a single agent hits the ceiling of its own habits. Different models take different paths. One adds features, another fixes the validation. Handing off the result reveals what the first one couldn't see. The first 5 experiments of a session deliver about 98% of all gains, so there's no point staying in the same session longer. Files hold state more reliably than a conversation. One more finding: your own harnesses age along with the model. On a weaker model they helped. On a stronger one, the developer's native harness beat them by a wide margin. But that was measured on one pair of versions and 16 tasks. To be fair: the "fresh head" explanation is the authors' own take. The breakdown of what the reset contributes versus switching agents is cut off in the text.

When to apply

Machine learning, data analysis, code speedups → tasks where every experiment produces a number (error, run time, conversion), especially when a solo agent stalls after a couple of hours and keeps recycling the same ideas. NOT suitable for writing, design, or strategy, where "better" can't be measured. There's no evidence there. You need two subscriptions or two API keys. The authors didn't test manual alternation: in the paper, everything was run by the ready-made Humanize framework. The main results come from 75 Kaggle competitions with a six-hour budget.

Mini recipe

1. Set up a shared folder: data, a measurement script, `WORKLOG.md`, and the `experiments/` and `best/` folders. 2. Define the metric: one number and a command that computes it. Without this, the relay doesn't work. 3. Give both agents the same prompt: from the template below. Role, goal, session rules. 4. Session limit: no more than 5 experiments. For expensive experiments, go lower to pass the baton more often. 5. Every session is a brand-new chat: the agent reads the log and remembers nothing else. 6. Pass the baton: at the end of a session, the agent writes a HANDOFF block: what worked, what didn't, which ideas haven't been tried. The next leg goes to the other model. 7. Leave a time buffer: about 4% of the total budget, 15 minutes out of 6 hours in the paper. 8. Call in a reviewer: an agent that did not write the latest solution. It checks reproducibility and data leakage, then picks the best. Template for both agents: `You are a {specialist_role} improving {what_we_improve}. You work in tandem with another AI agent: you take turns refining the same folder.` `Goal: {measurable_goal_and_metric}. How to check the result: {measurement_command}. Constraints: {what_not_to_do}.` `1. Start by reading {log_file} and the {experiments_folder} folder. That is your entire memory. 2. Run no more than 5 experiments: one change, a measurement, a logged result. 3. After each experiment, add to the log: what you changed, the result, the conclusion. 4. If the result beats the best so far, save it to {best_folder}. 5. At the end, write a HANDOFF block: what worked, what didn't, which ideas haven't been tried. Then stop.`

Examples

Task: an Amazon seller is improving the weekly sales forecast for 300 SKUs. The metric is mean absolute forecast error (MAE) on the last 8 weeks. Below is my implementation of the mechanics; the paper has no ready-made prompts. [BAD]: `Improve the sales forecast, you have all the time in the world` — and one agent spends six hours in one chat. By hour five the responses are shorter and the ideas repeat. [GOOD]: A new chat in Claude Code: `Read WORKLOG.md and experiments/. Run no more than 5 experiments to reduce MAE on the held-out 8 weeks. After each one, write a line in WORKLOG.md. At the end, write a HANDOFF block and stop.` Then a new chat in Codex CLI with the same text. It starts with a fresh head, reads the log, and picks up ideas its partner hasn't tried. The finale, when time is nearly up: `You are a reviewer. Read WORKLOG.md and experiments/. Pick the single best candidate. Check that there is no data leakage from the held-out 8 weeks and that the result reproduces when you run evaluate.py. If the best one per the log fails the check, pick the next one. State your choice and the reason.` What you get: after 6–10 handoffs, the best candidate sits in `best/`. The reviewer confirms it or replaces it if it finds leakage. In the paper, the final review corrected only about 9% of picks, so don't expect miracles.

In plain words

Models get dumber from their own memory. When you run one AI agent for hours, its working context turns into a junk drawer: old logs, dead-end hypotheses, and forgotten errors pile up endlessly. Eventually the model simply burns out in the long context, its answers shrink to scraps, and its imagination dies. The HMA session alternation method fixes this radically: it forcibly wipes the agent's memory and leaves only the files on disk untouched.

It's like making an exhausted programmer debug code for the second straight day. They'll inevitably start going in circles, shuffling variables back and forth out of sheer fatigue. But send them home to sleep and sit a fresh pro from another team at the same monitor, and the newcomer spots the bug right away. The point is that a blank slate beats accumulated experience when that experience is hundreds of failed attempts.

The mechanics are simple: take two different models from competing vendors — say, Claude and GPT — and set them loose on the same working folder in turns. Hard rule: no more than 5 experiments per session, after which the context is ruthlessly reset. The new agent starts from zero, looks at the existing code with fresh eyes, and comes up with new ideas. The final pick of the best solution goes to an independent review — a model that didn't write the latest version of the code.

The method was tested on ML tasks like tuning sales forecasts, but the principle is universal. The setup fits complex software development, deep audits, or heavy data analysis perfectly. Anywhere a lone agent is guaranteed to hit the ceiling of its own habits, a pair of two alternating models breaks through the productivity plateau with no manual intervention.

Bottom line: stop feeding the same thread for hours and hoping for a miracle. Reset the context, switch architectures, and cap the number of steps. A long solo session today is a guaranteed token drain and a dazed model. Make two different models take turns checking each other's files, and they'll deliver a result that neither model could pull off alone.

AI lab assistant

Apply this study to your task

Describe what you're working on. AI takes the method and the measured results from this paper and adapts them to your case, or writes a ready prompt built on them.

Based on HMA (Humanize MLE Agents): two agents take turns with a clean context and a shared folder arXiv:2610.13494

Sign in to apply this study New accounts get 50 free credits.