senn-techsenn-tech
AI & Development
AI & Development2026-10-12· By Franz Senn

Fork-and-Flush: AI agents work better when you wipe the chat history

Same task, same agent, eight runs: final scores landed between 68.3 and 100.0, and extra compute did not close the gap. This observation opens the arXiv paper Fork-and-Flush, submitted on 5 October 2026. The Decoder covered it on 12 October and assigns the authors to Microsoft Research; the arXiv page lists no affiliations. The remedy sounds backwards at first: erase the agent's memory, but keep its work.

OpenAI logo
The agent models, per The Decoder, are GPT-5.6-terra and GPT-5.5, run through the GitHub Copilot CLI. Small Qwen3.5 models were used for a separate variance study. (Quelle: OpenAI / Wikimedia, CC BY-SA 4.0)

The problem: idea basins

Autoresearch agents work on one task for hours to days, writing code, measuring and improving. The authors see single runs getting stuck in a small region of the solution space and call these regions "idea basins". This happens even when the agent compresses its history along the way. A branch that keeps its parent's context tends, per the paper, to re-enter the same basin because earlier reasoning steers its next steps.

The method

Fork-and-Flush step by stepForkK parallel branchesInheritcode, files, resultsFlushchat history deletedWorkfresh conversationSelectbest branch continues
The selection criterion is a score defined by the task. Without one there is nothing to pick the best branch by. (Quelle: arXiv:2610.07447)

Code and files survive the flush, arguments and intermediate reasoning do not. The new branch sees what was built, but not why the old line of thought led there, so it can take a different route.

The numbers

13 tasks with runtimes from a few hours to over 100 hours, among them polyomino packing, job-shop scheduling, cryptanalysis, compressing a CIFAR classifier and optimizing a VLIW kernel. Scores are normalized per task to 0 to 1 and averaged at equal compute budget.

Normalized mean score over 13 tasksSingle run0.47 · spread 0.26Best-of-40.54 · spread 0.21Fork-and-Flush0.78 · spread 0.1601
Fork-and-Flush had the highest mean on 12 of 13 tasks. The Decoder does not explain the normalization or the compute cost of the branches. (Quelle: The Decoder, based on arXiv:2610.07447)

Flushing alone, without branching, raised the mean from 0.45 to 0.55 on 11 tasks, about 22 percent. The spread between runs, however, only dropped with the full method, from 0.26 for a single run to 0.16 with Fork-and-Flush. In a side study on MAX-3-SAT with Qwen3.5 at 4, 9 and 27 billion parameters, variance followed an inverted U with its peak on tasks at the edge of what a model can do. The authors expect the spread to remain with stronger models and just move to harder problems.

What the numbers do not show

The blog explainx.ai says it read only the arXiv abstract and The Decoder's report, not the full paper. Open points follow from that:

  • The main experiments cover two agent models, eight runs for the plateau observation and 13 tasks.
  • Every task is an optimization problem with a score. Multi-file refactors in messy repositories are not studied.
  • The comparison holds at equal compute. Wall-clock time, orchestration effort and evaluator cost are separate questions.
  • No code repository is linked to the paper, so reimplementations will differ.

In its own summary, The Decoder is careful: the results suggest that periodic context restarts may stay useful for stronger agents. Nothing is proven yet.

What you can take for your own agents

These points come from the explainx blog, not from the paper's authors, and are meant as ideas for long runs:

  1. Keep state in files: notes, a results log, code.
  2. Reset context on a schedule or at a plateau, with a short handoff note.
  3. Tell the new conversation what failed, not the reasoning that led to the old approach.
  4. Keep an objective score.

None of this applies to chat applications with a person in the conversation, where the history is the task. It concerns agents that work alone for hours on a measurable goal, such as optimization or tuning jobs.

Further reading

Questions?
What does Fork-and-Flush mean?+

The agent is split into K parallel branches (fork). Each branch inherits the workspace, files and saved results but loses its whole chat history (flush) and starts a fresh conversation. After a fixed span, the branch with the best score continues.

How big is the effect?+

Mean over 13 tasks, normalized to 0 to 1 at equal compute: single run 0.47, best-of-4 0.54, Fork-and-Flush 0.78. The gain is 66.0 percent over the single run and 44.4 percent above best-of-4. Flushing alone, without branching, lifted the score from 0.45 to 0.55 on 11 tasks.

Does this apply to every agent?+

No. The tasks were optimization problems with a clear score, such as packing, scheduling and cryptanalysis. The method needs a reliable metric to pick the best branch. The paper shows no results for multi-file refactors without a score.