Follow Discord
Sweep 22 Oct 2026 · 21:04Z Build v2.1.309 528 read Stable v2.1.308 Latest v2.1.309 Next v2.1.309 Feeds RSS JSON llms.txt llms-full.txt Unofficial

Claude Code v2.1.281 ·

Claude Code stays on a deleted working directory instead of switching elsewhere

When a session's working directory disappears, Bash refuses to run elsewhere and headless turns keep going with a warning instead of failing

Group of 2 You'll notice Bug Fixes
JSON All of v2.1.281
You'll noticeTier: how much it should matter to you
3Useful: my rating, 1 to 5
1Signal: worth watching, 1 to 5
Headless ModeArea: what it touches
Bug FixesKind: in v2.1.281,
ImprovementsSection of the release

Unclear The finding does not say under what condition the warning leaves out the folder's path.

What

The working directory is the folder a session runs its commands in. This release changes what happens when that folder is deleted while a session is using it.

  • Bash commands: if the shell's working directory has been deleted and the session is pinned to it, the Bash tool (which runs shell commands for Claude) no longer quietly moves to a fallback directory. It returns an error instead: "Working directory ... no longer exists, so shell commands cannot run until it is restored." Before, it logged "Shell CWD … no longer exists, recovering to" and switched directories.
  • Headless turns: in headless mode (the SDK or print mode, where Claude Code runs without the interactive screen), a turn that starts after the directory has disappeared no longer fails. The turn stays pinned to the missing path and logs "working directory … no longer exists; the turn starts pinned to it". Once per session, it tells you: "The session's working directory ... no longer exists; shell commands cannot start there and relative file paths that use it will fail until it is restored." The message names the path except in some cases.

Why

Commands no longer quietly run in a different folder than the one you expected, which could have changed or created files in the wrong place. For SDK and print-mode runs, deleting the folder no longer ends the turn. Instead you get a clear warning, and shell commands and relative paths won't work until the folder is restored.

How sure we are
Something disagreesSomething we can check disagrees with this entry, or the writer said they could not settle it.
The writer flagged doubtThe finding does not say under what condition the warning leaves out the folder's path.
Anthropic's release notes agreeImproved screen-reader output in /mcp: a disabled server is read as "off" instead of "pending"

See this entry in the whole of v2.1.281 →

Feedback