Follow Discord
Sweep 22 Sep 2026 · 17:19Z Build v2.1.280 501 read Stable v2.1.267 Latest v2.1.280 Next v2.1.280 Feeds RSS JSON llms.txt Unofficial
Claude Code v2.1.277 ·

set_cwd (/cd) can now re-anchor a fresh session's start-of-session state

Changing directory before any turn has run now fully re-derives session start state instead of just appending a notice

TierUnder the hoodhow much it should matter to you
Useful1my rating, 1 to 5
Signal1worth watching, 1 to 5
AreaDirectory Changewhat it touches
KindInternal Changesin v2.1.277,
Group of 3 Under the hood No documentation found

Changing directory before any turn has run now fully re-derives session start state instead of just appending a notice

What

  • The directory-move implementation behind /cd and the headless set_cwd control request now takes freshSession/confirmFresh options; when a session is fresh (no turns have run yet) and confirmed, changing directory fully re-derives start-of-session state — session_start hooks, memory, hook caches, and more — instead of just injecting a "directory changed" notice into context.
  • The set_cwd tool's description was expanded to explain this: before any turn has run, the move re-anchors the whole session as if it had started in the new directory, with no move notice shown; after a turn has run, prior context is preserved and the move is appended as a notice instead.
  • The control-request handler for set_cwd now computes whether the session is fresh (no messages dequeued, no assistant message in history) and threads that through as freshSession/confirmFresh. A new fresh_session telemetry field is recorded on the tengu_cd_command event.

Why

Previously, moving directories early in a session could leave stale start-of-session state, such as hooks or memory loaded from the old directory. Now Claude Code recognizes when nothing has happened yet and fully re-initializes as if the session had started in the new directory.

Read from
Names in the bundleset_cwd

See this entry in the whole of v2.1.277 →

Feedback