What probably matters to youSection of the release
What
Programs that host Claude Code through the SDK can register hooks, which are their own code that Claude Code calls at set points. One such point is PostToolUse, which runs after a tool call succeeds. This release adds a cheaper way to learn which folder a shell command left you in.
shell_cwd is a new system message. It reports the folder a Bash or PowerShell call left its shell in.
When a host marks a hook matcher replacedByFrame: 'shell_cwd', Claude Code sends system/shell_cwd instead of calling callbacks that only read the shell folder. Only those hosts receive the message.
Why
This changes the contract between Claude Code and the programs that host it, such as desktop apps. A host that only needs the shell's current folder can receive it as a message instead of running a hook after every command.