blog.pierrehenry.be

How to Resume Coding in ChatGPT Without Losing Your Context

Photo by Growtika How to Resume Coding in ChatGPT Without Losing Your Context - Photo by Growtika on Unsplash

Let me walk you through something that’s honestly changed the way I code: connecting my local development environment—Visual Studio Code and even my terminal—to ChatGPT using the Model Context Protocol (MCP). This isn’t just about getting code suggestions. It’s about resuming exactly where you left off, with all your previous chat context, and letting ChatGPT read and write directly into your project. If you’re used to Copilot, this is a whole different level.

Why Not Just Use Copilot?

Sure, Copilot is great for inline suggestions, but sometimes you want a real conversation. I had a bunch of context already in ChatGPT from brainstorming on the train, and I didn’t want to lose that. Copilot doesn’t remember your previous chats. ChatGPT does. That’s a game changer when you’re working on something over several sessions or devices.

Setting Up: Plugging Your Project into ChatGPT

Here’s how I did it:

  1. Open Visual Studio Code (or your favorite editor).
  2. Connect the ChatGPT app (not just Copilot, but the actual ChatGPT desktop app that works with code on macOS).
  3. Add your project to the ChatGPT app. You can even add your terminal window.
  4. Now, ChatGPT can read your codebase, understand the context, and even write changes directly into your project.

It’s wild. You can literally ask for improvements, and ChatGPT will apply them right into your codebase. No more copy-pasting from the browser.

Real-World Example: Picking Up Where I Left Off

I had this MCP server project. I’d already chatted with ChatGPT about it on my phone while commuting. When I got back to my desk, I just plugged the same project into the ChatGPT app on my Mac. Instantly, it picked up all the context from my previous session. It knew what I was building, what I’d already discussed, and what improvements I wanted.

I could have used Copilot, but honestly, the chat experience is just more pleasant with ChatGPT. Plus, having that history is super useful.

Photo by Growtika How to Resume Coding in ChatGPT Without Losing Your Context - Photo by Growtika on Unsplash

Code Writing and Applying Changes

At first, I tried to get ChatGPT to give me a zip archive of the improved code. That didn’t work—the zip was empty. But then I realized: why not just ask ChatGPT to apply the changes directly into my codebase? So I did. It worked perfectly.

Here’s the sort of prompt I used:

1Please bring the improvements into the MCP server codebase. Test them, and only add relevant changes—no irrelevant changes.

Be specific with your prompts. If something doesn’t work, don’t be afraid to ask for a totally different approach:

1Can you try a radically different approach?

Or:

1Can you please re-evaluate what you just did and the result?

This back-and-forth is what makes ChatGPT so powerful compared to static code suggestions.

Under the Hood: Why MCP Beats Function Calling

You might remember when OpenAI called this “function calling.” Now, everyone’s moving to MCP—the Model Context Protocol. It’s a proper protocol for letting AI models interact with your codebase, not just spit out code snippets. If you want to dig deeper, check out modelcontextprotocol.io. There’s a ton of info there.

“Only your imagination is the limit. You can plug in your codebase, your terminal, and just let ChatGPT do its thing.”

Some Tech Notes

Binary source code – html php java program code – Webdesign How to Resume Coding in ChatGPT Without Losing Your Context - Photo by Markus Spiske on Unsplash

Pro Tips


Key Takeaways

“The only limit is your imagination. Plug in your codebase, your terminal, and let ChatGPT do its thing.”


Pierre-Henry Soria

GitHub · PierreHenry.Dev · YouTube

<< Previous Post

|

Next Post >>

#Chatgpt #Coding Workflow #Development Tools #Gpt Mcp #Productivity #Tech #Terminal Integration