{"version":"2.1.334","anchor":"control-request-remove-directory-added-add-directory-now-se","canonical_anchor":"control-request-remove-directory-added-add-directory-now-se","heading":"Added folders can now be removed during a session with remove_directory","tier":"use","area":"SDK","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.334\/e\/control-request-remove-directory-added-add-directory-now-se","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.334","markdown":"### Added folders can now be removed during a session with remove_directory\n\nA new `remove_directory` control request detaches an added folder mid-session, and add and remove requests now run in order\n\n**What**\n\nApps built on the SDK, and remote control of a session, could already add a working folder to a running session with `add_directory`. They can now take one away again:\n\n- `remove_directory` is a new control request type that detaches a folder that was added. A control request is a message an app sends to Claude Code while it runs.\n\n- `add_directory` and `remove_directory` requests now run one after another through a shared queue, so they are applied in the order they were sent. Before, nothing kept add requests in order.\n\n- `remove_directory` also appears next to `add_directory` in the table of commands available to remote sessions.\n\n**Why**\n\nHost apps and remote sessions can drop a folder Claude no longer needs without starting a new session. Quick add and remove requests are no longer applied out of order.\n\n- Area: SDK\n- Names: `remove_directory`, `add_directory`\n- Tier: Use it now\n- Useful: 4\/5\n- Signal: 3\/5\n- Scope: individual\n- Heads-up: no"}