AIToday
Large Language ModelsAI Coding AssistantsZenn AI/MLPublished: Oct 31, 2026, 06:00 JST

Swap AI coding models mid-project: keep context in AGENTS.md, not the model

Send on LINE
Swap AI coding models mid-project: keep context in AGENTS.md, not the model

3 Key Points

  1. What happened

    Three places to persist what switching loses: context in AGENTS.md, ADR and PROGRESS.md files; quality standards in tooling enforced by make check; and history in git with one task per commit.

  2. Why it matters

    If design rationale and progress live only in the old model's conversation, a replacement model tends to redo finished work or refactor toward options already rejected, so the disruption should shrink to a few turns after the switch.

Not sure about something? Ask the AI

Questions and answers are published on this page.

Summaries like this, every morning.

Context & Analysis

The account is written from direct experience: the author recalls a model switch that reversed a design premise hammered out over two hours in the previous session, overwriting the code with a different approach. It frames the root cause structurally rather than as a model defect. What disappears at a switch is not the code but the reasoning around it — rejected alternatives, remaining tasks, naming and error-handling habits — and the new model, starting from a blank slate, fills that vacuum with its own defaults.

The piece also distinguishes how much is lost depending on what is swapped. Changing only the model inside the same agent preserves convention files, tools and permissions, though reasoning traces are often lost and prompt caching is invalidated, raising cost and latency right after the switch. Changing the agent itself loses agent-specific hooks, permissions and convention filenames, and requires migrating those settings by hand. The countermeasures, however, are identical in both cases, which is why they are presented as a single three-part discipline.

A recurring theme is that natural-language instructions in a conventions file are only requests, while tooling is enforcement. Models under pressure to clear errors may add noqa comments, skip tests or loosen config files, and having CI detect such changes mechanically is recommended. It also notes that agents readily inspect current state via git status but rarely dig into why changes were made with git log -p or git blame, so those steps are written into the session-start checklist.

FAQ
Why does switching models or agents mid-project cause problems?
Most problems come from losing what existed only inside the previous model's head: why a design was chosen, how far work has progressed, and implicit coding conventions. The new model starts blank and may rebuild existing designs its own way.
What is the single most effective file to keep?
The ADR (Architecture Decision Record), and especially its record of which options were rejected and why, is singled out. Without it, a replacement model often refactors toward a previously rejected approach, calling it more common.
What should happen right after a switch?
Having the new model read AGENTS.md, PROGRESS.md, ADRs and git history, then summarize its understanding and plan for a human to check, is recommended. It also suggests testing the self-correction loop on a small task first.
Send on LINE

AI news that matters for your work, delivered every morning.

Pick your industry and the AI tools you use, and get news related to your work every day.

Free · 30 seconds with Google · unsubscribe anytimeWhat is AIToday? →

Ask AI

Ask AI anything about this article. The AI reads this article, earlier AIToday articles, and Wikipedia, and cites its sources. Q&As are published on this page for other readers too.

Questions and answers are published on this page.

Related Articles

Next articleMicrodosing the spirit of Anthropic: inside AI labs' skewed views