VS Code now lets Claude and OpenAI Codex take turns on the same piece of work, without either of them starting from scratch. Here is the shape of how that works.
The conversation belongs to the editor, not to the AI.
So you can swap the AI in the middle of a job and the new one carries on exactly where the last one stopped. Nobody re-explains anything. The work does not restart.
It is a substitution, not a new match. Same pitch, same scoreline, seventy minutes already played. A different player comes on with a different set of skills, and he knows the score because he has been watching the whole game.
What you are not doing is kicking off again at nil nil.
Nothing here is new as an idea. A job is open, someone is working it, someone else takes over, and the file stays with the business rather than with the person.
| In an operations team | In VS Code | What it actually is |
|---|---|---|
| The open job file | The session | One conversation plus everything it has built up. It belongs to the editor |
| Whoever is on shift | The harness | The agent actually doing the work: Copilot, Claude, or Codex |
| The handover notes | Conversation history | Every turn so far. This is the part that travels |
| That person's logins, tools and authority limits | Tools, permissions, model | Belongs to the person, not the job. Changes when the person changes |
| The office the file lives in | The Agent Host | A separate process in VS Code that holds sessions, so they survive closing the window |
| Calling in a specialist for one stage | The handoff | Changing who is on the job without closing the job |
Read the teal bar as the job itself, running left to right. The boxes above it are whoever is driving at that moment. The job never breaks.
| Key | On the diagram | What it means |
|---|---|---|
| 1 | The boxes on top | Whoever is driving right now. Only one drives at a time |
| 2 | The circles on the bar | The handoff. You changed who is driving. Nothing else happened |
| 3 | The teal bar | The session. It does not stop, split, or reset at a handoff |
That is the whole idea. What the job knows travels. What the worker owns does not. Everything useful and everything awkward about handoff comes out of that one split.
Open the session, change the Session Target, type the next prompt. VS Code treats a change of target on a live session as a handoff and carries the thread over.
The same dropdown also holds Copilot and a Cloud target, which runs the task on a server instead of your machine.
All of them come from the same place: the conversation travelled, the worker did not. People expect the new agent to inherit everything, and it inherits the words only.
| What you see | What actually happened | The fix | |
|---|---|---|---|
| 01 | The new agent ignores a house rule you set up earlier | Your instruction files and settings belong to the harness, not to the session, so they do not necessarily follow it across | Restate the rule in the first prompt after a switch |
| 02 | A tool that worked five minutes ago is gone | Each harness carries its own toolset. Copilot, for example, can only reach local tool servers that need no login | Check what the new target can actually reach before asking it for the same move |
| 03 | It asks permission for something you already approved | Permissions are per agent, not per job | Expect to approve again after every switch. Not a bug |
| 04 | The answers get vaguer right after a handoff | The history travelled, but it is being read by a different model that weighs it differently | Restate the goal in one sentence as you hand over |
| 05 | The Cloud target cannot see your files | Cloud runs on a server. It has no view of your machine or your local tools | Only send Cloud tasks that are fully written down |
| 06 | You hand off mid edit and it gets messy | The new agent inherits the conversation, not the half finished action | Let the current turn land before you switch |
Honest boundary: rows 01 and 06 are the behaviour you should expect from how this is built, not something the documentation spells out. Rows 02, 03 and 05 are stated outright by Microsoft.
Before you switch, ask the outgoing agent for one thing: summarise where we are and what is left. Now the history that travels contains a clean brief at the end of it rather than nine turns of raw working out.
Amateurs switch mid sentence and hope. The handoff is a shift change, so treat it like one.
Straight after the switch, before it touches a thing, ask the new agent: what do you think the task is?
If the answer is wrong, you have lost ten seconds. If you skip the question, you find out three files later.
The conversation is the asset. The model is just what you bolt on for that stretch.