{"version":"2.1.283","anchor":"session-cwd-may-now-be-null-in-sdkheadless-and-subagent-pat","canonical_anchor":"session-cwd-may-now-be-null-in-sdkheadless-and-subagent-pat","heading":"Some parts of Claude Code now handle a session with no working directory","tier":"internal","area":"Sessions","url":"https:\/\/changelogs.core-directive.com\/v\/2.1.283\/e\/session-cwd-may-now-be-null-in-sdkheadless-and-subagent-pat","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.283","markdown":"### Some parts of Claude Code now handle a session with no working directory\n\nHeadless runs, subagent checks and a path helper now cope with a session that has no working directory instead of always expecting one\n\n**Unclear.** What puts a session into the state of having no working directory is not known.\n\n**What**\n\nThe working directory is the folder a session runs in. A few parts of Claude Code now allow for it to be missing:\n\n- Headless runs (Claude Code run by another program, with no interactive screen) skip the setup that depends on the working directory when there is none.\n\n- The check for whether a subagent (a helper agent Claude starts for a subtask) is working in a separate copy of the project returns no when the parent session has no working directory.\n\n- A helper that works out a file path relative to a folder returns nothing when there is no folder.\n\nBefore, the working directory was always resolved.\n\n**Why**\n\nThis looks like groundwork for sessions that run without a working directory.\n\n- Area: Sessions\n- Tier: Under the hood\n- Useful: 1\/5\n- Signal: 2\/5"}