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

Claude Code v2.1.200 ·

set_cwd SDK Tool

Entry
JSON All of v2.1.200
EntryKind: in v2.1.200,
New FeaturesSection of the release
What

New programmatic working-directory change mechanism for SDK hosts (e.g. Claude Desktop) — the headless twin of the interactive /cd command.

Details
  • Accepts path (required), trust_accepted (boolean), and trusted_directory (required if trust_accepted is true)
  • Runs the same validation, Cd(...) permission rules, and relocation path as the interactive /cd
  • Returns structured responses: ok (with cwd, changed, transcript_relocated), needs_trust (when the directory requires a trust dialog), or rejected (with reason: busy, not_found, not_a_directory, blocked_by_rule, unsafe_path)
  • Rejects requests while a turn is in progress with a clear "busy" reason
  • The trust_accepted flow requires echoing back the exact directory string from the needs_trust response to pin the attestation
  • Paths containing invisible or non-printing characters are rejected as unsafe
Evidence

New set_cwd handler (search for "A turn is in progress — the working directory can only change", "set_cwd: invalid request — path must be a non-empty string", "set_cwd: invalid request — trust_accepted requires trusted_directory")

Strings lifted out of the shipped bundle, so the claim above can be checked against them.

See this entry in the whole of v2.1.200 →

Feedback