Visual Studio Code 1.138 landed on September 16, 2026, and it continues a theme that has defined the editor’s last dozen releases: agents are not a side panel anymore — they are the workflow. This time the focus is on where agents run, how you pay for and carry them across tools, and what happens to all the work they leave behind.

The headline features:

  1. Agent sessions in Dev Containers — run agents with your project’s tools and dependencies in a local Dev Container
  2. Expanded Codex harness — continue Codex sessions across apps, choose between Copilot and ChatGPT subscriptions, and use VS Code tools
  3. Session cleanup (Preview) — automatically mark merged sessions as done and optionally delete them after a grace period

Here’s what each of these means in practice, plus the smaller features that round out the release.

Agent Sessions in Local Dev Containers

The most consequential change in 1.138 is that agents can now run inside a project’s Dev Container. Enable chat.agentHost.devContainer.enabled and local folders that have a supported Dev Container configuration will show a Use Dev Container action in the folder menu. Select it and the agent session runs inside that container (Agents window only).

The reasoning is straightforward: an agent is only as good as the environment it runs in. A coding agent that builds against your machine’s globally installed Node, Python, or CLI tools is evaluating code in a world that doesn’t match CI or your teammates’ setups. Running the session in the Dev Container means the agent uses the same toolchain, dependency versions, and configuration defined for the project — the same environment you already trust for development. Docker must be installed on your machine, and the feature is rolling out gradually, so you may need to enable the setting manually to try it today.

Why this matters

For teams that have standardized on Dev Containers, this closes an important reproducibility gap. Agent-generated code, test runs, and build verification now happen against a consistent environment rather than a snowflake developer laptop. That makes agent output both more trustworthy and easier to reproduce when something goes wrong.

Expanded Codex Support in the Agent Host

The agent host — the dedicated process architecture based on the Agent Host Protocol (AHP) that lets you connect to the same session from multiple VS Code windows — gets a substantial Codex upgrade in 1.138. Enable chat.agentHost.codexAgent.enabled, and optionally chat.editor.codex.preferAgentHost.

Four capabilities stand out:

  • Choose your subscription. Use Codex with a GitHub Copilot subscription or a ChatGPT subscription. If you’re signed in to both, you can switch between Copilot-backed and ChatGPT-backed models from the model picker without losing the current conversation.
  • Continue across apps. Move the same Codex session between the ChatGPT app and VS Code instead of starting a new conversation.
  • Interact with desktop apps. If the ChatGPT app is installed and configured for computer use, the Codex harness in VS Code can reuse that setup to interact with applications on your computer. This works with models backed by either subscription.
  • Use VS Code tools. Codex can use the full set of tools provided by VS Code, including built-in, extension, and MCP tools. With a ChatGPT-backed model, Codex can also use its image-generation tool directly in the session.

Why this matters

This is the clearest sign yet that VS Code wants to be the surface for agent work rather than the owner of one particular agent. Letting you bring your own subscription, keep a single session alive across the ChatGPT app and the editor, and hand the agent the full VS Code toolbelt turns the editor into a hub. If your team is split between Copilot seats and ChatGPT subscriptions, 1.138 means they can share a workflow instead of maintaining two.

Continue Codex Quick Chats in a Workspace

Version 1.137 introduced the ability to attach a project to an existing quick chat for Copilot sessions. 1.138 extends that same flow to Codex, so starting project-specific work no longer means abandoning a workspace-less quick chat.

Ask Codex to attach a local folder, then choose whether to use the folder directly or create an isolated worktree. After you confirm the change, the same chat and native Codex thread become a workspace session. The session retains its title, conversation history, current request, selected model, and permission mode, and Codex continues the request with access to the project files.

Workspace conversion is available for idle Codex quick chats in Interactive mode and supports single-root workspace targets. If the change is canceled or cannot be applied, the original workspace-less chat remains available — so there’s no risk in trying it.

Why this matters

This small feature is quietly one of the most human parts of the release. The moment a casual question turns into real work is exactly when you don’t want to lose your thread. Because agent host sessions are decoupled from workspaces, the conversation survives the transition.

Create Pull Requests from Agent Sessions

Once an agent has done the work, getting it into review is the next friction point. In 1.138 you can create pull requests from Agent Host sessions in the Agents window using a single form where you review and edit the generated title and description, choose draft status, and configure available merge options. You can create the pull request directly or send the request to your agent, and your preferred options are remembered for next time.

The Agent Merge option remains experimental and only appears when chat.agentMerge.enabled is turned on.

Why this matters

The distance between “the agent finished” and “the team can review it” used to be a manual handoff — copy a summary, write a title, pick a base branch. Folding PR creation into the session keeps the context where it was generated, and giving you the choice to create it yourself or delegate the click to the agent mirrors how a good teammate operates.

Keep Completed Sessions Organized (Preview)

Agent-heavy workflows accumulate sessions, and most of them are finished. 1.138 adds cleanup tooling so finished work stops cluttering the sessions list.

When all of an inactive session’s pull requests have merged, the Agents window can suggest marking the session as done, with a first-use guide showing where the Mark as Done action lives. Enable chat.agentSessions.archiveNudge.enabled to see these suggestions.

For hands-off cleanup, configure chat.agentSessions.autoMarkAsDoneMergedSessionsAfterDays to mark inactive sessions as done after their PRs merge, and chat.agentSessions.autoDeleteArchivedMergedSessionsAfterDays to delete them after a separate grace period. Both automatic-cleanup settings are disabled by default. When all pull requests for a session are merged, you can select Configure Automatic Cleanup in the Mark as Done suggestion to open both settings without enabling them.

And yes — there’s sessions.markAsDoneConfetti, which shows a confetti animation when you mark a session as done. It respects your reduced-motion preference, which is the detail that makes it genuinely thoughtful rather than gimmicky.

See Which Sessions Need Attention (Preview)

The companion to cleanup is knowing when an agent actually needs you. Enable sessions.showApplicationBadge and VS Code shows a badge on the macOS dock, Linux launcher, or Windows taskbar for sessions with new results, requests for input, or pull request checks that need attention. It’s a small thing, but it means you don’t have to keep the Agents window in front of you to know that work is waiting.

Unified Workspace and Repository Picker (Experimental)

Starting agent work is now a single searchable list. With sessions.chat.unifiedWorkspacePicker.enabled, the picker combines local folders, GitHub repositories, Cloud repositories, and remote targets in one place, with remote connection actions still available from the Remote entry.

Selecting Work in Repository uses a cloud-first workflow: a GitHub repository that isn’t already local is selected immediately with the Cloud harness, without a clone prompt. If you later choose a local harness, VS Code prompts you to clone the repository and preserves the cloud selection if you cancel.

Improved Voice Mode Session Awareness (Experimental)

Voice Mode, introduced in 1.137, now has better session awareness. You can navigate and monitor parallel agent work without leaving Voice Mode: it can find recent agent sessions, switch between them by label, and report each session’s status. If you’ve been experimenting with voice-driven agent work, this is the piece that makes it usable when more than one session is running.

Customize Chat Backgrounds by Color Theme (Experimental)

The chat background feature from 1.136 gets a refinement. Previously the background image was stored per theme kind but its layout was not — so right-aligning your dark background and then left-aligning your light one would leave both aligned the same way. Layout is now stored per theme kind alongside the image, and switching between a dark and a light theme restores that theme’s placement.

Two new settings, chat.agentSessions.preferredDarkBackgroundImageLayout and chat.agentSessions.preferredLightBackgroundImageLayout, replace the old chat.agentSessions.backgroundImageLayout. Clearing a background also moved: Chat: Set Background… now leads with No Background, which clears the background for the color theme you’re currently using and leaves the other alone. This update is Agents-window only.

Deprecations in 1.138

Unlike the previous several releases, 1.138 includes actual deprecations — worth noting so you can update your sync settings.

  • chat.agentSessions.backgroundImageLayout is replaced by chat.agentSessions.preferredDarkBackgroundImageLayout and chat.agentSessions.preferredLightBackgroundImageLayout, so the chat background layout can be set separately for dark and light themes.
  • The Chat: Clear Background command is removed. Choose No Background in Chat: Set Background… to clear the background for the current color theme.

Community Contributions

VS Code 1.138 includes contributions from the community. Notable highlights:

  • Jacob T. Jove (jacobjove) fixed a main-process out-of-memory issue caused by unconsumed buffered pty host service events
  • Ryan Ewen (RyanEwen) kept Codex MCP tool progress out of the tool result
  • Simon Siefke continued his long-running memory leak work, this release fixing a leak in the markers table
  • Deniz Güney Yıldırım (denizguney) updated a completion test for the files.exclude configuration
  • Dhinesh Ponnarasan fixed dismissal of a completed progress notification
  • Vlad Gerasimov (vladstudio) fixed terminal-editor shift-drop firing on detached instances
  • yutotnh forced commit messages output to UTF-8
  • Zhichao Li aligned OTel guidance with the Agent Host architecture

Issue tracking contributions from John Murray, RedCMD, Andrii Dieiev, and Alberto Santini helped triage and verify community reports.

Should You Update?

Yes. VS Code 1.138 is a release about making agents fit into your existing development process rather than asking you to adapt to them. The Dev Container integration is the stand-out for teams that already containerize their dev environments — it’s the difference between an agent that works on your laptop and one that works in your project. The expanded Codex harness is the most flexible thing in the release, and the session cleanup tooling is the kind of janitorial feature that you’ll appreciate a month from now when your sessions list is clean.

Just remember the two deprecations if you sync settings across machines, and note that the automatic cleanup settings ship disabled — you opt into them deliberately.

VS Code is rolling out gradually to all users. Use Check for Updates in VS Code to get the latest version immediately, or download the nightly Insiders build to try new features as soon as they’re available.


What’s your favorite feature in VS Code 1.138? Let us know on X — we’re always interested in hearing how these updates land in real workflows.