Switch the model without losing the project
You are halfway through adding a feature when you decide to try a different model in your coding agent. Perhaps you want another approach to a stubborn bug, or you want to manage token costs for the remaining work. You usually do not need to restart the project. You need a clean handoff.
A coding agent combines a model with tools that can read files, edit code, and run commands. Changing the model changes the system deciding what to do next. It does not automatically move your files, preserve every conversation detail, or transfer tool permissions.
Separate the files from the conversation
Think of your project as two bundles. The first is the working directory: source files, tests, configuration, and uncommitted changes. The second is conversational context: your instructions, earlier decisions, failed attempts, and the agent's current plan.
When you change models in the same workspace, the files generally remain available. Conversation continuity depends on the client. Some clients support changing models within a session; others require a new session or configuration change. Even when history carries over, a different model may interpret it differently.
The safe assumption: files are the durable record, while important decisions deserve a written handoff.
Make a checkpoint before changing models
Wait until the agent finishes its current command or edit. Avoid switching while a migration, installation, or other state-changing operation is still running. Then make the current state understandable:
- Review the changed files and separate your edits from the agent's edits.
- Create a local version-control checkpoint, keeping secrets and generated clutter out of it.
- Run the relevant tests and record existing failures.
- Write down the current goal, constraints, and next unfinished task.
A checkpoint is not a claim that everything works. It gives you a known state to compare against if the next session takes an unwanted turn.
Write a handoff the next model can use
Do not rely on “continue where we left off.” Give the next model a compact brief in a project note or your opening message. Include these details:
- Goal: Add password reset without changing the existing sign-in flow.
- Current state: The request endpoint exists; email delivery is unfinished.
- Relevant files: Identify the route, email service, and related tests.
- Constraints: Keep the public API unchanged and add no dependencies without approval.
- Verification: Record the test command, its latest result, and known failures.
- Next action: Inspect the email service and propose a plan before editing.
Keep credentials, customer information, and other sensitive material out of the brief. Review what the new model provider will receive, especially if changing models also changes providers.
Check the client before selecting another model
Use your client's documented model selector or configuration settings. Confirm that your intended model is supported through the chosen connection. A model appearing in a provider's catalog does not guarantee that every client supports its tools or session behavior.
SwiftRelay is a practical option when you want access to multiple model families through one pay-as-you-go relay. For example, you could use Claude Sonnet 5.5 for one task and DeepSeek V4 Flash for another, subject to your client's support. Billing is per token, so review usage rather than assuming every model has the same cost.
Sign up for SwiftRelay to try the workflow with the small gift credit available to new accounts. Its API host is https://api.fastapirelay.com: Claude Code and Gemini CLI take the bare host, while OpenAI-compatible SDKs add /v1. Follow the setup instructions for your specific client.
Give the new model one bounded first task
Start by asking the new model to read the handoff, inspect the relevant files, and restate the next step. Confirm its understanding before allowing broad edits. Keep tool permissions conservative and check that it can actually run the required tests.
Then assign one small task, review the diff, and rerun verification. If the result is unsuitable, use your checkpoint to recover and update the handoff with what you learned. A successful switch preserves a clear goal, inspectable changes, and a reliable way back.