Follow Discord
Sweep 25 Sep 2026 · 19:33Z Build v2.1.283 504 read Stable v2.1.274 Latest v2.1.283 Next v2.1.283 Feeds RSS JSON llms.txt llms-full.txt Unofficial

Claude Code v2.1.281 ·

Headless set_cwd now re-dials stdio MCP servers that were spawned in the launch directory

In headless mode, changing directory with set_cwd now restarts MCP servers started in the old folder so they run in the new project

Entry
JSON All of v2.1.281
EntryKind: in v2.1.281,
ChangesSection of the release
What

This applies to headless mode, where Claude Code is run by another program through the SDK (a developer toolkit) instead of in a terminal window. That program can send set_cwd to change the folder Claude Code works in. When set_cwd actually changes the folder, Claude Code now:

  • Removes stale connections to MCP servers (outside programs that give Claude extra tools) and clears their cached data.
  • Removes project MCP configurations that no longer match the new folder.
  • Refreshes plugin state.
  • Restarts local MCP servers that were started in the original launch folder, when the response marks a fresh session, and waits for them to reconnect.

The restarted servers are ones that talk to Claude Code over stdio, meaning through a directly started local process. They come back up with the new project folder as their base.

Why

Previously an MCP server started in the launch folder could keep working against that folder after the directory change. Now the servers of a fresh session follow the new project, so their tools see the right files.

See this entry in the whole of v2.1.281 →

Feedback